You will need to tell Maven your credentials to access Artifactory.
Log in to Artifactory, and from your profile, obtain the encrypted password.
Create the file ~/.m2/settings.xml
(~
representing your user home directory, e.g. /home/yourname
or C:\Users\yourname
) if needed, and make sure it contains the <servers>
element as shown below:
<settings xmlns="https://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>maven.jenkins-ci.org</id> (1)
<username>your_user_name_here</username>
<password>your_encrypted_password_here</password>
</server>
</servers>
</settings>
1 |
This is not a valid host name anymore, but still the ID used by default in the Jenkins plugin parent POM.
You may need to add additional <server> entries if your plugin POM overrides the inherited Maven <distributionManagement> , but this should be rare. |