ContextMapper / context-mapper-cli

Context Mapper Command Line Interface (CLI)
https://contextmapper.org/
Apache License 2.0
13 stars 3 forks source link

Support of newer Java versions #10

Closed gottfriedsz closed 4 months ago

gottfriedsz commented 1 year ago

Hard coded java versions prevents the CLI from starting and using newer versions. The error message shown is the following and only solution is to switch to different Java version.

Invalid Java version '20', please set JAVA_HOME to major version '11' or '17'

https://github.com/ContextMapper/context-mapper-cli/blob/afb29c0300aab82166884dcc83e53f5053f1bb59/src/main/java/org/contextmapper/cli/ContextMapperCLI.java#L28

stefan-ka commented 7 months ago

Thanks for reporting this @gottfriedsz!

You are right, we should improve that check there... Will try to have a look at it as soon as possible. PR's are always welcome as well ;)

marcomima commented 4 months ago

HI @stefan-ka What is the reason that the check even exists? As Java 21 LTS is now out since september we would like to update our application and the context-mapper is one of the known blockers for us.

stefan-ka commented 4 months ago

Hi @marcomima

You are right, we should at least remove the upper bound. The check should only validate that the Java version is >11. This was introduced during times when Xtext and therefore Context Mapper where not compatible with Java >17.

Of course we would first have to test whether Context Mapper actually works with Java 21 but without the check we would at least not limit it and it "could" work :)

I'll remove it and create a CLI release.

stefan-ka commented 4 months ago

@marcomima @gottfriedsz

Please use the just released version 6.11.1 of the context-mapper-cli. Seems to work with Java 21. Please let me know if you face any issues.