Closed itryapitsin closed 9 years ago
Looks like you are building with JDK 6 when you should be using JDK 8 (or JDK 7, but not really). JDK 6 has been unsupported for quite some time now.
All versions of the JDK cross-compile to older versions so if you are still targeting Java 6 you can use the JDK 8 compiler to do so.
I build with JDK 8
Paste the output of mvn -version
.
Yes. Maven built with 1.6 JDK. Problem was resolved after change to JDK 1.8. Thanks!
Cool. Glad it's working!
[WARNING] Error injecting: com.jakewharton.twirl.CompileMojo java.lang.TypeNotPresentException: Type com.jakewharton.twirl.CompileMojo not present at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:115) at org.eclipse.sisu.space.NamedClass.load(NamedClass.java:46) at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48) at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86) at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55) at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100) at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:133) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109) at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55) at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68) at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993) at com.google.inject.Scopes$1$1.get(Scopes.java:59) at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82) at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:260) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:252) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:462) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:119) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: java.lang.UnsupportedClassVersionError: com/jakewharton/twirl/CompileMojo : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:389) at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:242) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227) at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:107) ... 41 more [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.667 s [INFO] Finished at: 2014-12-23T23:33:45+04:00 [INFO] Final Memory: 13M/1132M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.jakewharton.twirl:twirl-maven-plugin:1.0.1:compile (default) on project learn-portlet: Execution default of goal com.jakewharton.twirl:twirl-maven-plugin:1.0.1:compile failed: Unable to load the mojo 'compile' in the plugin 'com.jakewharton.twirl:twirl-maven-plugin:1.0.1' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com/jakewharton/twirl/CompileMojo : Unsupported major.minor version 51.0 [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>com.jakewharton.twirl:twirl-maven-plugin:1.0.1 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/Users/test/.m2/repository/com/jakewharton/twirl/twirl-maven-plugin/1.0.1/twirl-maven-plugin-1.0.1.jar [ERROR] urls[1] = file:/Users/test/.m2/repository/com/typesafe/play/twirl-compiler_2.11/1.0.2/twirl-compiler_2.11-1.0.2.jar [ERROR] urls[2] = file:/Users/test/.m2/repository/org/scala-lang/scala-compiler/2.11.1/scala-compiler-2.11.1.jar [ERROR] urls[3] = file:/Users/test/.m2/repository/org/scala-lang/scala-reflect/2.11.1/scala-reflect-2.11.1.jar [ERROR] urls[4] = file:/Users/test/.m2/repository/org/scala-lang/modules/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.jar [ERROR] urls[5] = file:/Users/test/.m2/repository/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.1/scala-parser-combinators_2.11-1.0.1.jar [ERROR] urls[6] = file:/Users/test/.m2/repository/org/scala-lang/scala-library/2.11.1/scala-library-2.11.1.jar [ERROR] urls[7] = file:/Users/test/.m2/repository/com/typesafe/play/twirl-api_2.11/1.0.2/twirl-api_2.11-1.0.2.jar [ERROR] urls[8] = file:/Users/test/.m2/repository/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar [ERROR] urls[9] = file:/Users/test/.m2/repository/com/typesafe/play/twirl-parser_2.11/1.0.2/twirl-parser_2.11-1.0.2.jar [ERROR] urls[10] = file:/Users/test/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar [ERROR] urls[11] = file:/Users/test/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar [ERROR] urls[12] = file:/Users/test/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar [ERROR] urls[13] = file:/Users/test/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar [ERROR] urls[14] = file:/Users/test/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar [ERROR] urls[15] = file:/Users/test/.m2/repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar [ERROR] urls[16] = file:/Users/test/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar [ERROR] urls[17] = file:/Users/test/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.0.0.M5/org.eclipse.sisu.inject-0.0.0.M5.jar [ERROR] urls[18] = file:/Users/test/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar [ERROR] urls[19] = file:/Users/test/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.19/plexus-interpolation-1.19.jar [ERROR] urls[20] = file:/Users/test/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.17/plexus-utils-3.0.17.jar [ERROR] urls[21] = file:/Users/test/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar [ERROR] urls[22] = file:/Users/test/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar [ERROR] urls[23] = file:/Users/test/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] [ERROR] [ERROR] ----------------------------------------------------- [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/PluginContainerException