jacoco/jacoco — pull request #169 by mfriedenhagen (2013-12-13 17:40:08+00:00)
Title: Skip jacoco instrumentation for mvn modules with package type ear

In a multi module maven project ear modules are never compiled (similar to pom packaged modules) and the /target/classes directory is never created.

Jacoco correctly skipps modules with pom packaging but it tries to instrument ear modules, which leads to the following error

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:report (post-test) on project mct-vermittler-vertriebsmanagement-ear: Execution post-test of goal org.jacoco:jacoco-maven-plugin:0.6.3.201306030806:report failed: basedir /var/data/jenkins/workspace/mvp.mct.vermittler-vertriebsmanagement.git.nightly/mct-vermittler-vertriebsmanagement-ear/target/classes does not exist
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at ...

Caused by: java.lang.IllegalStateException: basedir /var/data/jenkins/workspace/my-project-dir/my-module-ear/target/classes does not exist
at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:550)
at org.codehaus.plexus.util.FileUtils.getFileAndDirectoryNames(FileUtils.java:1717)
at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1645)