maven jacoco: pas de génération de rapport de couverture de code

J'essaye de configurer jacoco pour mon projet de couverture de code

Mon projet est basé sur Java 1.8

Voici comment les choses se présentent dans mon projet de pom.xml

    <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.5.10.201208310627</version>
        <configuration>
            <output>file</output>
            <append>true</append>
        </configuration>
        <executions>
            <execution>
                <id>jacoco-initialize</id>
                <goals>
                    <goal>prepare-agent</goal>
                </goals>
            </execution>
            <execution>
                <id>jacoco-site</id>
                <phase>verify</phase>
                <goals>
                    <goal>report</goal>
                </goals>
            </execution>
        </executions>
    </plugin>  

Puis-je exécuter mvn test et de voir la suite

$ mvn test
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building pennyapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- jacoco-maven-plugin:0.5.10.201208310627:prepare-agent (jacoco-initialize) @ pennyapp ---
[INFO] argLine set to -javaagent:/Users/harit/.m2/repository/org/jacoco/org.jacoco.agent/0.5.10.201208310627/org.jacoco.agent-0.5.10.201208310627-runtime.jar=destfile=/Users/harit/code/idea/pennyapp/target/jacoco.exec,append=true,output=file
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ pennyapp ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ pennyapp ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /Users/harit/code/idea/pennyapp/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ pennyapp ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/harit/code/idea/pennyapp/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ pennyapp ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /Users/harit/code/idea/pennyapp/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ pennyapp ---
[INFO] Surefire report directory: /Users/harit/code/idea/pennyapp/shippable/testresults
[INFO] Using configured provider org.apache.maven.surefire.junit4.JUnit4Provider
-------------------------------------------------------
T E S T S
-------------------------------------------------------
objc[13225]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
Running HelloTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in HelloTest
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.523 s
[INFO] Finished at: 2014-08-19T17:56:33-07:00
[INFO] Final Memory: 10M/119M
[INFO] ------------------------------------------------------------------------

puis-je exécuter mvn jacoco:report et je vois

$ mvn jacoco:report
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building pennyapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- jacoco-maven-plugin:0.5.10.201208310627:report (default-cli) @ pennyapp ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.176 s
[INFO] Finished at: 2014-08-19T17:56:51-07:00
[INFO] Final Memory: 11M/112M
[INFO] ------------------------------------------------------------------------

Puis je regarde target/site/jacoco/index.html et de voir la suite
maven jacoco: pas de génération de rapport de couverture de code

Question
- Ce qui est incorrect dans la configuration?
- Comment puis-je générer un rapport?

Grâce

Aucune raison particulière pour laquelle vous utilisez une version obsolète de la JaCoCo plugin? Pour Java 8, vous devez utiliser au moins la version 0.7.0 (voir changelog).
l'exécution de la vieille version de jacoco eu de problème. Il est fixé après que

OriginalL'auteur daydreamer | 2014-08-20