This video demonstrates how easy it is to add dependencies using m2eclipse. Because m2eclipse understands how to interact with a repository index, it can quickly locate a dependency by class name or by GAV coordinate. Don’t know which artifact contains a particular class? Just start writing code and use an Eclipse Quick Fix to search all Maven repositories for an artifact that contains a particular class. Want to inspect and browse a Maven repository? Don’t use a web browser. Use the built-in dependency search feature in m2eclipse.
Nexus is more than just a repository manager. It is a project that has been developed using the same underlying infrastructure of Maven, and it has forced us to think about the different ways in which the components that comprise Maven can be integrated with other, more complex systems. It is a critical step toward a more mature Maven ecosystem which starts to encompass much more than just software builds. You can think of Nexus as the second major project to emerge from the Maven ecosystem – an ecosystem which includes both commercial interests as well as open source volunteers and community participants.
Sonatype is focused on improving the foundational infrastructure which will allow us to improve the quality of artifacts and their accompanying metadata in Maven Central and Maven repositories around the world. A lot of this is not especially glamorous work and though many people complain about the state of some of the Maven repositories, very few take action. Here are some of the things Sonatype is doing with Nexus to improve the state of the Maven ecosystem and expand its scope.
It’s a fundamental tenet of Maven that release artifacts never change once they are released. This is enforced in Maven by the fact that once a release artifact or POM is located in the local repository, Maven will never check for an updated artifact in a remote repository. Once an artifact is released, it is considered a static, unchanging artifact. If you release an artifact and then subsequently change it (intentionally or otherwise), you’re in for some fun as people will have different versions based on when they first retrieved it… that’s a situation not exactly conducive to a repeatable, standard build. This blog post discusses a feature in Nexus 1.4 which can enforce this rule and help you avoid problems caused by the redeployment of release artifacts.
Type in an artifact or group identifier, a class name, or a checksum.
Press Enter.
Once you have located the artifact you were looking for, click on the artifact and copy the dependency XML from Nexus to your POM. It couldn’t get any easier or intuitive. Make sure to bookmark http://repository.sonatype.org.
The m2eclipse plugin allows you to browse and manipulate repository indexes. Using the Maven Repository view in m2eclipse you can:
Browse your Local Maven repository
Browse global repositories such as the Central Maven repository
Browse a repository which captures artifacts generated by Maven projects in your Eclipse workspace
Rebuild a Nexus Index from scratch
Update a Nexus Index with incremental changes
Modify the scope of repository indexing with a “minimal” or “full” index
Disable Indexing for a repository
Materialize a Maven project from information stored in a POM
For more information about this new view, see Browsing and Manipulating Maven Repositories in Edition 0.6 of Developing with Eclipse and Maven. Read on to find out how to open this view in m2eclipse.
Nexus gives you control over the repositories your builds interact with. It can also provide you with an easier way to publish, distribute, and manage the software applications you create. You can get started by downloading Nexus Professional and reading the free Nexus book.