How to manually deploy artifacts in Nexus Repository Manager OSS 3
Solution 1
This is implemented in Nexus since Version 3.9.0.
- Login
- Select Upload
- Fill out form and upload Artifact
Solution 2
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 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.
Solution 4
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 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
Related videos on Youtube
Paweł Głowacz
The best programmf**ker in this lost world... Time to eradicate some code or libs. A good plan violently executed now is better than a perfect plan executed next week.
Updated on June 19, 2021Comments
-
Paweł Głowacz about 3 years
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.
-
grajsek over 7 yearsIn my answer here I explained both approaches - for http and https.
-
user2649601 over 7 yearswhy on earth would they leave out this essential piece of functionality?
-
István Rábel about 7 yearsSince the upload GUI still not part of Nexus 3, we have created a lightweight solution to provide the missing interface. You can host a html page in a raw repository of your Nexus3 instance, and when you access that page from the browser, it will provide an upload GUI similar to the one in Nexus2. The project can be found on GitHub with detailed documentation. The released version at the time of this answer supports GAV style and raw uploads as well.
-
-
demaniak about 7 yearsAs time goes by this is turning out to be a MASSIVE PITA.
-
TOUDIdel over 6 yearsBut only for Windows users?
-
Ron Badur over 6 yearsAt this moment, yes
-
John Glassman about 6 yearsWe had 3.7 installed and the feature matrix was saying this should exist (3.10 is now current). I was going mad trying to figure out how it was implemented. This answer was very helpful. I'd up vote you 10 times if I could.
-
Arkadi about 6 yearsBower (hosted) repositories don't have upload feature :/
-
Varun Verma almost 4 years@tobias what's the typical value for extension?
-
17hao over 3 years@Varun Verma filename extension e.g. jar