Visit my.sonatype.com for documentation on Nexus Repository version 2.
If your build fails because of a missing artifact, this is not an index problem. No indexing task can fix that type of failure.
Lucene Indexes in Nexus Repository 2 are used to support Maven 2 format repository search in the UI, they are not needed for builds.
This is important to keep in mind, many people get the idea that if the indexes are not 100% up to date there will be build failures.
Under "administration/scheduled tasks" you will find that there are a number of different indexing tasks available. Here's a brief rundown of the available tasks, and what they are used for.
In general running Update Indexes once a day is all you need to do to keep the Nexus Repository 2 search indexes up to date and in good working order.
Standard Indexing Tasks
- Download Indexes - Downloads and processes index updates from remote servers (like central)
- Publish Indexes - Publishes indexes so they can be downloaded by other clients (like other nexus instances, or m2eclipse)
- Update Indexes - Downloads incremental index updates for proxy repositories, publishes indexes for all repositories specified and updates indexes to include new artifacts that were manually placed into a hosted repository storage directory, with a final optimization.
Advanced Indexing Tasks
- Repair Indexes - Rebuilds all indexes from scratch. It shouldn't be necessary to run this during normal operations. If you have this scheduled to run regularly, there is something wrong and the performance of Nexus Repository 2 will suffer.
- Optimize Indexes - Consolidates Lucene index files on disk. This can be run periodically in order to keep the Lucene indexes from growing too large. As the Update Indexes task already optimizes, running this on a regular basis is only needed in special cases.