Vivaswan
Vivaswan

Reputation: 337

Adding third party libraries to Sonatype Nexus repository OSS

Procedure for adding third party libraries to Sonatype Nexus central repository.

Upvotes: 5

Views: 8880

Answers (3)

ergonaut
ergonaut

Reputation: 7057

On Version nexus 3.13.0-01 through the web interface logged on as the admin, do the following:

You have to set up a repository:

Click on Capabilities
Click on Repositories
Click on "Create Repositories"
Click on "maven2 (hosted)"
Update the name to be "thirdparty"
Click "Create Repository"

Then upload your assets:

Click on Browse
Click on "thirdparty"
Click on Upload Component

Or do it via the command line, something like:

curl -v --user admin:admin123 --upload-file ./foo.bar http://localhost:8080/repository/thirdparty/somedirectory/casefile/123/foo.bar

Upvotes: 1

Lyju I Edwinson
Lyju I Edwinson

Reputation: 1844

Using Maven deploy plugin,

  1. In your maven settings.xml configure your local repository details Check this reference

  2. Upload your jar using maven deploy command, like below.

mvn -e deploy:deploy-file -DgroupId=com.myapp.fantastic -DartifactId=myfattasticapp -Dversion=1.1.0 -Dpackaging=jar -Dfile=myfantasticapp.jar -DgeneratePom=true -DrepositoryId=my-repo -Durl=http://mylocalrepohost:8081/repository/maven-releases/

Upvotes: 0

Ruudy Garcia
Ruudy Garcia

Reputation: 139

This is already explained in Nexus documentation : http://blog.sonatype.com/2008/11/adding-a-jar-to-a-maven-repository-with-sonatype-nexus/

Upvotes: 3

Related Questions