CONTROLLED DATA
Leidos Proprietary - US Citizens ONLY
The information contained herein is proprietary to Leidos, Inc. It may not be used, reproduced, disclosed, or exported without the written approval of Leidos.

Bamboo is special. It wants you to use the artifactory server for your maven dependencies, but artifactory also requires a special service account to access the public repository (username/password). How does one use this artifactory server for maven without polluting their local build or source repository? You have to create a separate maven settings.xml file that is referenced and pulled in to your build plan in bamoo. Like this...

Step-by-step guide

You may have your settings.xml in a different repository that you want to pull in during the build. You can get settings.xml as follows:

  1. Link the other repository. Repositories are setup at the build plan level or can be shared across all builds if generally applicable. Add the repository that contains your settings.xml file to your build. In the case of GSMO, this is the dsf-sdo Bitbucket repository.
  2. Edit your Job in Builds >> All Build Plans >> Build name >> Actions >> Configure Build 
  3. Add a new Source Code Checkout task before the Maven task. 
  4. Select the repository (e.g. dsf-sdo) as the Repository for the task
  5. Add a Checkout Directory (it will be added if it doesn't exist) and save
    eg: dsf-sdo 

  6. In your Maven Task, add the relative path to the beginning of the Goal field and save
    eg: -s dsf-sdo/maven-settings/mySettings.xml


 

The GSMO dsf-sdo repository has a default maven settings file already created to reference the default artifactory maven central repository. However, your build may need additional reflected repositories setup. If that is the case, you can copy the default settings.xml file in the sdo-dsf respository and add whatever is required to make your build work. Checkin/commit your settings file and reference it from your bamboo build. Just don't mess with the default settings.xml file provided for SDO.