-
Notifications
You must be signed in to change notification settings - Fork 3
[Feature request] settings.xml #11
Comments
Short answerI'm sorry to disappoint this time around, but I consider build-tool specific features out of scope for this action. Consequently, I'm against adding such a feature. (Stick around for the long answer or jump to the end of this post for a solution.) Long answer"Why did you choose not to add feature X from setup-java?" is a question I have been asked multiple times. However, since I don't recall answering it publicly yet, I will try to do my best to outline my decision process here: Back when I originally forked setup-java it was mainly for two reasons: I wanted to use Hotspot-based JDK builds for testing, and, more importantly, I needed multiple JDKs for a single build step. Frankly, I was disappointed to see build-tool specific functionality added before support for multiple JDKs was even being worked on. (Unfortunately, actions/setup-java#44 still seems to be inactive.) I understand that this was done to make it as easy as possible to setup CI for Java projects using a single action but, in my opinion, this was a step in the wrong direction as I believe that actions should follow the single-responsibility principle as close as possible. Consider the following scenario from setup-java: Notice, how it becomes increasingly difficult to describe the purpose and scope of such an action. Similarly, because of how actions are configured, more and more parameters that are irrelevant for a large chunk of users would have to be added. I strongly believe that the right decision would have been to provide a setup-jdk, and separate setup-{maven|gradle|your_build_tool_goes_here} actions. This has ultimately led me to deliberately narrow the scope for this fork to only focus on setting up the JDK(s). (Hence, the name "install-jdk".) All parameters have a clear meaning and are strictly related to how the JDK is set up. The solutionFor now, I can't recommend any specific tools (since I haven't used Maven to publish aynthing from Actions) but https://github.com/s4u/maven-settings-action looks promising. The futureGoing forward, the upcoming version 2.0.0 of setup-java will probably provide a way to select the JDK vendor and support AdoptOpenJDK binaries. Once this is released, the only niche install-jdk will cater too, is builds that need multiple JDKs at the same time and setup-java and install-jdk are not mutually exclusive. I'll have to think about this and test it but it is likely that in the future the recommendation will be to use setup-java to install your primary JDK (to Such a setup could look like this:
(I'll keep this issue open for further discussion for a while in case anyone is interested.) |
Hi all,
this is a feature request, is it possible to implement the creation of the settings.xml for maven as in the
setup-java action described here:
https://docs.github.com/en/free-pro-team@latest/actions/guides/publishing-java-packages-with-maven
using the AdoptOpenJDK/install-jdk@v1 action
Thanks for your support and for your great project.
The text was updated successfully, but these errors were encountered: