Skip to content

JitPack Fix: Auto-discover JDK toolchain instead of requiring explicit toolchains.xml#361

Merged
CryptoMorin merged 1 commit intoCryptoMorin:masterfrom
demengc:jitpack-fix
Jul 31, 2025
Merged

JitPack Fix: Auto-discover JDK toolchain instead of requiring explicit toolchains.xml#361
CryptoMorin merged 1 commit intoCryptoMorin:masterfrom
demengc:jitpack-fix

Conversation

@demengc
Copy link
Copy Markdown
Contributor

@demengc demengc commented Jul 29, 2025

This fixes JitPack builds and streamlines collaboration by automatically discovering and selecting a JDK toolchain with JDK version ${testJava} (or above). Explicit toolchain declaration in ~/.m2/toolchains.xml is no longer required for new collaborators, and the automatic selection also prevents tools like JitPack from mysteriously attempting to find a Java 6 path (#329).

Successful JitPack build with this change: https://jitpack.io/com/github/demengc/XSeries/ed391d7c76/build.log

Additional information on automatic discovery of JDK toolchains (new in Apache maven-toolchains-plugin v3.2.0): apache/maven-toolchains-plugin#14 / https://maven.apache.org/plugins/maven-toolchains-plugin/select-jdk-toolchain-mojo.html

- Fix JitPack builds and streamline collaboration by automatically discovering and selecting a JDK toolchain with JDK version testJava (or above)
- Explicit toolchain declaration in ~/.m2/toolchains.xml is no longer required
@sonarqubecloud
Copy link
Copy Markdown

@CryptoMorin CryptoMorin added the enhancement New feature or request label Jul 31, 2025
@CryptoMorin CryptoMorin linked an issue Jul 31, 2025 that may be closed by this pull request
@CryptoMorin
Copy link
Copy Markdown
Owner

CryptoMorin commented Jul 31, 2025

Thank you so much! This really makes it much easier.

@CryptoMorin CryptoMorin merged commit 80f8d6e into CryptoMorin:master Jul 31, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JitPack build fails due to misconfigured Maven toolchains plugin

2 participants