I have a Maven Multi-Module Build. This works fine in the Azure Build Pipeline. Now I try to add CodeCoverage Report. For that I added this to my azure-pipelines.yml
- task: PublishCodeCoverageResults@2
displayName: 'Publish code coverage report'
inputs:
codeCoverageTool: 'JaCoCo'
summaryFileLocation: '**/target/site/jacoco/jacoco.xml'
reportDirectory: '**/target/site/jacoco'
failIfCoverageEmpty: false
pathToSources: '$(System.DefaultWorkingDirectory)/**/src/main/java/'
then in the two Maven module I added this
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<!-- attached to Maven test phase -->
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
I get this output in the target
The same I did in another module.
Note my verion for all modules is 1.1.3
The problems is now when the Build runs in Azure Pipeline. I see this:
The Version 1.0-SNAPSHOT does not exist in my project.
Do you have an idea what the problem is?


