diffplug / spotless

Keep your code spotless
Apache License 2.0
4.42k stars 448 forks source link

Embed p2 lockfiles for Eclipse JDT #1996

Open nedtwigg opened 7 months ago

nedtwigg commented 7 months ago

Starting with plugin-gradle 6.17.0 and plugin-maven 2.35.0, all our eclipse-based formatters migrated to use the equo p2 client. This means that they download their dependencies from the p2 repositories where the upstream Eclipse projects publish their jars. The downside is that it doesn't use the normal maven caching & proxies

Relative to other ecosystems, the Eclipse steps have needed a lot more maintenance and had a lot less contributor interest.

We used to solve the p2 -> maven gap by bundling fat jars. Eventually we lost contributor interest to keep that maintained, so we switched to the equo p2 client, which lets us stay up to date with less maintenance burden.

For EclipseJDT, the jars are actually available on maven, we wouldn't have to use the p2 client if we brought back the lockfiles, and with Equo we could make those lockfiles in a more repeatable, easy to maintain way. That would bring at least Eclipse JDT fully back into maven world. If Eclipse CDT or Groovy ever get on board with maven, we could use the same approach there too.

PRs welcome :)

BrotherPatrix commented 1 month ago

"The downside is that it doesn't use the normal maven caching & proxies" This does not help offline builds in restrictive networks. We are not allowed to use internet connection, we had to copy maven dependencies in a nexus repository also closed from the internet and managed to make this work after a ton of paperwork and audits and virus scanning, but because of this plugin trying to download outside dependencies is really bad because we are unable to access the internet. At least give us the options and documentation to provide these libraries manually because this is really not helping me at least.