Unlike other answers, do not forget to save .m2/*.xml (your settings) and .m2/repository (strictly not necessary, but Maven will have to download half of the Internet again).
Now for this .cache folder: if you open Eclipse, M2Eclipse will sometimes run a task similar to “Downloading repository indexes”. These indexes allow you to quickly find an artifact using the M2E Add Addiction wizard if you know (part) of its artifact identifier. It should put the downloaded index files somewhere, and according to http://dev.eclipse.org/mhonarc/lists/m2e-users/msg02486.html the .cache folder is where they go:
Also note that m2e stores at least three copies of each index repository. Source .gz files downloaded from remote repositories. generic lucene instance used to optimize the processing time of gz files. And lucene indexes for workspaces. The first two are stored in the local repository directory .cache / m2e, the last of which is behind the workspace.
The Lucene materials they are talking about have additional optimized search databases, this speeds up the M2E search for this artifact if you enter only the incomplete artifact identifier or group identifier.
If I read http://dev.eclipse.org/mhonarc/lists/m2e-users/msg01708.html correctly, then it would be safe to delete them:
m2e caches the lucene index in two places. Workspace indexes are stored in .metadata / .plugins / org.eclipse.m2e.core / nexus and there is also a global cache in ~ / .m2 / repository / .cache / m2e / $ {m2e.version}.
Try clearing the caches and see if the problem persists.
Keep in mind that M2E will see the missing folder the next time you open Eclipse, so be prepared to wait until it loads all the repository indexes again!
JBert May 08 '13 at 15:50 2013-05-08 15:50
source share