jenkins the definitive guide

(Jeff_L) #1
<settings...>
<servers>
<server>
<id>nexus-snapshots</id>
<username>scott</username>
<password>tiger</password>
</server>
<server>
<id>nexus-releases</id>
<username>scott</username>
<password>tiger</password>
</server>
</servers>
</settings>

For the more security-minded, you can also encrypt these passwords if required.


Then, enter the corresponding ID value in the Repository ID field in Jenkins. Jenkins will then be able
to look up the right username and password, and deploy your artifacts. Once the build is finished, your
artifacts should be available in your Maven Enterprise Repository (see Figure 5.41, “After deployment
the artifact should be available on your Enterprise Repository Manager”).


Figure 5.41. After deployment the artifact should be available on your Enterprise Repository Manager


Using this option, you always don’t have to deploy straight away—you can always come back and
deploy the artifacts from a previous build later. Just click on the “Redeploy Artifacts” menu on the left
and specify the repository URL you want to deploy your artifact to (see Figure 5.42, “Redeploying an
artifact”). As in the previous example, the Advanced button lets you provide the ID for the
entry in your local settings.xml file. As we will see later on in the book, you can also use this

Free download pdf