You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Stephan Schroevers (JIRA)" <ji...@apache.org> on 2017/02/07 08:16:41 UTC

[jira] [Commented] (MINVOKER-172) Settings MAVEN_OPTS will prevent usage of invoker.mavenOpts in invoker properties

    [ https://issues.apache.org/jira/browse/MINVOKER-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15855549#comment-15855549 ] 

Stephan Schroevers commented on MINVOKER-172:
---------------------------------------------

This also applies to {{MAVEN_OPTS}} set as environment variable, which is highly unintuitive. (Environment variables should override file-based settings.) Demonstration of the issue using Java 8:
{noformat}
$ MAVEN_OPTS="-XX:MaxPermSize=192m"
$ mvn -version | head -n 0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0 
$ echo 'MAVEN_OPTS="-XX:MaxPermSize=128m"' > ~/.mavenrc
$ mvn -version | head -n 0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.
{noformat}

Note that this can cause quite a bit of head scratching for Travis CI users wishing to override {{MAVEN_OPTS}}, because the build images ship with a (largely undocumented) {{/etc/mavenrc}} file. (I speak from experience...) See also [Travis CI #3893|https://github.com/travis-ci/travis-ci/issues/3893].

> Settings MAVEN_OPTS will prevent usage of invoker.mavenOpts in invoker properties
> ---------------------------------------------------------------------------------
>
>                 Key: MINVOKER-172
>                 URL: https://issues.apache.org/jira/browse/MINVOKER-172
>             Project: Maven Invoker Plugin
>          Issue Type: Bug
>    Affects Versions: 1.9
>            Reporter: Karl Heinz Marbaise
>            Priority: Minor
>
> If i set MAVEN_OPTS with things like {{export MAVEN_OPTS="-Xmx1024m -Xms1024m -Djava.awt.headless=true"}} in my {{.mavenrc}} it prevents the usage of {{invoker.mavenOpts}} within a invoker.properties file.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)