PREREQUISITES
Before you begin, you must have done the following:
These instuctions assume the following:
Overview
Configuring a Maven project to access a snapshot repository requires setting up a name/password pair in the settings.xml file and associating the name/password with a specific distributionManagement 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:
The snapshot repositories can be accessed by using either http or https.
For instructions on how the configure Maven for https, refer to:
1. the settings.xml <server> element configuration
Add a <server> element to settings.xml file.
<servers> ... <server> <id>mySnapshotRepo</id> <username>deploy#string</username> <password>myTeamListName</password> </server> ... </servers>
where myTeamListName has the form dvtl<Team ID>.
Example: if your Team ID is uadev, then the <password> element would be <password>dvtluadev</password>.
2. the Maven pom.xml <distributionManagement> element configuration
A snapshot repository can be accessed directly by adding the <distributionManagement> element below to your pom.xml:
<distributionManagement> ... <repository> <id>mySnapshotRepo</id> <name>This is my snapshot repository</name> <url>https://maven.mit.edu/nexus/content/repositories/snapshotRepo</url> </repository> ... </distributionManagement>
note: In the above <url> tag, snapshotRepo must be replaced with the name of your snapshot repository.