The instructions on this page describe how to importing a Plan from a Maven 2 project. A Plan defines everything about your entire build process. Plans:
Every plan belongs to a Project. Projects and plans can only be configured by Bamboo administrators (see Creating a Plan). | On this page: |
Import a Maven 2 Project
If you have the details for a Plan set up in your Maven 2 project, Bamboo can check out and parse the pom.xml
from this project and create a new Plan using the details from it. This feature will not work with Maven 1 projects.
*To create a new Plan from a Maven 2 pom.xml
file:*
- Start the Create Plan wizard as described on Creating a Plan and click 'Import a Maven 2 Project'.
- Specify a source repository configuration that will initially be used for building this Plan's Default Job and also defines the 'default source repository' (or Plan's repository), which Jobs in this Plan can inherit.
For details, refer to the following source repository configuration procedures (from step 4), since many of these fields and options change depending on the 'Repository' you select:- CVS
- Subversion
- Perforce
- Mercurial
If you specify a CVS or Subversion source code management system, then the location you configure in the respective CVS Root or Repository URL fields should contain your Maven 2 project's
pom.xml
file.
- Click the 'Import' button to display the Confirm Plan Details page.
- On the Confirm Plan Details page, some of the fields should already have been populated with information from your
pom.xml
file. Confirm the following (making any necessary modifications):- Plan Details in the top section of the page — for more information about these fields, refer to the Plan Details section in the Create a New Plan procedure above.
- Source Repository — for more information about these fields, refer to step 1 of this procedure.
- In the Enable this plan section, choose whether or not to enable this Plan. Enabling the Plan instructs Bamboo to commence executing builds of the Plan based on the Plan's Build Strategy (defined above). To enable this Plan, select the 'Yes please!' check box.
- Click the 'Confirm' button to save your Plan configuration so far and the Builder tab of the Plan's Default Job is displayed.
- Select the type of 'Builder' that will be used for building this Default Job.
In practice, you should leave the Builder option set to your 'Maven 2' builder and configure the options on this page as described in Bamboo's Maven configuration documentation. You can select another builder here but this would only be useful if your Maven 2 project's
pom.xml
depended on a non-Maven 2 builder. If you do need to specify a non-Maven 2 builder, refer to the Builder Configuration section in the Create a New Plan procedure above.
If you wish to configure more Plan options, please refer to Editing a Plan.
Screenshots above: Importing a Plan from Maven 2
Notes
Security Manager settings too strict — Please note, during the Maven import process, the project file (
pom.xml
or other specified by the user) is analysed using the maven-embedder library. The parent POM files will be examined in the local repository or downloaded from network repositories. In order to reuse Maven's credentials for the network repositories, Bamboo requires internal access to the maven-embedder. If your JVM's or web container's SecurityManager settings are too strict, this process will fail and you will see an error similar to the following in your Bamboo logs:"Problem while initializing Maven Embedder. Probably Security Manager settings are too strict, refer to http://tomcat.apache.org/tomcat-6.0-doc/security-manager-howto.html"
If your imported Maven project file uses repositories that require credentials (i.e. not public or local), you will need to adjust the SecurityManager settings for your JVM or web container appropriately for the import to work.
- By default, all Plans created by importing a Maven 2 project use the Polling the Repository for changes Build Strategy, below, which you can later change when editing this Plan. You can configure Bamboo to automatically start an initial build for a new Plan, even if you have selected the Manual & dependent builds only Build Strategy. To do so, add the
fire.initial.build.for.manual.strategy
to your bamboo.cfg.xml file as described in Configuring System Properties.
Related Topics
Creating a Plan
Creating a New Plan
Cloning an Existing Plan