SpotBugsRunAnalysis in Maven@3 requires report of agrregator sub-module which contains no source

88 views Asked by At

I do use Jacoco configured for a multi-module project. That means, that I have create an additional module 'code-coverage-report' to aggregate the reports of all other sub-modules.

This new module (code-coverage-report) does only contain a pom.xml and no /src directory.

For my pipeline build I do use following Maven@3 task:

        - task: Maven@3
          inputs:
            mavenPomFile: pom.xml
            ...
            checkstyleAnalysisEnabled: true
            pmdAnalysisEnabled: true
            spotBugsRunAnalysis: true 

But I do get following error when the build is running:

##[error]cp failed
cp: no such file or directory: /agent/_work/8/s/code-coverage-report/target/spotbugsXml.xml

What I have tried is to specify the skip property as true in my code-coverage-report submodules pom.xml

<properties>    
<spotbugs.skip>true</spotbugs.skip>
</properties>

but it got ignored.

I also tried to additionaly specify the spotbugs-maven-plugin with <failOnError>false</failOnError> in my code-coverage-report pom.xml, but also was not sucessful.

The odd thing is, that I have a different multi-module project that is configured in the same way and does use the same pipeline Maven@3 task and this one works fine.

What could be wrong? What do I miss?

0

There are 0 answers