Nexus Maven Repository Manager: Making Open Source Easier


July 6, 2008 By Jason van Zyl

Nexus is getting a lot of traction lately as we see several open source organizations indexing their repositories with Nexus (or the stand-alone Nexus Indexer) and official adoption by all IDEs.

You can see on the list of Maven repositories indexed with Nexus that we have a some big names in OSS providing Nexus indices which are of great value to IDE users. You can see in m2eclipse that the index provides the raw material for some pretty advanced features.

  1. Maven Repository View
  2. Dependency Tree View
  3. Dependency content assist in the POM structured editor
  4. Dependency content assist in the POM form editor

These last two features really make is possible to stay in your IDE while trying to find a specific Maven dependency. The information about any dependency is now at your finger tips.

Although I’ve highlighted m2eclipse, Nexus indexes have been integrated into Netbeans and IDEA as well. Netbeans has had Nexus support for quite some time, and IDEA should have Nexus integration in the up coming IDEA 8.0 release. Milos has some examples of how to add Nexus indexed repositories and some examples of code completion in Netbeans using Nexus indices. I was told at JavaOne by Dmitry Jemerov that the Jetbrains folks were already integrating with Nexus indices so it will be interesting to see how that turns out.

Nexus itself has a very cool feature where it can not only proxy Maven repositories, but it can also proxy their indices to provide a federated searching capability. So within your organization if you use several several OSS Maven repositories you can configure them within Nexus and get a unified search capability across all of these repositories. This feature is also incredibly useful for organizations who have many internal sites and want to be able to search across all of them uniformly from one location. It is obviously easier to get real-time updates to Nexus indices if you run Nexus itself, but we’ve cleanly separated the Nexus Indexer as a stand-alone tool so you can index any file-based Maven repository. The more OSS organizations use Nexus, or the Nexus Indexer, the more users are going to know about what exists. This obviously benefits Maven users, but every Java-based build tool made these days integrates with Maven repositories and the Nexus indices can be leveraged in those tools as well.

For those not familiar with the general benefits of using a Maven repository manager you can check out the chapter in the Maven book about the Nexus Maven Repository Manager.