How to configure Maven setting.xml and pom.xml to deploy a snapshot
PREREQUISITES
indentpanel | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 1 |
Before you begin, you must have done the following: | |||||||||||||||||
Panel | |||||||||||||||||||
When you receive confirmaiton that the private repository has been created, you will given the following information: indent | | 1 | 1
snapshot repository name\\
Team ID\\
Team list name\\
|
\\ You will need the above information to configure your Maven project so that it can access your snapshot repository.\\ |
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
These instuctions assume the following:
|
Overview
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
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.
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. In the settings.xml, the <username> element must be deploy#string.
|
Panel |
---|
The snapshot repositories can be accessed by using either http or https. If you want to use https, then you must enable Maven for SSL operations. Click here for instructions on how to use SSL with Maven. Using https is highly recommended when using snapshot repositories. |
...
|
1. the settings.xml <server> element configuration
Panel | ||
---|---|---|
Add a <server> element to settings.xml file.
|
...
2. the Maven pom.xml <distributionManagement> element configuration
Panel | ||
---|---|---|
A snapshot repository can be accessed directly by adding the <distributionManagement> element below to your pom.xml:
note: In the above <url> tag, snapshotRepo must be replaced with the name of your snapshot repository. |