Build with Maven

You are viewing an old version (v. 6) of this page.
The latest version is v. 8, last edited on Oct 02, 2009 (view differences | )
<< View previous version | view page history | view next version >>

QuickBuild is able to integrate with the popular build tool - Maven. A Maven build step can be added by selecting menu item Build -> Maven from the step menu.

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, ant command location can be specified on a per-node basis by following below steps:

  1. Open Maven plugin setting page and set the property Maven Executable Path as:
    ${node.getAttribute("mvnPath")}
    
  2. For each node that does not have command mvn on system path, [define the user attribute] mvnPath to point to the actual ant command path, for example:
    mvnPath=/home/robin/bin/mvn
    

    In case of user agent node, the user attribute need to be defined in this way.

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

Build version

By default, QuickBuild uses the version defined in POM file. For example, if the POM file has the project version defined as 1.0.0, the build version will be 1.0.0. For snapshot builds, the SNAPSHOT suffix will be replaced by the real snapshot timestamp after build if:

  • The maven build step includes a deploy goal.
  • The property Snapshot Repository Access URL is specified in Maven plugin setting page.

If you want to control the build version from QuickBuild side, please follow below steps:

  1. Change the POM file and define the project version as ${buildVersion}. Do not forget to commit the file into your SCM after change.
  2. Define a build property like below when define the Maven build step:
    buildVersion=${build.version}
    

Display artifact links

If your maven build step includes a deploy goal, QuickBuild can be configured to display links to artifacts deployed to remote Maven repository like below:

To do this, you will need to specify the property Repository Access URL in Maven plugin setting page. For snapshot builds, the property Snapshot Repository Access URL should be specified instead.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.