Maven cache m2e big _bd.cfs file What are they

When looking at the Maven repository folder, I found all the Jar files are only less than 200M on disk, but the whole directory occupied 2.8GB of disk space. Why so huge?

Then I found the culprit here:

Here m2e is a Maven plugin that provides integration for Maven into Eclipse, and the cfs(Compound File format) files are Lucene index file used by m2e plugin.

The plugin caches Lucene index in two places. Per-workspace indexes are stored under .metadata/.plugins/org.eclipse.m2e.core/nexus and there is also a global cache in ~/.m2/repository/.cache/m2e/${m2e.version}.

It's a Lucene index used by Nexus the Maven Repository Manager, m2e plugin will use the index to retrieve information about artifacts, for example complete your typing when editing POM file.

Is it safe to delete the cfs file?

Since it's just a "cache", technically it should be no problem to delete it, if your workflow are not affected by the absent of the index.

If you are not sure, move and back it up, if there are no problems occur, you can safely delete it. For what I observed.

Where it comes from

If your Maven plugin has this option Download repository index updates on startup checked, Eclipse will try to download the file when you create a new Gradle project.

Uncheck it if it's not what you desired.

If you still want to update sometimes, you can do it manually as follows: Window -> Show View -> Other -> Maven -> Maven Repositories. Locate Global Repositories -> central and right click it and then select Update Index item.