On Saturday, February 1, 2014 3:38:09 PM UTC-5, viper2843 wrote:
> I am working on incorporating JaCoCo's code coverage into my integration test
> suite. I am testing a custom maven plugin and I am using the
> maven-invoker-plugin [1] to perform the integration tests. This means that
> there is no src/main/java and src/test/java directories as all of the tests
> are pom.xml files themselves. The tests are executing just fine and I believe
> the jacoco-it.exec file seems to have data in it (as its file size is a
> non-zero number). My problem is when I go to run the jacoco report goal after
> my tests are done. I always get the following error:
>
> Failed to execute goal
> org.jacoco:jacoco-maven-plugin:0.6.4.201312101107:report-integration
> (post-integration-test) on project liquibase-maven-plugin-tests: Execution
> post-integration-test of goal
> org.jacoco:jacoco-maven-plugin:0.6.4.201312101107:report-integration failed:
> basedir /Users/example/dev/project/example-maven-plugin-tests/target/classes
> does not exist.
>
> I expect that there will be nothing in target/classes as I have no java files
> to compile. How do I go about skipping that check so the report goal will
> read my .exec file and build a report? Below is a bit of my maven pom setting
> up JaCoCo:
>
> <plugin>
> <groupId>org.jacoco</groupId>
> <artifactId>jacoco-maven-plugin</artifactId>
> <version>0.6.4.201312101107</version>
> <configuration>
> <sessionId>${project.artifactId}</sessionId>
> </configuration>
> <executions>
> <execution>
> <phase>pre-integration-test</phase>
> <goals>
> <goal>prepare-agent-integration</goal>
> </goals>
> <configuration>
> <propertyName>invoker.mavenOpts</propertyName>
> </configuration>
> </execution>
> <execution>
> <id>post-integration-test</id>
> <phase>post-integration-test</phase>
> <goals>
> <goal>report-integration</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
>
> I welcome any info you have on how to inegration JaCoCo into a
> maven-invoker-plugin test suite. Thanks.
>
> [1] http://maven.apache.org/plugins/maven-invoker-plugin/
I managed to answer my own question. Adding
<sourceDirectory>src</sourceDirectory> to the <build> section eliminated the
error.
--
You received this message because you are subscribed to the Google Groups
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.