-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Maven Toolchains Support for JavaToolInstaller #16492
Comments
Add Maven Toolchains declaration generation based on the JDK input parameters
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
Yeah, I'd still like to see this. The GitHub Actions version works like a charm. |
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
Yeah, I'd still like to see this. The GitHub Actions version works like a charm. |
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
Yeah, I'd still like to see this. The GitHub Actions version works like a charm. |
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
Yeah, I'd still like to see this. The GitHub Actions version works like a charm. |
Required Information
Question, Bug, or Feature?
Type: Feature
Enter Task Name: JavaToolInstaller
Environment
Issue Description
The
JavaToolInstaller
can be used to install JDKs for consumption by tasks in pipelines. It already offers a number of features such as exporting theJDK_HOME
environment variable so tools such as Maven and Gradle can pick the JDKs up more easily. This feature can be improved further by providing a Maven Toolchains Declaration.This requires putting a toolchains.xml file with the proper definitions into the $HOME/.m2 location of the current user, i.e. the one running Maven.
This would allow using
JavaToolInstaller
with less overhead in projects that have Maven toolchain requirements configured and also allow Gradle to pick up JDK locations automatically starting with 7.4.To generate a useful and valid toolchains declaration for a particular JDK the following information is necessary:
1.6
,8
,16
,17
)/path/to/jdk
)Optionally, some additional useful information can be made available offering finer grained control over the toolchains declaration:
The
toolchains.xml
exists only once and can be extended to contain any number of known JDKs and allow detection/usage by Maven and Gradle. So multipleJavaToolInstaller
(or matrix?) invocations should be chainable and generate a full toolchains declaration. Any other tooling just builds on top of this and makes usingJavaToolInstaller
easier. This is also the reason why this shouldn't be put into theMaven
setup tasks instead – because lots of projects now just use the Maven Wrapper nowadays.Related to this actions/setup-java#276.
The text was updated successfully, but these errors were encountered: