I am new to Sonatype Nexus and Maven and trying examples as given in Maven by Example.
I have a problem deploying artifacts generated by Maven to Nexus running on Linux.
If my pom.xml
has 'localhost:8081' as the repository, the deployment is a success. If I replace localhost with an IP address (10.193.4.5:8081) deployment fails with 'Access denied' error. Details below.
Error:
Downloading: h ttp://10.193.4.5:8081/nexus/content/repositories/snapshots/org/sonatype/mavenbook/simple/parent/0.8-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.sonatype.mavenbook.simple:parent:0.8-SNAPSHOT/maven-metadata.xml from/to testing
(http://10.193.4.5:8081/nexus/content/repositories/snapshots): Access denied to: http://10.193.4.5:8081/nexus/content/repositories/snapshots/org/sonatype/mavenbook/simple/parent/0.8-SNAPSHOT/maven-metadata.xml
org.sonatype.aether.transfer.MetadataTransferException:
Could not transfer metadata org.sonatype.mavenbook.simple:parent:0.8-SNAPSHOT/maven-metadata.xml from/to testing (http://10.193.4.5:8081/nexus/content/repositories/snapshots): Access denied to:
http://10.193.4.5:8081/nexus/content/repositories/snapshots/org/sonatype/mavenbook/simple/parent/0.8-SNAPSHOT/maven-metadata.xml
My configuration details are as follows.
- Nexus (nexus-oss-webapp-1.9.1.1) installed on linux_x64 (RHEL5) as "root" user and running as service
- Maven Apache Maven 3.0.3 (r1075438; 2011-02-28 23:01:09+0530) Maven home: /usr/local/apache-maven/apache-maven-3.0.3 Java version: 1.6.0_16, vendor: Sun Microsystems Inc. Java home: /usr/java1.6.0_16/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "2.6.18-8.el5", arch: "amd64", family: "unix"
settings.xml
snapshots deployment deploymentpom.xml
testing Internal Releases http://10.193.4.5:8081/nexus/content/repositories/snapshots</url>--> http://localhost:8081/nexus/content/repositories/snapshots
I guess this is related to a permission problem on Linux, and I am not able to debug.
- What should be the ideal user for Nexus to run root or Nexus?
- What should be the group and owner for a Sonatype-work folder?