maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte" <rfscho...@apache.org>
Subject Re: Maven Release Plugin and Java 8 issue
Date Mon, 01 Sep 2014 17:21:48 GMT
Hi,

I guess you configured IntelliJ to compile with Java8 instead of  
instructing Maven to do so.
Did you set the source and target in the configuration of the  
maven-compiler-plugin?[1]
It's not the maven-release-plugin which is responsible for setting the  
java source and target.

thanks,
Robert

[1]  
http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html

Op Fri, 29 Aug 2014 08:46:03 +0200 schreef Vijaysenthil Veeriah  
<vijaysenthil@gmail.com>:

> Hi
>   I apologize I'm kind of new to maven and I cant figure out how  get the
> Maven Release plugin to work for a Java 8 project.  I'm using  version  
> 2.5
> (The maven compiler version is 3.1) . When i just use the compiler plugin
> and do a compile it works in fact i can use most of the other plugins  
> like
> deploy etc but when i try to use the maven release plugin it get the
> following error, I'm running this in IntelliJ and the java_home and Maven
> runner are all configured to use 1.8, Also like i said if i directly
> execute the maven compiler plugin, it works fine
>
>
> Any help is greatly appreciated
> Thanks
> Vijay
>
>
>
> The info the is spitted out Before the run
>
> /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java
> -Dmaven.home=/usr/share/apache-maven-3.2.2
> -Dclassworlds.conf=/usr/share/apache-maven-3.2.2/bin/m2.conf
> -Didea.launcher.port=7547  
> "-Didea.launcher.bin.path=/Applications/IntelliJ
> IDEA 13.app/bin" -Dfile.encoding=UTF-8 -classpath
> "/usr/share/apache-maven-3.2.2/boot/plexus-classworlds-2.5.1.jar:/Applications/IntelliJ
> IDEA 13.app/lib/idea_rt.jar"  
> com.intellij.rt.execution.application.AppMain
> org.codehaus.classworlds.Launcher -Didea.version=13.1.3 -e -X
> release:prepare -DdryRun=true
> Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e;
> 2014-06-17T06:51:42-07:00)
> *Maven home: /usr/share/apache-maven-3.2.2*
> *Java version: 1.8.0_05, vendor: Oracle Corporation*
> *Java home:
> /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre*
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "10.9.4", arch: "x86_64", family: "mac"
>
>
>
> The error
>
>
>
>  Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
> (default-compile) on project xxxx: Fatal error compiling: invalid target
> release: 1.8 -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
> (default-compile) on project xxxx: Fatal error compiling
> [INFO] at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
> [INFO] at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> [INFO] at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> [INFO] at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> [INFO] at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> [INFO] at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> [INFO] at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
> [INFO] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
> [INFO] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
> [INFO] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
> [INFO] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
> [INFO] at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
> [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [INFO] at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> [INFO] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> [INFO] at java.lang.reflect.Method.invoke(Method.java:597)
> [INFO] at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> [INFO] at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> [INFO] at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> [INFO] at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> [INFO] Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal
> error compiling
> [INFO] at
> org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:796)
> [INFO] at
> org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
> [INFO] at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
> [INFO] at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> [INFO] ... 19 more
> [INFO] Caused by: org.codehaus.plexus.compiler.CompilerException: invalid
> target release: 1.8
> [INFO] at
> org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:191)
> [INFO] at
> org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169)
> [INFO] at
> org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:785)
> [INFO] ... 22 more
> [INFO] Caused by: java.lang.IllegalArgumentException: invalid target
> release: 1.8
> [INFO] at
> com.sun.tools.javac.main.RecognizedOptions$GrumpyHelper.error(RecognizedOptions.java:75)
> [INFO] at
> com.sun.tools.javac.main.RecognizedOptions$14.process(RecognizedOptions.java:380)
> [INFO] at
> com.sun.tools.javac.api.JavacTool.processOptions(JavacTool.java:247)
> [INFO] at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:207)
> [INFO] at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:53)
> [INFO] at
> org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:115)
> [INFO] ... 24 more
> [INFO] [ERROR]
> [INFO] [ERROR]
> [INFO] [ERROR] For more information about the errors and possible
> solutions, please read the following articles:
> [INFO] [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2.604 s
> [INFO] Finished at: 2014-08-28T18:51:53-07:00
> [INFO] Final Memory: 7M/305M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-release-plugin:2.5:prepare (default-cli)  
> on
> project xxxx: Maven execution failed, exit code: '1' -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal org.apache.maven.plugins:maven-release-plugin:2.5:prepare
> (default-cli) on project xxxx: Maven execution failed, exit code: '1'
>  at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
> 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:584)
>  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
>  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)
>  at org.codehaus.classworlds.Launcher.main(Launcher.java:46)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:483)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Maven  
> execution
> failed, exit code: '1'
> at
> org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:281)
>  at
> org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:232)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
>  at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> ... 25 more
> Caused by: org.apache.maven.shared.release.ReleaseExecutionException:  
> Maven
> execution failed, exit code: '1'
>  at
> org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:89)
> at
> org.apache.maven.shared.release.phase.RunPrepareGoalsPhase.execute(RunPrepareGoalsPhase.java:44)
>  at
> org.apache.maven.shared.release.phase.RunPrepareGoalsPhase.simulate(RunPrepareGoalsPhase.java:57)
> at
> org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:228)
>  at
> org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:169)
> at
> org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:146)
>  at
> org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:107)
> at
> org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:277)
>  ... 28 more
> Caused by: org.apache.maven.shared.release.exec.MavenExecutorException:
> Maven execution failed, exit code: '1'
> at
> org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:394)
>  at
> org.apache.maven.shared.release.exec.AbstractMavenExecutor.executeGoals(AbstractMavenExecutor.java:110)
> at
> org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:81)
>  ... 35 more
> [ERROR]
> [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/MojoExecutionException

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message