jira-importer commented on issue #635:
URL: 
https://github.com/apache/maven-invoker-plugin/issues/635#issuecomment-2957810077

   **[Stephan 
Schroevers](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=stephan202)**
 commented
   
   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:
   
   ```
   $ 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.
   ```
   
   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).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to