How to Enable Maven to Push Artifact to Artifactory
This is done in ubuntu 11.10 Open /home/ /.m2/settings.xml or create the file if it does not exists. Paste the ff code: <?xml ver...
https://www.czetsuyatech.com/2012/05/maven-push-artifact-to-artifactory.html
This is done in ubuntu 11.10
- Open /home/
/.m2/settings.xml or create the file if it does not exists. - Paste the ff code:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>snapshots</id>
<username>maven_user</username>
<password>maven_password</password>
</server>
<server>
<id>release</id>
<username>maven_user</username>
<password>maven_password</password>
</server>
</servers>
</settings>
Otherwise you'll get the error below:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project xxx: Failed to deploy artifacts: Could not transfer artifact com.xxx:xxx:pom:0.0.1-20120602.035740-2 from/to snapshots (http://dev.manila.xxx:8081/artifactory/xxx-repo-snapshots): Failed to transfer file: http://dev.manila.xxx:8081/artifactory/xxx-repo-snapshots/com/xxx/xxx/0.0.1-SNAPSHOT/xxx-0.0.1-20120602.035740-2.pom. Return code is: 401, ReasonPhrase:User anonymous is not permitted to deploy 'com/xxx/xxx/0.0.1-SNAPSHOT/xxx-0.0.1-20120602.035740-2.pom' into 'xxx-repo-snapshots:com/xxx/xxx/0.0.1-SNAPSHOT/xxx-0.0.1-20120602.035740-2.pom'.. -> [Help 1]




Post a Comment