qcastel / github-actions-maven-release

Release your Java application and publish artifacts
129 stars 38 forks source link

Compatible with actions/setup-java #39

Closed philiplourandos closed 3 years ago

philiplourandos commented 3 years ago

I saw on the README documentation that if anyone requires an additional JDK to log a ticket. Is it not possible to set this up with the actions/setup-java? I can see the JDK is in the image in the path: /opt/hostedtoolcache/Java_Zulu_jdk/16.0.2-7/x64/bin/java when using the setup-java action

I've set JAVA_HOME to: /opt/hostedtoolcache/Java_Zulu_jdk/16.0.2-7/ However I receive the following error:

The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE

Is there a way to accommodate this?

Thanks

qcastel commented 3 years ago

Hello @philiplourandos,

I added JDK 16 support, you can now use it using:

env:
 JAVA_HOME: /usr/lib/jvm/java-16-openjdk/

https://github.com/qcastel/github-actions-maven-release#jdk-16

Let me know if it works for you.

Concerning using setup-java, I can see your point and I must say it's more a design choice I mad, which make it incompatible with setup-java: I choose to have this github actions using a docker container behind the scene (that you can find here btw: https://github.com/qcastel/docker-maven-release). Multiple reason for that, as:

Although by making it in a container, some other actions like setup-java, which are basically setting up the github runner, would not work. It's a trend off which I am convinced got more advantages, but can easily understand it's not for everyone.

philiplourandos commented 3 years ago

Let me know if it works for you.

Will give the java 16 a bash now

setup-java

No worries.

Thank you for the response :-)