Hi,
How do you pass an argument to your maven build when releasing ?
I have a project with 5 modules and I try to release it. My project needs an argument that I pass using -Denv=dev. It seems that when I use the release:prepare -Denv=dev my argument is not passed to the maven build process since I have:

Embedded error: You must set the env variable. For instance, mvn -Denv=dev|prod ... displayed :(
and the release stops with error code 1 with the following exception :

org.apache.maven.lifecycle.LifecycleExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:219) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
   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:585)
   at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
   at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:110) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
   ... 16 more
Caused by: org.apache.maven.plugins.release.ReleaseExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.plugins.release.phase.RunGoalsPhase.execute(RunGoalsPhase.java:55) at org.apache.maven.plugins.release.phase.RunGoalsPhase.simulate(RunGoalsPhase.java:65) at org.apache.maven.plugins.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:135) at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:106)
   ... 18 more
Caused by: org.apache.maven.plugins.release.exec.MavenExecutorException: Maven execution failed, exit code: '1' at org.apache.maven.plugins.release.exec.ForkedMavenExecutor.executeGoals(ForkedMavenExecutor.java:95) at org.apache.maven.plugins.release.exec.ForkedMavenExecutor.executeGoals(ForkedMavenExecutor.java:108) at org.apache.maven.plugins.release.phase.RunGoalsPhase.execute(RunGoalsPhase.java:48)
   ... 21 more

What am I missing ?
Thanks
Emmanuel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to