[
https://issues.apache.org/jira/browse/MNG-6962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov updated MNG-6962:
--------------------------------
Fix Version/s: wontfix-candidate
> jvm.config via command line flags
> ---------------------------------
>
> Key: MNG-6962
> URL: https://issues.apache.org/jira/browse/MNG-6962
> Project: Maven
> Issue Type: New Feature
> Components: core
> Reporter: John Patrick
> Priority: Major
> Fix For: wontfix-candidate
>
>
> 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)