Specify jdk version in path independent way with ant builds with ConsoleLauncher #5390
Unanswered
mebigfatguy
asked this question in
Q&A
Replies: 1 comment
-
|
I'm by no means an export using Ant. The problem you're describing is not specific to the console launcher, though. I'm not aware that Ant supports anything like Gradle's toolchains which would address the problem of being able to specify a JRE/JDK version for a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks we have an ant build that runs junit 5 tests, using org.junit.platform.console.ConsoleLauncher thru the
<java>task.our
<javac>tasks use release="17" So the code is compiled with 17. I am asking for there is some similar thing that can be specified with ConsoleLauncher.The reason for this, is we also use eclipse which requires jdk21. Thus in our systems we have jdk21, but then in eclipse we specify 17. we have tests that use SimpleDateFormat to parse a string like
"2/20/26, 2:00 PM"
and that works fine, because eclipse runs the tests in jdk 17
However from the command line, jdk21 is in force, and the defaulit en_US format has changed to remove the comma so
the above string fails to parse, we'd need to use
"2/20/26 2:00 PM"
It would be nice if ConsoleLauncher could enforce a version of the jdk in the running of tests, without having to specify paths which breaks across many users (unless you add more configurable properties which is messy.)
Beta Was this translation helpful? Give feedback.
All reactions