How to manually deploy artifacts in Nexus Repository Manager OSS 3

After installing Nexus Repository Manager OSS 3 I do not see option Artifact Upload to upload artifacts through web page.

In Nexus Repository Manager OSS 2.13 there is option to do that operation.

Anyone can show me the way how to upload artifacts to hosted repository in Nexus 3?

EDIT: From 3.9.0 version, this functionality is implemented.


Solution 1:

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

Solution 2:

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.

Solution 3:

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/'

Solution 4:

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

Solution 5:

My Team built a command line tool for uploading artifacts to nexus 3.x repository, Maybe it's will be helpful for you - Maven Artifacts Uploader