user697911
user697911

Reputation: 10571

Jars in Maven Central needs to go into Nexus OSS?

I need to set up my own maven repository, since some open sourced libraries are not in Maven Central. I want to use Nexus OSS, and then I can upload the libraries I need to Nexus OSS.

My question is, do I also need to upload those libraries that are originally in Maven Central and I can directly use in POM to Nexus OSS?

Upvotes: 0

Views: 82

Answers (2)

Little Santi
Little Santi

Reputation: 8813

Not at all: In your local $userprofile/.m2/settings.xml file (as well as in every pom.xml, altough is not a good practice) you can define as many repositories as you want. And so, you will be able to reference artifacts published to different repositories.

Upvotes: 1

Paweł Głowacz
Paweł Głowacz

Reputation: 3046

Nexus is a proxy for global repositories. You can define in Nexus configuration what repositories are you going to use. You do not need to upload libraries that are accessible from configured global repositories. You can also host your own repository for your local libraries. Everything is configurable.

When you configure your Nexus you need to just connect to it trough maven config and all actions are done behind the scene. Don't worry about it.

All libraries that are needed to compile your project, firstly are downloaded to your Nexus and then from Nexus to your local repo.

For example this is the easiest way to configure Nexus with your maven: Nexus - maven - Configuration

Upvotes: 1

Related Questions