Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Plugin Information

View Pipeline Maven Integration on the plugin site for more information.

Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:

This plugin is still work in progress, no releases yet.

This plugin provides integration with Pipeline, configures maven environment to use within a pipeline job by calling sh mvn or bat mvn.

It allows the use of various parameter to properly configure maven.

An example pipeline script using the plugin would be:

   // 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(mavenInstallation: 'M3', mavenLocalRepo: '.repository', mavenSettingsConfig: 'maven-settings-for-gameoflife') {
    // Run the maven build
    sh "mvn clean install"

In the above example the following parameters are use to configure maven:

  • mavenInstallation: 'M3' Maven Installation will be used, this installation has to be declared in the Global Jenkins configuration or Tool installations page. 
  • mavenLocalRepo: a local repository folder is specified to avoid shared repositories
  • mavenSettingsConfig: specifies an specific settings.xml configuration from File Configuration Provider plugin, allowing the replacement of variables and credentials.

  • No labels