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.
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:
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.
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/'
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
My team use Gradle and Nexus OSS 3.5.2,
I have found a solution: upload artyfacts from locakhost (I checked Nexus documentation and did not found anything about uploading artifacts from folders) => I have shared directory (use Apache httpd) and connected one to created new Nexus proxy repository. Now when I want to add my own artifacts I can upload ones into shared directory in my remote server.
Maybe someone find my solution useful:
My question is here: Is it possible to deploy artifacts from local folder in Sonatype Nexus Repository Manager 3.x
For Windows:
mvn deploy:deploy-file -DgroupId=joda-time -DartifactId=joda-time -Dversion=2.7 -Dpackaging=jar -Dfile=joda-time-2.7.jar
-DgeneratePom=true -DrepositoryId=[Your ID] -Durl=[YourURL]
来源:https://stackoverflow.com/questions/37543120/how-to-manually-deploy-artifacts-in-nexus-repository-manager-oss-3