Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cobertura fails to build with Java9 #271

Open
hansjoachim opened this issue Oct 4, 2015 · 2 comments
Open

Cobertura fails to build with Java9 #271

hansjoachim opened this issue Oct 4, 2015 · 2 comments

Comments

@hansjoachim
Copy link

When attempting to build current master (642a46e) with OpenJDK9 9~b80-2, it fails in Cobertura code coverage module with the following error message:

[ERROR] Failed to execute goal on project cobertura: Could not resolve dependencies for project net.sourceforge.cobertura:cobertura:jar:2.1.2-SNAPSHOT: Could not find artifact com.sun:tools:jar:0 at specified path /usr/lib/jvm/java-9-openjdk-amd64/../lib/tools.jar -> [Help 1]

Since JDK9 will no longer include tools.jar, this should probably be looked into.

This was previously mentioned in #121 (by @mshuler and me), but I didn't see any replies so I've filed a separate issue now.

@alphafoobar
Copy link

I'm seeing a similar error using cobertura as a maven plugin with JDK-9.

[ERROR] Failed to execute goal org.codehaus.mojo:cobertura-maven-plugin:2.7:clean (default) on project spotbugs-maven-plugin: Execution default of goal org.codehaus.mojo:cobertura-maven-plugin:2.7:clean failed: Plugin org.codehaus.mojo:cobertura-maven-plugin:2.7 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:0 at specified path /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/../lib/tools.jar

@AlanBateman
Copy link

AlanBateman commented Oct 16, 2017

tools.jar was indeed removed in JDK 9. All the details are in JEP 220. JDK 9 Early Access builds were available since late 2014 with this change (to give tools that depend on it as much time as possible to digest the change).

keeganwitt added a commit to groovy/GMavenPlus that referenced this issue May 5, 2019
gkoudjou added a commit to gkoudjou/primesum that referenced this issue Jul 1, 2019
There is a know bug in cobertura with Java 9
See cobertura/cobertura#271
gkoudjou added a commit to gkoudjou/primesum that referenced this issue Jul 2, 2019
There is a know bug in cobertura with Java 9
See cobertura/cobertura#271

Update badge in README file

Update pom for jacoco plugin
eis added a commit to eis/spring-boot-security-example that referenced this issue Jan 1, 2021
Cobertura apparently hasn't had java 9+ support
ever and still does not. Jacoco can perform the
same functionality, so we go with that.

cobertura/cobertura#271
mojohaus/cobertura-maven-plugin#30
https://stackoverflow.com/questions/43630262/how-to-exclude-a-direct-dependency-of-a-maven-plugin

Fixes #3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants