If you use Maven for your development or you manage a Maven repository inside your company then you need a Maven repository manager and Nexus is hands-down the best choice. Today Sonatype announced the release of Nexus 1.0, the easiest to use, enterprise-ready Maven repository manager.
Nexus serves as a proxy between your organization and public Maven repositories and as an easy-to-use deployment target for your own, possible commerical artifacts.
Nexus acts as a cache of artifacts between your organization and any public Maven repository. This means that artifacts and their dependencies only need to be downloaded once. I run Nexus locally on my laptop for this purpose and after the first download of artifacts, my builds sped up tremendously. I've done this since it was called Proximity because it works very well.
A shared, internal Maven repository inside of a company can be a very efficient way to share snapshots and releases of internal projects. Using Nexus dramatically simplifies this task and saves large amounts of time and effort.
Start Using Nexus in Minutes
If you want to speed up your Maven builds, follow these steps:
- Download Nexus
- Start up Nexus ($NEXUS_HOME/bin/nexus start)
- Drop this settings.xml in your ~/.m2/ directory
- Perform a Maven build
You might need to add more repositories to Nexus, but it's a cakewalk! Trust me, Nexus will simplify your use of Maven.
Thanks for this Bruce. I've been meaning to try out Nexus but didn't realize how easy it was till your post. :)
ReplyDeleteBTW did you notice a big speed increase over your previous mirroring system? I did.
Awesome! I'm glad this post helped you, Jon. I left a comment on your blog post, too. IMO, use of Nexus is just a no-brainer.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteHow does Nexus compare with Artifactory? My company has been happily using that for a while, and I'm curious which is better.
ReplyDeleteSee for yourself the Maven Repository Manager Feature Matrix
ReplyDeleteAlso, you can try out the search capabilities on Sonatype's public repo
It was very interesting for me to read the post. Thanks for it. I like such topics and anything that is connected to them. I would like to read more on that blog soon.
ReplyDeleteHi Can you send me the Settings.xml to vsvarun1988@gmail.com
ReplyDeleteThe following settings.xml used to work, I'm not sure if it still does:
ReplyDelete<settings>
<mirrors>
<mirror>
<!--This is used to direct the public snapshots repo in the
profile below over to a different nexus group -->
<id>nexus-public-snapshots</id>
<mirrorOf>public-snapshots</mirrorOf>
<url>http://localhost:8081/nexus/content/groups/public-snapshots</url>
</mirror>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>development</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<!-- this profile will allow snapshots to be searched when activated -->
<id>public-snapshots</id>
<repositories>
<repository>
<id>public-snapshots</id>
<url>http://public-snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public-snapshots</id>
<url>http://public-snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>development</activeProfile>
<activeProfile>public-snapshots</activeProfile>
</activeProfiles>
</settings>