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
Proper way of using a Maven toolchain? #617
Comments
Hello @LorenzoBettini, Thank you for creating the issue and we will look into it :) |
Hello @LorenzoBettini, I have tried reproducing the issue but I am unable to. I have attached screenshots of the workflow where I am able to use toolchains.xml as expected. Please consider sharing a public repository for us to examine the workflow and pom.xml file, or provide the steps to reproduce the issue. Thank you. |
@mahabaleshwars thank you for the verification. |
@mahabaleshwars could you please share the project you have used? |
Hello @LorenzoBettini,I'm pleased to share with you a link to a public repository. Here, you'll find a successful implementation of the workflow and pom profile that aligns with your project. I believe it could be useful for your reference. |
@mahabaleshwars thank you for sharing this. I'll examine that further. That is, copy the toolchains.xml generated by the action into another directory (i.e., the root of the git repository) and refer to that with the |
Hello @LorenzoBettini, could you please verify if the provided repository assisted you in resolving the issue? |
This action generates a
toolchains.xml
file in.m2/toolchains.xml
according to the arguments passed to the setup action; however, Maven (its toolchain plugin) does not seem to detect the needed information.In my workflow I have (
runs-on: ubuntu-latest
):which seems to work as expected:
Then, in my Maven POM I have this profile, which is correctly activated:
However, during the build the plugin doesn't seem to find the toolchain:
It looks like it ignores the generated toolchains since it refers to JDK 17, which is never mentioned in my workflow.
Am I doing anything wrong?
The text was updated successfully, but these errors were encountered: