You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/01/07 12:52:00 UTC

[GitHub] [maven-mvnd] Stephan202 commented on issue #572: Support for MAVEN_OPTS

Stephan202 commented on issue #572:
URL: https://github.com/apache/maven-mvnd/issues/572#issuecomment-1007383778


   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.jvmArgs` system property.
   - The `MAVEN_OPTS` environment property.
   - The `mvnd.properties` properties file.
   
   Afaik most software follows these rules. Examples include [Spring](https://docs.spring.io/spring-boot/docs/2.5.1/reference/html/features.html#features.external-config) and the [AWS SDK](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/auth/credentials/DefaultCredentialsProvider.html).


-- 
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-unsubscribe@maven.apache.org

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