This repository contains the Jenkins shared library that defines the standard build process for Apache Maven subprojects.
It consist of two different entry points (custom steps)
which can be referenced from Maven repo’s Jenkinsfile:
-
os: array of possible os to build projects (default:['linux']) -
jdks: array of jdks used for the build (default:['8','11','17', '21']) -
maven: array of maven versions used for build (default:['3.6.x', '3.9.x']) -
siteJdk: array of jdks used for the site build (default:[11']) -
siteMvn: jdk used to build the site (default:3.9.x) -
tmpWs: boolean to shorten working directory on windows platform -
fetchDepth: optional git fetch depth for checkout; values> 0enable shallow checkout with that depth, values⇐ 0force non-shallow checkout. When not set the organization value is used. -
branchesToNotify: array of branches to send notifications of the build (default:['master', 'main'])
Example to use a specific set of jdks and maven core
asfMavenTlpPlgnBuild(jdks:[ "8", "11" ], maven: ["3.8.x"])
// checkout with explicit non-shallow clone
asfMavenTlpPlgnBuild(fetchDepth: 0)-
os: array of possible os to build projects (default:['linux']) -
jdks: array of jdks used for the build (default:['8','11','17', '21']) -
maven: maven versions used for build (default:3.9.x) -
tmpWs: boolean to shorten working directory on windows platform -
fetchDepth: optional git fetch depth for checkout; values> 0enable shallow checkout with that depth, values⇐ 0force non-shallow checkout. When not set the organization value is used. -
branchesToNotify: array of branches to send notifications of the build and deploy artifacts (default:['master', 'main'])
Example to use a specific set of jdks and maven core
asfMavenTlpStdBuild(jdks:[ "8", "11" ], maven: "3.6.x")
// checkout with explicit non-shallow clone
asfMavenTlpStdBuild(fetchDepth: 0)This library is configured globally in ci-maven.apache.org system settings with name maven-jenkins-lib.
The master branch is loaded implicitly.
You can reference another branch via @Library('maven-jenkins-lib@mybranch') _.
This library uses custom steps provided by Apache Maven Jenkins Environment Shared Library which helps referencing proper JDK/Maven installations available in Jenkins.