View Source

QuickBuild is able to integrate with the popular build tool - [Maven|http://maven.apache.org]. A Maven build step can be added by selecting menu item _Build -> Maven_ from the step menu.
h1. Configure Maven command location

QuickBuild calls the command _mvn_ to run Maven build. If this command is not in system path, you will need to specify its location in plugin setting of the Maven plugin through [plugin management] page.
Further more, mvn command location can be specified on a per-node basis by following below steps:
# Open Maven plugin setting page and set the property _Maven Executable Path_ as:
{code}
${node.getAttribute("mvnPath")}
{code}
# For each node that does not have command _mvn_ on system path, [define the user attribute|Working with Build Grid#define user attributes] _mvnPath_ to point to the actual _mvn_ command path, for example:
{code}
mvnPath=/home/robin/bin/mvn
{code}
In case of user agent node, the user attribute need to be defined [in this way|Manage User Agent#define user attributes].

Please note that in above example, the _mvnPath_ user attribute is just for demonstration purpose. You can use any other user attribute name.

h1. Control build version

If you want to control the build version from QuickBuild side, please follow below steps:
# Change the POM file and define the project version as _$\{buildVersion\}_. Do not forget to commit the file into your SCM after change.
# Define a build property like below when define the Maven build step:
{code}
buildVersion=${build.version}
{code}