How to manually deploy artifacts in Nexus Repository Manager OSS 3

This isn't currently implemented in the UI in Nexus 3 (see https://issues.sonatype.org/browse/NEXUS-10121). You'll need to use curl or mvn deploy or some other option.


I'm using maven deploy file.

mvn deploy:deploy-file -DgroupId=my.group.id \
    -DartifactId=my-artifact-id \
    -Dversion=1.0.0.1 \
    -Dpackaging=jar \
    -Dfile=foo.jar \
    -DgeneratePom=true \
    -DrepositoryId=my-repo \
    -Durl=http://my-nexus-server.com:8081/repository/maven-releases/

UPDATE: As stated in comments using quotes in url cause NoSuchElementException

But I have add server config in my maven (~/.m2/settings.xml).

<servers>
  <server>
    <id>my-repo</id>
    <username>admin</username>
    <password>admin123</password>
  </server>
</servers>

References:

Maven Apache - Guide 3rd party jars


You can upload artifacts via their native publishing capabilities (e.g. maven deploy, npm publish).

You can also upload artifacts to "raw" repositories via a simple curl request, e.g.

curl --fail -u admin:admin123 --upload-file foo.jar 'http://my-nexus-server.com:8081/repository/my-raw-repo/'

This is implemented in Nexus since Version 3.9.0.

  • Login
  • Select Upload

enter image description here

  • Fill out form and upload Artifact

enter image description here