I would like cobertura to work with Java 5, 6, and 7. I have a junit in cobertura that test for Java 7 specific code changes. It complies a simple test case for Java 7 specific api changes and executes the code for coverage. If I use jdk 7 but set up the cobertura source and targets to use jdk 5 do you think that would solve the issue? What do you think the best approach for this is?
Thanks, Steve. On Jun 26, 2013 5:16 AM, "Baptiste MATHUS" <[email protected]> wrote: > Hi, > > If you actually released Cobertura itself using Java7 without special > configuration, then yes. > The bytecode is not gonna be loadable by any jvm lower than the 7 version. > > Btw, I just checked the bytecode of some class (PackageCoverage) of the > jar that can be found in central, the class is actually having 0x33 => 51 > value as major version (which is JDK7). > > Btw, if you're targetting java5, I'd advice you to use a JDK5 to help > prevent any issue (those can be detected through some additional maven > plugins, but I think it's better to see those as security more than > something else if you don't depend on some upper jdk specificity). > > -- Baptiste > > > 2013/6/26 Steven Christou <[email protected]> > >> I am having some trouble getting the cobertura plugin to work in bamboo. >> I released a new version of cobertura (version 2.0.1) which fixes a few >> bugs for the maven plugin. I get the exception class file has wrong >> version 51.0, should be 49.0 which leads me to believe it could be an >> issue with cobertura itself. I compiled and ran cobertura using java 7 >> (class version 51) however I believe the class version 49 is java 5. Does >> this mean I should re-release cobertura with a --source and --target of 1.5? >> >> Thanks, >> Steve. >> > > > > -- > Baptiste <Batmat> MATHUS - http://batmat.net > Sauvez un arbre, > Mangez un castor ! >
