spotless icon indicating copy to clipboard operation
spotless copied to clipboard

Leverage Maven local repository for p2 cache directory in Eclipse step

Open kevinleturc opened this issue 1 year ago • 1 comments

This PR brings support of the Maven local repository configuration to store the Equo P2 cache.

This tackles what was mentioned in this comment https://github.com/diffplug/spotless/issues/1687#issuecomment-1862244636. And more precisely the use case described in https://github.com/diffplug/spotless/issues/1797.

I didn't bring such support for Gradle as I lack of knowledge of it.

kevinleturc avatar Aug 28 '24 08:08 kevinleturc

Does this change the location of cached files by default? Or does the user need to opt-in? If they need to opt-in, is that documented anywhere? My preference is to just have good defaults, and I'm okay with improving the defaults.

nedtwigg avatar Aug 28 '24 15:08 nedtwigg

Yes it changes the location of cached files for P2 and maven users, but not in a lot of user installation. P2 stores its data under ${user.home}/.m2/repository/dev/equo/p2-data/ which is the default location for maven users. The proposed improvement is to store P2 data in the configured local maven repository, which is:

  • the default location if not configured: ${user.home}/.m2/repository/dev/equo/p2-data/
  • the local repository referenced in the settings.xml file under /settings/localRepository element
  • the path given on mvn command line with -Dmaven.repo.local=/tmp/repository

The proposed change could also be seen as a fixed because as a maven user you expect downloaded data for build to be stored in the configured local repository.

Into which documentation may I add such change?

kevinleturc avatar Sep 02 '24 11:09 kevinleturc

Roger. Thanks for explaining! No more docs needed.

nedtwigg avatar Sep 03 '24 22:09 nedtwigg