Once the build definition is created, we will configure the Maven task to give the path to pom.xml
so build definition can use pom.xml
, to compile the source code and create a package file.
Select Maven pom.xml.
In the Maven POM file
, give the path to pom.xml
for the existing project:
Click on the ...
icon to browse through the folders available in the existing project and select the path to pom.xml
:
Scroll down; in our case, select pom.xml
and click on OK
:
In the case of Maven, there are different goals such as compile
, test
, and package
. We will give package
here. If the default goal is available in pom.xml
, then we don't need to explicitly mention it here.
Keep the Test Results Files
setting as it is:
Select Copy Files to: tasks
and keep Source Folder
and Target Folder
as it is. In the Contents
box, enter **/*.war
. It will copy the WAR file available in the source directory of the project from any path and copy it to the staging directory...