Skip to content
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

Gretty ignoring the JDK set from the Toolchain #261

Closed
mdeinum opened this issue Aug 14, 2022 · 4 comments
Closed

Gretty ignoring the JDK set from the Toolchain #261

mdeinum opened this issue Aug 14, 2022 · 4 comments

Comments

@mdeinum
Copy link

mdeinum commented Aug 14, 2022

With Gradle you can specify a Java Toolchain to use a certain JDK. Currenty I'm developing for JDK19, although Gradle itself doesn't run (yet) on JDK 19, I can specify a toolchain to point to Java 19 and have my classes compiled and tested with it.

However when using Gretty to launch tomcat that same JDK isn't honoured and falls back to JDK17. Which ofcourse will lead to issues with class compatiblity.

It would be nice if Gretty would take the selected toolchain into consideration when running the server.

@f4lco
Copy link
Collaborator

f4lco commented Aug 16, 2022

I agree, it would be nice to have toolchain support. Do you think you can prepare a patch yourself and do a PR? I would gladly review a patch and help out with a new release.
By the way, are you on 3.x or 4.x?

@mdeinum
Copy link
Author

mdeinum commented Aug 17, 2022

I would need to dig into the plugin and it would be my first gradle thing, but I can have a go.

It took me a while to figure out that I'm on 4 and not on 3. the documentation is still for version 3 and not 4 so it is a bit strange.

@f4lco
Copy link
Collaborator

f4lco commented Aug 17, 2022

Cool @mdeinum! This is definitely an opportunity to learn.

I would need to dig into the plugin and it would be my first gradle thing, but I can have a go.

In case you get stuck, please ask for help/guidance on Gitter/Matrix (find the link on the front page in the README, labeled "chat on gitter") 👍

It took me a while to figure out that I'm on 4 and not on 3. the documentation is still for version 3 and not 4 so it is a bit strange.

Yes, the Gretty docs could improve on that 🙈
At this time, we support both Gretty 3.x and 4.x. Only the list of supported servlet containers differs, "old" servlet containers (Tomcat and Jetty below 10.x) go into Gretty 3.x, and Gretty 4.x picks up the more recent servlet container releases.
Regarding your patch, because the patch will not depend on a particular servlet container, we can port it freely between the two Gretty versions.

@boris-petrov
Copy link
Member

I believe this issue has been resolved in both 3.x and 4.x thanks to @mr-serjey!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants