What is the best repository for Maven?

Asked

Viewed 401 times

3

Sometimes I can’t find the dependencies in a repository, so where should I look for those dependencies? Is there a core where all possible dependencies will be there?

1 answer

5


TD;DR

There is no "best repository".

Discover the official repository

Each project is hosted in a repository. At most it can be mirrored in other repositories.

For example, Jboss projects have their own repository where you find all the products in their latest versions, but after a while the repository is synchronized with the Central of Maven. Then it is recommended to add the Jboss repository to your project if you want to get the latest updates.

To know the official repository of a library, you should always look at the documentation or the official website.

Private repositories

It is important to remember that each company usually has its own private/internal repository to store the artifacts of its developing products.

Therefore, it is always good to keep your file settings.xml updated with company standards. Check with those responsible about the standard. Also, configure the respective additional repositories in each project that requires artifacts that are not in Central.

Determining and searching dependencies

If you have questions about any dependency, you can search on sites like MVN Repository, which is nothing more than a Maven Central indexer.

Unfortunately, sometimes finding a specific dependency is not enough. Many projects require a set of dependencies that is nothing intuitive to discover. This is common in JEE projects.

In such cases, it is best to look for an example of a project instead of trying to guess all the dependencies needed to work with a technology, after all this may vary according to the type of project.

For example, depending on the Application Server used in a web application, you may have to configure your pom differently, as these servers provide different libraries.

  • Thank you. I’ve noticed some simple projects I’m analyzing an example that uses Mac web application. I was in doubt because there were some dependencies difficult to find.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.