[ http://jira.codehaus.org/browse/MRELEASE-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=136036#action_136036 ]
Benjamin Bentmann commented on MRELEASE-206: -------------------------------------------- The {{-Darguments}} can only carry the arguments for Maven's {{main()}} method, not the JVM options. MAVEN_OPTS must be passed down via environment variables. Realizing this would basically require to extend the {{ForkedMavenExecutor}} as already shown by the {{DefaultInvoker}}, i.e. pass down all envvars of the parent process to the sub process: {code:java} cli.addSystemEnvironment(); cli.addEnvironment( "MAVEN_TERMINATE_CMD", "on" ); {code} This way, users should never have to bother with configuring the MAVEN_OPTS for the plugin. What works for the main build should work equally well for the forked build. The only problem is that the Release Plugin currently uses plexus-utils 1.3 which doesn't allow to (easily) overwrite inherited envvars. Can we simply upgrade to the latest plexus-utils, thereby bumbing the prerequisite to Maven 2.0.6, or should we just workaround the Plexus issue? Among others, we have both the Surefire Plugin and the JAR Plugin requiring Maven 2.0.6 so I wonder why this plugin couldn't be bumped, too. > its not possible to pass MAVEN_OPTS to the forked release build > --------------------------------------------------------------- > > Key: MRELEASE-206 > URL: http://jira.codehaus.org/browse/MRELEASE-206 > Project: Maven 2.x Release Plugin > Issue Type: Bug > Affects Versions: 2.0-beta-3, 2.0-beta-4 > Reporter: Brian Fox > > I need to increase my jvm size for my build. The forked release doesn't get > the maven_opts. I tried the -Darguments: > mvn release:prepare -DdryRun=true -Darguments=-Xmx1024m > gets me this: > [INFO] Invalid task 'mx1024m': you must specify a valid lifecycle phase, > or > a goal in the format plugin:goal or > pluginGroupId:pluginArtifactId:pluginVersion > :goal -- 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