Skip to content

Embed p2 lockfiles for Eclipse JDT #1996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nedtwigg opened this issue Jan 15, 2024 · 2 comments
Open

Embed p2 lockfiles for Eclipse JDT #1996

nedtwigg opened this issue Jan 15, 2024 · 2 comments

Comments

@nedtwigg
Copy link
Member

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
Copy link

"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.

@xjtushilei
Copy link

Our network is not very good, I hope we can improve this problem.

cc @hydrogen666

joel-costigliola added a commit to assertj/assertj that referenced this issue Feb 2, 2025
…en-plugin

Without that I get this error locally

[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.44.2:apply (default-cli) on project assertj-core: Execution default-cli of goal com.diffplug.spotless:spotless-maven-plugin:2.44.2:apply failed: java.io.IOException: Failed to load eclipse jdt formatter: java.lang.NumberFormatException: For input string: "" -> [Help 1]
[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.44.2:apply (default-cli) on project assertj-core-spring-boot: Execution default-cli of goal com.diffplug.spotless:spotless-maven-plugin:2.44.2:apply failed: java.io.IOException: Failed to load eclipse jdt formatter: java.lang.RuntimeException: org.tukaani.xz.XZFormatException: Input is not in the XZ format -> [Help 1]

I have tried version 4.34 but that fails, we can try a 4.35 when it's out or diffplug/spotless#1996 is fixed
alanktwong pushed a commit to alanktwong/assertj that referenced this issue Feb 16, 2025
…en-plugin

Without that I get this error locally

[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.44.2:apply (default-cli) on project assertj-core: Execution default-cli of goal com.diffplug.spotless:spotless-maven-plugin:2.44.2:apply failed: java.io.IOException: Failed to load eclipse jdt formatter: java.lang.NumberFormatException: For input string: "" -> [Help 1]
[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.44.2:apply (default-cli) on project assertj-core-spring-boot: Execution default-cli of goal com.diffplug.spotless:spotless-maven-plugin:2.44.2:apply failed: java.io.IOException: Failed to load eclipse jdt formatter: java.lang.RuntimeException: org.tukaani.xz.XZFormatException: Input is not in the XZ format -> [Help 1]

I have tried version 4.34 but that fails, we can try a 4.35 when it's out or diffplug/spotless#1996 is fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants