Maven ProjectΒΆ

The Maven Project module handles creating Maven Jenkins projects.

To create a Maven project, specify maven in the project-type attribute to the Job definition. It also requires a maven section in the Job definition.

Job Parameters:
  • root-module:
    • group-id (str): GroupId.
    • artifact-id (str): ArtifactId.
  • root-pom (str): The path to the pom.xml file. (defaults to pom.xml)

  • goals (str): Goals to execute. (required)

  • maven-opts (str): Java options to pass to maven (aka MAVEN_OPTS)

  • maven-name (str): Installation of maven which should be used. Not setting maven-name appears to use the first maven install defined in the global jenkins config.

  • private-repository (‘str’): Whether to use a private maven repository Possible values are default, local-to-workspace and local-to-executor.

  • ignore-upstream-changes (bool): Do not start a build whenever a SNAPSHOT dependency is built or not. (defaults to true)

  • automatic-archiving (bool): Activate automatic artifact archiving (defaults to true).

  • settings (str): Path to custom maven settings file (optional)

  • global-settings (str): Path to custom maven global settings file (optional)

Example:

project-type: maven
maven:
  root-pom: pom.xml
  goals: deploy
  root-module:
    group-id: gabba.gabba
    artifact-id: hey
  settings: test
  global-settings: test

Previous topic

Freestyle Project

Next topic

Matrix Project

This Page