Alex Rivera | Logout

Caching the repository index in m2eclipse

Asked 2009-07-24T15:17:13.963
9

everytime i start with a fresh new workspace, m2eclipse downloads nexus-maven-repository-index.gz from the maven central repository. this is good. but, some times, i just want to start a new workspace, and not wait for it to download, it tried copying the whole .metadata directory from an old workspace to the new one, but the list of maven artifacts are still empty. is there a way i can cache it? or at least download the file once, and the copy/extract/repackage it so that m2eclipse thinks it has already downloaded it and allows me to search for maven artifacts.

or a short version of the question where and in what format is the "nexus-maven-repository-index.gz" file stored in the workspace?

Edit
Report

1 Answer

9

The index is stored in the plugin's metadata location, i.e.

[workspace root]/.metadata/.plugins/org.maven.ide.eclipse/nexus

There will be one folder for each remote repository index in use.

You can configure the plugin to not download the index at startup too. Got to Window->Preferences->Maven and uncheck Download repository indexes at startup, you'll have to remember to reactivate it to get any updates though

Update: I just verified that copying the metadata works. M2Eclipse will still contact the repository to download the deltas (assuming the above option is checked), but that only takes a few moments as it is only downloading the deltas.

answered 2009-07-24T15:30:16.173

Your Answer