-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
choosing Java 11 causes java.version to be set to 1.8 in pom.xml file #739
Comments
Just to add, it is the same for gradle projects too. Selecting Java 11 generates a build.gradle that has this line in it:
|
What version of Boot did you use? You need to select Spring Boot 2.1 to use Java 11, otherwise the Java version is deliberately downgraded to 8 as Boot 2.0 and earlier do not support Java 11. |
@wilkinsona haha, you are absolutely right, that is the piece that I stumbled upon.... Lets close this again. |
I just used what the wizard selects by default. So 2.0.5 release. Arguably this 'silent downgrade' is a bit confusing. Though I guess generating an invalid combination of Boot 2.0 with Java 11, is probably worse. |
Yeah, our opinion is that the silent downgrade is the least bad option. A better one may be some metadata that describes the valid combinations so that it can be sorted out on the client-side. That wouldn't help users creating projects using curl though, and would require changes in the service and clients before it became useful. |
Perhaps we should put some thought into these kinds of scenarios so that the initializer service might provide some kind of diagnostic feedback when user selects a 'invalid' combination of option. I think that would be preferable over just silently changing some of the options. Maybe the service could provide an endpoint to 'validate' a selection of options and it could return a some result indiicating 'this looks okay' or some sensible error message that the wizard could display to the user? Just a thought. Not sure it is worth the effort to develop this. |
@wilkinsona I found this problem using
|
This is the expected behaviour when using Kotlin. Kotlin generates Java 8 byte code and doesn't make any use of Java 11's features (note the #211 and #773 are tracking some changes in this area which may be of interest. |
@wilkinsona I think some sort of indication would be very helpful. Either the Java 8+ options could be disabled, or a pop up with the explanation you provided...anything but crickets. |
I've opened spring-io/start.spring.io#250 so that we can consider our options. |
fixed NPE for golang generators
I create a project and select Java 11 + maven, but the project gets
<java.version>1.8</java.version>
generated.The text was updated successfully, but these errors were encountered: