Bamboo 4.2 : Importing a Maven 2 project

This page describes how to import a plan from a Maven 2 project.

Bamboo can check out and parse the pom.xml from a Maven 2 project, and create a new plan using the details from it. This feature is not available for Maven 1 projects.

To create a new plan from a Maven 2 pom.xml file:

  1. Start the Create Plan wizard as described on Creating a plan and click Import a Maven 2 Project. Maven 2 needs to be installed on the Bamboo server machine; see Configuring a new executable.
  2. Specify the details required for Bamboo to locate your Maven 2 project's pom.xml file.
  3. Click Import.
  4. Confirm the details from your pom.xml file that are shown on the 'Confirm Plan Details' page.
  5. Choose whether to enable this plan. Enabling the plan instructs Bamboo to start running builds of the plan, based on the plan's build strategy.
  6. When you click Create, the new plan's 'Plan Summary' page will be displayed.
    (info) Bamboo will automatically run an initial build for your new plan, unless the plan you cloned uses the Manual & dependent builds only build strategy.
  7. Click Confirm to save your plan configuration so far. The Tasks tab of the plan's default job is displayed.
  8. Configure the Maven 2 task options, as described in Maven. You can select a different builder task 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 '2. Configure tasks for the plan' section on Create a new plan.

If you wish to configure more plan options, please refer to Editing a plan's configuration.

Screenshot: 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, but you can change this by 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.

Attachments: