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).
|
Example:
job:
name: doc_job
project-type: maven
maven:
root-module:
group-id: org.example.docs
artifact-id: example-guide
root-pom: doc/src/pom.xml
goals: "clean generate-sources"
maven-opts: '-Dmyvar=/path/somewhere'
maven-name: Maven3
automatic-archiving: true