This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

If you run multiple Maven 2.x builders on one server machine which:

  • run under the same user account on that server, but
  • belong to different Bamboo agents,

then by default, these agents will use the same default Maven 2.x artifacts directory: $HOME/.m2/repository (or %USERPROFILE%\.m2\repository for Windows-based servers). This is the directory to which Maven dependency jars are downloaded and where project artifacts are installed during the "install" phase of a Maven 2.x build.

Problems can arise if Bamboo uses these multiple Maven 2.x builders simultaneously. For example, if multiple agents on a single computer, each with a different Maven 2.x builder capability, start to run Maven 2.x builds simultaneously from the queue, the different Maven 2.x builders may attempt to download the same dependency to the same artifacts directory location, resulting in corruption of the downloaded jar and dependency files.

Hence, Bamboo allows you to isolate Maven 2.x builders on an agent-specific basis. If you configure repository isolation for a particular Maven 2.x builder capability, each agent that uses this builder will have its own private Maven 2.x artifacts directory, thereby allowing you to avoid these jar and dependency file corruptions.

Each isolated repository directory has the path:

$BAMBOO_HOME/.m2/AGENT-${agendid}/repository

Be aware that this feature is not available for Maven 1.x builders.

To configure a new local server Builder capability,

  1. Click the 'Administration' link in the top navigation bar.
  2. Click the 'Server Capabilities' link in the left navigation column.
  3. The 'Server Capabilities' screen will be displayed, showing a list of all local server capabilities currently defined in your Bamboo system.
  4. Locate the 'Add Capability' section below the list (see screenshot below).
  5. Select or enter the details for your builder as follows:
    • 'Capability Type' — Select 'Builder'
    • 'Type' — Select 'Maven 2.x'
    • 'Builder Label' — Enter 'Maven 2.x with local repository isolation'
      (info) You can use any label you wish. However, it will help you and your Bamboo users if you enter an appropriate builder label that identifies this Maven 2.x builder as one that uses local repository isolation.
    • 'Path' — Enter the path for your Maven 2.x builder
  6. Click the 'Add' button.
  7. Click the label for the builder you have just added. The builder capability summary screen will be displayed (see the 'Maven 2.x Builder' screenshot below).
  8. Click the 'Edit Capability Configuration' link. The 'Configure Capability' screen will be displayed (see the 'Maven 2.x Repository Isolation' screenshot below).
  9. Select the 'Local repository isolation' check box.
  10. Click the 'Save' button.

When configuring any Maven 2.x builders in Bamboo in which you want to force local repository isolation, ensure that the builder label you use is one that identifies it as such — for example, 'Maven 2.x with local repository isolation'.

Screenshot: Maven 2.x Builder

Screenshot: Maven 2.x Repository Isolation

  • No labels