#136 Surefire java.endorsed.dirs causes no jacoco.exec

closed-fixed
nobody
JaCoCo (32)
9
2012-08-13
2012-08-10
No

maven-surefire-plugin with <argLine>-Djava.endorsed.dirs="${endorsed.dir}"</argLine> causes no jacoco.exec to be generated. I used the java.endorsed.dirs mechanism, so my tests can run with the latest Jax-WS jars. Below is the configuration:

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.5.9.201207300726</version>
<executions>
<execution>
<id>prepare-agent</id>
<phase>process-test-resources</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.1</version>
<configuration>
<!--
We need to override the default JDK JAX-WS implementation,
so this is where we will store the jars and set
java.endorsed.dirs to for the JUnit tests.
-->
<argLine>-Djava.endorsed.dirs="${endorsed.dir}"</argLine>
<includes>
<include>**/*Test.java</include>
</includes>
<skipTests>${tests.skip}</skipTests>
</configuration>
</plugin>

Discussion

  • Steven P. Goldsmith

    • priority: 5 --> 9
     
  • Steven P. Goldsmith

    Fixed:

    <!--JaCoCo - Java Code Coverage Library -->
    <plugin>
    <groupId>org.jacoco</groupId>
    <artifactId>jacoco-maven-plugin</artifactId>
    <version>0.5.9.201207300726</version>
    <executions>
    <execution>
    <id>prepare-agent</id>
    <phase>process-test-resources</phase>
    <goals>
    <goal>prepare-agent</goal>
    </goals>
    </execution>
    <execution>
    <id>report</id>
    <phase>verify</phase>
    <goals>
    <goal>report</goal>
    </goals>
    </execution>
    </executions>
    <configuration>
    <propertyName>jacoco.agent.argLine</propertyName>
    </configuration>
    </plugin>

    <!-- Tests -->
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.12.1</version>
    <configuration>
    <!--
    We need to override the default JDK JAX-WS implementation,
    so this is where we will store the jars and set
    java.endorsed.dirs to for the JUnit tests. Also added
    JaCoCo argLine of jacoco.exec will not generate.
    -->
    <argLine>${jacoco.agent.argLine} -Djava.endorsed.dirs="${endorsed.dir}"</argLine>
    <includes>
    <include>**/*Test.java</include>
    </includes>
    <skipTests>${tests.skip}</skipTests>
    </configuration>
    </plugin>

     
  • Steven P. Goldsmith

    • status: open --> open-fixed
     
  • Marc R. Hoffmann

    • status: open-fixed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks