I am trying to add a 3rd party vendor's jar to our internal nexus repository.
I have tried to do so using this command:
mvn deploy:deploy-file
-DgroupId=acme
-DartifactId=acme
-Dversion=1.0
-Dpackaging=jar
-Dfile=C:\tmp\acme-1.0.jar
-DrepositoryId=Nexus
-Durl=http://myserver:8888/nexus/content/repositories/thirdparty/
With the following entry in my settings.xml:
<servers>
<server>
<id>Nexus</id>
<username>myusername</username>
<password>mypassword</password>
</server>
</servers>
But I get this error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:
deploy-file (default-cli) on project standalone-pom: Failed to deploy artifacts:
Could not find artifact acme:acme:jar:1.0 in Nexus (http://myserver:8888/nexus/c
ontent/repositories/thirdparty) -> [Help 1]
Any suggestions?
Some related info... I can install to my local repository just fine, using this command:
mvn install:install-file
-DgroupId=acme
-DartifactId=acme
-Dversion=1.0
-Dpackaging=jar
-Dfile=C:\tmp\acme-1.0.jar
I have also tried 'Artifact Upload' via the Nexus web interface, using GAV parameters:
Group: acme
Artifact: acme
Version: 1.0
Packaging: jar
And selecting & adding the acme-1.0.jar. This completes fine, but "mvn install" on the project depending on this jar results in:
Could not find artifact acme:acme:jar:1.0 in Nexus (http://myserver:8888/nexus/content/groups/public)
My pom contains:
<repositories>
<repository>
<id>Nexus</id>
<url>http://myserver:8888/nexus/content/groups/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
Any help much appreciated...
PS I know this question is very similar to this one, but the issue there seemed to be the use of a jenkins url, instead of a nexus url.