Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Maven Settings Config (mavenSettingsConfig): * Select a maven Maven settings element file from Config File Provider Plugin allowing the replacement of server credentials credentials and variable substitutions as configured in Config File Provider Plugin. The settings element in the settings.xml file contains elements used to define values which configure Maven execution in various ways, like the pom.xml, but should not be bundled to any specific project, or distributed to an audience. See also settings.xml reference
  • Maven Settings File Path (mavenSettingsFilePath): Specify a maven Maven settings.xml file. The specified path can be absolute or relative to the workspace. Shell-like environment variable expansions work in this field, by using the ${VARIABLE} syntax. The file existence is checked on the build agent, if found, that one is used. If not found it will be checked on the master. The settings element in the settings.xml file contains elements used to define values which configure Maven execution in various ways, like the pom.xml, but should not be bundled to any specific project, or distributed to an audience. These include values such as the local repository location, alternate remote repository servers, and authentication information.
    There are two locations where a settings.xml file per default may live:
    • The Maven install - default: $M2_HOME/conf/settings.xml
    • A user's install - default: ${user.home}/.m2/settings.xml
      The former settings.xml are also called global settings, the latter settings.xml are referred to as user settings. If both files exists, their contents gets merged, with the user-specific settings.xml being dominant.
  • Maven Global Settings Config (globalMavenSettingsConfig): Select a maven global settings file from Config File Provider Plugin.
  • Maven Global Settings File Path (globalMavenSettingsFilePath): Specify a global Maven settings.xml file. The specified path can be absolute or relative to the workspace. Shell-like environment variable expansions work in this field, by using the ${VARIABLE} syntax.
  • Maven JVM Opts (mavenOpts): Specify JVM specific options needed when launching Maven as an external process, these are not maven specific options. See: Java Options
    Shell-like environment variable expansions work in this field, by using the ${VARIABLE} syntax.

...

Code Block
node{
    // Mark the code checkout 'stage'....
    stage 'Checkout'

    // Get some code from a GitHub repository
    git url: 'https://github.com/alvarolobato/maven_test.git'

    // Mark the code build
    stage 'Build'

    withMaven(
            maven: 'M3', mavenLocalRepo:
'.repository',             mavenSettingsConfig: 'maven-settings-for-gameoflife', 
            mavenLocalRepo: '.repository') {

        // Run the maven build
        sh "mvn clean install"
    }
}

...

  • JENKINS-39134 -  Fix exception after resuming a build
  • Allow defining global maven Maven settings by config file path (globalMavenSettingsConfig) and config by file path (globalMavenSettingsFilePath)
  • JENKINS-40142 - Snippet generator was creating parameters even if they were left empty

...