After installing Nexus Repository Manager OSS 3 I do not see option Artifact Upload
to upload artifacts through web page.
In Nexus Repository Manager OS
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]
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.
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
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
This is implemented in Nexus since Version 3.9.0.
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