maven-mvnd
maven-mvnd copied to clipboard
Support for MAVEN_OPTS
It would make sense to support the MAVEN_OPTS environment variable.
See https://github.com/apache/maven-mvnd/issues/567
Two caveats come to my mind:
- I use both
mvnandmvndand I might want to have lessXmxformvnthan formvndwill I be able to reach that? - Precendence between
MAVEN_OPTSandmvnd.jvmArgs: would one replace the other? Or would we try to merge both before passing the args tojava?
Two-cents drive-by comment: generally more specific settings should override more general settings. System properties are more specific than environment variables, since the former are per-JVM, while an environment can contain multiple JVMs. Similarly, between on-disk properties and environment properties I would say that the latter should take precedence, since the latter can be specificed per-process, while the former apply to all processes.
I.e., in order from highest to lower precedence:
- The
mvnd.jvmArgssystem property. - The
MAVEN_OPTSenvironment property. - The
mvnd.propertiesproperties file.
Afaik most software follows these rules. Examples include Spring and the AWS SDK.