[MNG-6962] jvm.config via command line flags
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 21h 11m
- Merged PRs (30d)
- 312
Description
**[John Patrick](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=nhoj.patrick)** opened **[MNG-6962](https://issues.apache.org/jira/browse/MNG-6962?redirect=false)** and commented
Command line flag to provide location of .mvn/jvm.config
On Jenkins I use https://plugins.jenkins.io/config-file-provider/ to provide a jvm.config file as jenkins is running on a private openshift. So that maven wrapper can download etc it needs to know the http proxy to use. That proxy is different to the developers so we can't check in the file that works for both environments.
At the moment we something likes this;
```
configFileProvider([
configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS'),
configFile(fileId: 'maven-jvm-options', variable: 'MAVEN_JVM_OPTIONS')
]) {
sh 'mkdir .mvn'
sh 'cp ${MAVEN_JVM_OPTIONS} .mvn/jvm.config'
sh './mvnw -s ${MAVEN_SETTINGS} clean package'
}
```
Which feels 2 lines more than it needs to be, ideally it can be collapsed to something like;
```
configFileProvider([
configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS'),
configFile(fileId: 'maven-jvm-options', variable: 'MAVEN_JVM_OPTIONS')
]) {
sh './mvnw -s ${MAVEN_SETTINGS} --jvm-options ${MAVEN_JVM_OPTIONS} clean verify'
}
```
---
No further details from [MNG-6962](https://issues.apache.org/jira/browse/MNG-6962?redirect=false)
Contributor guide
Research direction
Start at the ./mvnw invocation and Maven's command-line option handling, then compare how .mvn/jvm.config is currently discovered. Define the supplied external-file behavior and verify it with command-line tests; done means the Jenkins example works without copying the file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100