Running Maven

This section describes how to invoke a Maven build.

Method

The Maven definition should be set up as a part of a build step:

  step{
    maven{
      <MAVEN_PARAMETERS>
    }
  }

The following parameters should be defined:

  • goals(String goals)

    Specifies the goals to execute including other command line options

  • mavenInstallation(String name)

    Specifies the Maven installation for executing this step By default, we have the ADOP Maven installation available to use.

Example

The following snippet should go inside the job definition:

    steps {
        maven {
            goals('clean install -DskipTests')
            mavenInstallation("ADOP Maven")
        }
    }

More details here: