Showing posts with label java maven nexus. Show all posts
Showing posts with label java maven nexus. Show all posts

09 September 2008

Nexus Not Finding Artifacts After Adding a Repository?



In my last post about Nexus, I provided some steps to get started quickly using Nexus. After adding some additional repositories, I found that Nexus doesn't always immediately handle the indexes as it should causing some builds to not be able to locate certain artifacts, so I took the following measures to rectify the situation.

After adding some repositories, sometimes I had to clear the cache for the public groups and reindex them using the following steps:


  1. Under the Views section, click on Browse Repositories

  2. Right-click on the Public Repositories group and select Clear Cache

  3. Right-click on the Public Repositories group and select Reindex

  4. Right-click on the Public Snapshot Repositories group and select Clear Cache

  5. Right-click on the Public Snapshot Repositories group and select Reindex



After following the steps above, Nexus happily reindexed the repositories I added and artifacts were located successfully.

At one point, I also had to manually publish the indexes for the public groups using the following steps:


  1. Under the Administration section, click Scheduled Tasks

  2. Click the Add button

  3. Give the task a name

  4. Task Type is Publish Indexes

  5. Repository/Group is Public Repositories (Group)

  6. Recurrance is Once



Upon doing this manual step, Nexus again started humming along.

26 August 2008

Do You Use Maven? If So, You Need Nexus



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:


  1. Download Nexus

  2. Start up Nexus ($NEXUS_HOME/bin/nexus start)

  3. Drop this settings.xml in your ~/.m2/ directory

  4. 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.