I am trying to run mvn test on my project. The project itself compiles and installs but man test fails with the following output:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test (default-test) on project udms-server: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test failed: There was an error in the forked process
[ERROR] java.lang.UnsupportedClassVersionError: some/project/Event : Unsupported major.minor version 52.0
[ERROR] at java.lang.ClassLoader.defineClass1(Native Method)
[ERROR] at java.lang.ClassLoader.defineClass(Unknown Source)
[ERROR] at java.security.SecureClassLoader.defineClass(Unknown Source)
[ERROR] at java.net.URLClassLoader.defineClass(Unknown Source)
[ERROR] at java.net.URLClassLoader.access$100(Unknown Source)
[ERROR] at java.net.URLClassLoader$1.run(Unknown Source)
[ERROR] at java.net.URLClassLoader$1.run(Unknown Source)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at java.net.URLClassLoader.findClass(Unknown Source)
[ERROR] at java.lang.ClassLoader.loadClass(Unknown Source)
[ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[ERROR] at java.lang.ClassLoader.loadClass(Unknown Source)
[ERROR] at java.lang.ClassLoader.defineClass1(Native Method)
[ERROR] at java.lang.ClassLoader.defineClass(Unknown Source)
[ERROR] at java.security.SecureClassLoader.defineClass(Unknown Source)
[ERROR] at java.net.URLClassLoader.defineClass(Unknown Source)
[ERROR] at java.net.URLClassLoader.access$100(Unknown Source)
[ERROR] at java.net.URLClassLoader$1.run(Unknown Source)
[ERROR] at java.net.URLClassLoader$1.run(Unknown Source)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at java.net.URLClassLoader.findClass(Unknown Source)
[ERROR] at java.lang.ClassLoader.loadClass(Unknown Source)
[ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[ERROR] at java.lang.ClassLoader.loadClass(Unknown Source)
[ERROR] at org.apache.maven.surefire.util.DefaultScanResult.loadClass(DefaultScanResult.java:131)
[ERROR] at org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:95)
[ERROR] at org.apache.maven.surefire.junit4.JUnit4Provider.scanClassPath(JUnit4Provider.java:194)
[ERROR] at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:92)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
I think some/project was compiled with Java 8... so I changed my current project to use Java 8 instead of 7 as well. I'm inclined to think this relates because of these questions:
Can't fix Unsupported major.minor version 52.0 even after fixing compatibility
Unsupported major.minor version 52.0
And now I'm completely stuck :(