Enable Maven to push Artifact to Artifactory
Tech-Today

Enable Maven to push Artifact to Artifactory


This is done in ubuntu 11.10

  1. Open /home//.m2/settings.xml or create the file if it does not exists.
  2. 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]




- How To Invoke A Jenkins Build From Assembla On Git Push
This tutorial will try to configure a jenkins job to run when a git push is done on Assembla. This tutorial assumes that your server is running in Ubuntu 12.04.2. Requirements: You must have an assembla account with admin privilege.An external server...

- How To Push External Jar Into Artifactory Using Maven
This code assumes that you already have artifactory setup. And your local settings.xml allows you to push external jars into it. To do that you only need to setup your artifactory's username and password.  Here is the code, it uploads the file...

- Deploy A J2ee Ear In Glassfish Using Maven
The ff code will explain how a j2ee ear project can be deploy by invoking a maven goal. The plugin: http://maven-glassfish-plugin.java.net/deploy-mojo.html To deploy to a glassfish server using maven, invoke (inside your ear project): mvn glassfish:deploy...

- Maven Return Code Is: 401, Reasonphrase:user Anonymous Is Not Permitted To Deploy
If you ever encounter the error stated about when performing maven deploy, it means you did not specify your repository's account for validation when you invoke maven deploy. Or settings.xml is not set inside your .m2 directory. To do so follow this...

- Could Not Resolve Dependencies For Project Com.xxxjar:-snapshot: Failed To Collect Dependencies For
I just have this weird problem using maven + artifactory. I have a project which I first build using maven-compiler 2.3.2, and maven2. It build successfully and I was able to deploy in artifatory 2.5. Eventually I've added several modules and one...



Tech-Today








.