Cobertura & Java 7 support
Asked Answered
S

5

30

Any ideas when cobertura will support java 7?

Found http://sourceforge.net/tracker/index.php?func=detail&aid=3295711&group_id=130558&atid=720018

We preferred cobertura over emma and other code coverage tools and looks like we have to redo all those again, now that none of them support java 7 yet.

Thanks

Shamblin answered 16/11, 2011 at 12:12 Comment(4)
did u find any soultion for cobertura with java 7Romeliaromelle
@Romeliaromelle The latest entry (from 11 April 2013) on the cobertura main website has that "Also Steven is migrating the code to use maven and is working on releasing 2.0 of cobertura soon! Welcome Steven!"Segno
And on 29th May 2013 version 2.0 was released which now supports Java 7.Drinking
This question appears to be off-topic because it is obsolete.Malaco
N
16

Cobertura 2.0.3 supports Java 7, the cobertura-maven-plugin version 2.6 which uses this version has been just released

Naji answered 21/8, 2013 at 13:20 Comment(3)
I know - I've checked out the code and compiled it myself (simply mvn install).Naji
Looks like it's in the central repository now. search.maven.org/…Wersh
hi it is in repository and works well... but if i use the new try-with-resource feature of java7 it tells me the "non existing catch" block is missing in tests... it marks the closing bracket of the try-blockCatkin
G
10

I was able to get it to work by adding the following argument:

-XX:-UseSplitVerifier

I got it from here.

Gush answered 15/2, 2013 at 20:41 Comment(5)
i am running from ant..so how can i add it ?Romeliaromelle
I don't know about how your build system is set up, but here's the line that handles it in my build.xml: <property name="coverage.additional.jvmargs" value="-Xmx256m -XX:-UseSplitVerifier"/>Gush
i dnt know any error when instrumenting but when i starting tomcat it throwing any error "SEVERE: Error listenerStart" but when running without instrumented war the server is running wellRomeliaromelle
UseSplitVerifier as a jvm arg works; for ant, you could use the JAVA_OPTS environment variable among many other options.Cayser
This worked perfectly for me. See this question for an explanation of why: #15253673Development
T
3

I think the answer is: it won't. There is discussion on the mailing list that the project is not being maintained, and there are Java 7 bugs that have been open for a year. On the bright side, JaCoCo functionality is comparable and is being actively maintained.

Testa answered 26/9, 2012 at 15:54 Comment(3)
Yes. Jacoco-hudson plugin is still under development (not the jenkins one)Shamblin
Don't give up without trying the -XX-UseSplitVerifier option.Cayser
eCobertura (the Eclipse plug-in for Cobertura) hasn't been maintained since 2010, but Cobertura itself is still maintained. If you are looking for coverage reports (such as the ones that eCobertura used to provide), just run the Cobertura maven plugin with mvn cobertura:cobertura and check the HTML report under target/site/cobertura/index.htmlCarlenecarleton
C
1

Further to Jagger's comment, it looks like this is now being actively worked on for the next release - see:

https://github.com/cobertura/cobertura/commit/b303fdc94851088a3c8699651770faef33180924

with the comment "Fix java 7 stack map issue".

Conah answered 14/5, 2013 at 10:20 Comment(0)
C
0

Old thread, but my answer may be useful: Cobertura does support the latest Java versions and is actively maintained. eCobertura (the Eclipse plug-in for Cobertura) hasn't been maintained since 2010, but Cobertura itself is still maintained.

eCobertura will not run with Java 7 or higher, but Cobertura will.

If you are looking for coverage reports (suc h as the ones that eCobertura used to provide), just run the Cobertura maven plugin with mvn cobertura:cobertura and check the HTML report under target/site/cobertura/index.html

Carlenecarleton answered 2/2, 2017 at 16:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.