Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How to configure Maven setting.xml and pom.xml to access a Nexus private repository

PREREQUISITES

panel
indentpanel
11

Before

you

begin,

you

must

have

done

the

following:



  • Requested and received confirmation that a private Nexus repository has been created.

    When you receive confirmaiton that the private repository has been created, you will given the following information:

    indent
    1
    1
    repository name\\
    repository group name\\
    Team ID\\
    Team list name\\
    

    You will need the above information to configure your Maven project so that it can access the private repository.

...

Panel

Configuring a Maven project to access a private repository requires setting up a name/password pair in the settings.xml file and associating the name/password with a specific repository which is defined in the project's pom.xml.

Items 1 and 2 below give the syntax of the entries for both the settings.xml and pom.xml files.  It is important to note the following:

  1. The <id> element that is used in both the setting.xml (found in the <server> element) and the pom.xml (found in the <repository> element) is what associates the name/password pair with the private repository.  The <id> element in both places must be identical.  It can be anything you want it to be, the only restriction is that they must be identical.

  2. In the settings.xml, the <password> element must be the Team list name that was given to you when you received your repository confirmation.  Refer to the PREREQUISITES section above.

  3. In the settings.xml, the <username> element must be build#string.

...