How to Use a Maven settings.xml from outside the local repository

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

目的

If you intend to reference files (e.g. settings.xml) for Maven that are located in a separate directory or repository, you will need to use Maven arguments to reference them.

 

ソリューション

If you are using a settings.xml from a different local directory

  1. Edit your Job in Builds >> All Build Plans >> Build name >> Actions >> Configure Build 
  2. In your Maven Task, add the relative path to the beginning of the Goal field 
    eg: -s maven-settings-dir/settings.xml

  3. Save the Task

If you are pulling settings.xml from a different repository

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, if needed
  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 your other repository as the Repository for the task
  5. Add a Checkout Directory (it will be added if it doesn't exist) and save
    eg: maven-settings-dir 

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

If you have any questions about this process, please reach out to Atlassian Support

最終更新日 2016 年 9 月 28 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.