Maven deploy to Nexus repository error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Maven deploy to Nexus repository error

bobpat
This post has NOT been accepted by the mailing list yet.
Hi All,
             I am trying to deploy to Nexus repository, but I am getting following error. Would someone help me?


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:
deploy (default-deploy) on project my-test: Failed to deploy artifacts: Could no
t transfer artifact org.bhavesh:my-test:jar:1.0-20140326.192116-1 from/to deploy
ment (http://localhost:8081/nexus/content/repositories/snapshots/): Failed to tr
ansfer file: http://localhost:8081/nexus/content/repositories/snapshots/org/bhav
esh/my-test/1.0-SNAPSHOT/my-test-1.0-20140326.192116-1.jar. Return code is: 401,
 ReasonPhrase: Unauthorized. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception

-----------------------------------------------------------------------

Here is POM.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.bhavesh</groupId>
  <artifactId>my-test</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>my-test</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

 <distributionManagement> 
    <snapshotRepository>
     <id>deployment</id>
     <name>Internal Releases</name>
     <url>http://localhost:8081/nexus/content/repositories/snapshots/</url>
  </snapshotRepository>
</distributionManagement> 
</project>

-------------------------------------------------------------------------------------

Thanks,
Bob