Build with Maven

Version 7 by Robin Shen
on Aug 07, 2009 05:33.


compared with
Current by Robin Shen
on Oct 02, 2009 00:19.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 3 changes. View first change.

 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, ant 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 ant 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. Build version
  h1. Control 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:
 # 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}
  
 h1. 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:
 !maven.png!
 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.