indigo-dc / jenkins-pipeline-library

Jenkins pipeline library with common functionalities for CI/CD environments, mainly targeted for the implementation of the SQA baseline requirements from https://indigo-dc.github.io/sqa-baseline/
Apache License 2.0
11 stars 6 forks source link

Maven tool support #134

Open samuelbernardolip opened 3 years ago

samuelbernardolip commented 3 years ago

Support maven builder for JVM related projects.

Some of the supported parameters are to define a custom pom.xml file and an array, where each entry are the arguments to pass to each mvn command (possible to run multiple times after each build): mvn [options] [<goal(s)>] [<phase(s)>]

mvn options: http://manpages.org/mvn

Both parameters are optional with the default values:

The support for running multiple phases independently is relevant to check current project build when things go wrong.

The mvn -f flag will be set automatically by the maven builder with file parameter. The relative path ./ references the workdir defined inside docker container. Full path is supported. The file path also sets the working space for building the project (not required to run cd command).

Jenkins references: https://wiki.jenkins.io/display/JENKINS/Building+a+maven2+project https://wiki.jenkins.io/display/JENKINS/Building+a+software+project