Surefire and java7 ------------------ Key: SUREFIRE-447 URL: http://jira.codehaus.org/browse/SUREFIRE-447 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.4, 2.3.1 Environment: jdk7-b24, maven 2.0.8 Reporter: Mathias Arens
If I compile my project with jdk7: Maven version: 2.0.8 Java version: 1.7.0-ea <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> I get the following error: [INFO] Surefire report directory: [...]\target\surefire-reports org.apache.maven.surefire.booter.SurefireExecutionException: [...]: Unsupported major.minor version 51.0; nested exception is java.lang.UnsupportedClassVersionError: [...] : Unsupported major.minor version 51.0 java.lang.UnsupportedClassVersionError: [...] : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:637) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:280) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:215) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:208) at java.lang.ClassLoader.loadClass(ClassLoader.java:323) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:87) at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209) at org.apache.maven.surefire.Surefire.run(Surefire.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:623) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:334) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:980) If I set the source and target to 1.6 everything works fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira