You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2021/07/22 20:18:00 UTC

[jira] [Commented] (MNG-6962) jvm.config via command line flags

    [ https://issues.apache.org/jira/browse/MNG-6962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17385753#comment-17385753 ] 

Michael Osipov commented on MNG-6962:
-------------------------------------

The purpose of this file is to be project-*specific* and not agnostic. If you need general values, use {{MAVEN_OPTS}} for this.

> 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)