You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "John Patrick (Jira)" <ji...@apache.org> on 2020/07/17 18:33:00 UTC
[jira] [Created] (MNG-6962) jvm.config via command line flags
John Patrick created MNG-6962:
---------------------------------
Summary: jvm.config via command line flags
Key: MNG-6962
URL: https://issues.apache.org/jira/browse/MNG-6962
Project: Maven
Issue Type: Improvement
Components: core
Reporter: John Patrick
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'
}
```
--
This message was sent by Atlassian Jira
(v8.3.4#803005)