Skip to content

Adapt Java version detection to support JEP-322#3892

Merged
bmuschko merged 1 commit intogradle:masterfrom
jasontedor:jep-322
Dec 26, 2017
Merged

Adapt Java version detection to support JEP-322#3892
bmuschko merged 1 commit intogradle:masterfrom
jasontedor:jep-322

Conversation

@jasontedor
Copy link
Copy Markdown
Contributor

JEP-322 is a modification to the Java versioning scheme to accommodate the time-based release model that the JDK is moving to. Starting with JDK 10-ea build 36, the changes from this version scheme are in play and the version dection logic now breaks because of the addition of the java.version.date to the version output. This commit adjusts for that. Additionally, future LTS releases of the JDK will contain an appended " LTS" as well, so this commit adjuts for that too.

Signed-off-by: Jason Tedor jason@tedor.me

Closes #3849

JEP-322 is a modification to the Java versioning scheme to accommodate
the time-based release model that the JDK is moving to. Starting with
JDK 10-ea build 36, the changes from this version scheme are in play and
the version dection logic now breaks because of the addition of the
java.version.date to the version output. This commit adjusts for
that. Additionally, future LTS releases of the JDK will contain an
appended " LTS" as well, so this commit adjuts for that too.

Signed-off-by: Jason Tedor <jason@tedor.me>
@bmuschko bmuschko self-assigned this Dec 22, 2017
@bmuschko bmuschko added a:bug This doesn't work as expected from:contributor labels Dec 22, 2017
@bmuschko bmuschko added this to the 4.5 RC1 milestone Dec 22, 2017
@bmuschko
Copy link
Copy Markdown
Contributor

Thanks for providing this pull request. I opened a similar one yesterday but yours covers a bit more. I am going to merge your PR soon plus you get the credit. :-)

@jasontedor
Copy link
Copy Markdown
Contributor Author

I am so sorry for missing yours! Thanks for taking mine, I am happy to have contributed.

@bmuschko bmuschko merged commit b645d9b into gradle:master Dec 26, 2017
@jasontedor jasontedor deleted the jep-322 branch December 26, 2017 22:16
@bmuschko
Copy link
Copy Markdown
Contributor

@jasontedor No worries. Your pull request has been merged. Thanks again for your contribution.

@bmuschko bmuschko changed the title Adapt version detection to JEP-322 Adapt Java version detection to JEP-322 Dec 26, 2017
@bmuschko bmuschko changed the title Adapt Java version detection to JEP-322 Adapt Java version detection to support JEP-322 Dec 26, 2017
@yay
Copy link
Copy Markdown

yay commented Feb 22, 2018

Looks like a regression to me with Gradle 4.5.1 and Java 10:

Could not determine Java version using executable /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/java.

$ /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/java --version
java 10 2018-03-20
Java(TM) SE Runtime Environment 18.3 (build 10+44)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+44, mixed mode)

@oehme
Copy link
Copy Markdown
Contributor

oehme commented Feb 23, 2018

@yay would you mind opening a new issue? Comments on closed issues easily get lost.

@yay
Copy link
Copy Markdown

yay commented Feb 23, 2018

Sure, there you go: #4503

dliappis pushed a commit to dliappis/rally that referenced this pull request Mar 27, 2018
Similar to the work done for elastic#387, following the merge of the
Elasticsearch PR[1], Rally needs to require java-10 to build
Elasticsearch from source.

Bump the configuration version to 14 and adjust migration of existing
configs to support building with java-10. Also add needed test cases.

Note that building from source with java-10 requires, at minimum,
gradle 4.5[2]. This helps us remove a number of additional gradle
options that were needed for java-9. So for now, building will fail
with gradle <4.5, which will won't be a worry at all once we start
using `./gradlew`; this is tracked in issue#412.

Closes elastic#450

[1] elastic/elasticsearch#29174
[2] gradle/gradle#3892
dliappis pushed a commit to dliappis/rally that referenced this pull request Mar 27, 2018
Similar to the work done for elastic#387, following the merge of the
Elasticsearch PR[1], Rally needs to require java-10 to build
Elasticsearch from source.

Bump the configuration version to 14 and adjust migration of existing
configs to support building with java-10. Also add needed test cases
and update docs.

Note that building from source with java-10 requires, at minimum,
gradle 4.5[2]. This helps us remove a number of additional gradle
options that were needed for java-9. So for now, building will fail
with gradle <4.5, which will won't be a worry at all once we start
using `./gradlew`; this is tracked in issue#412.

Closes elastic#450

[1] elastic/elasticsearch#29174
[2] gradle/gradle#3892
dliappis added a commit to elastic/rally that referenced this pull request Mar 28, 2018
Similar to the work done for #387, following the merge of the
Elasticsearch PR[1], Rally needs to require java-10 to build
Elasticsearch from source.

Bump the configuration version to 14 and adjust migration of existing
configs to support building with java-10. Also add needed test cases
and update docs.

Note that building from source with java-10 requires, at minimum,
gradle 4.5[2]. This helps us remove a number of additional gradle
options that were needed for java-9. So for now, building will fail
with gradle <4.5, which will won't be a worry at all once we start
using `./gradlew`; this is tracked in issue#412.

Closes #450
Relates #451 

[1] elastic/elasticsearch#29174
[2] gradle/gradle#3892
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:bug This doesn't work as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants