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

Adding build and runtime support for open jdk 11 #71

Merged
merged 19 commits into from
Jan 3, 2019
Merged

Adding build and runtime support for open jdk 11 #71

merged 19 commits into from
Jan 3, 2019

Conversation

saketanisha
Copy link
Contributor

@saketanisha saketanisha commented Dec 23, 2018

stream-registry PR

Tweaked stream-registry base pom to build and run against Open JDK 11

Changed

  • Updated base pom.xml with jaxb-api dependency
  • Update core/pom.xml to consume jaxb-api dependency at runtime
  • Updated maven plugin version to latest
  • Updated java.version to 11 in base pom.xml
  • Added --add-opens java.base/java.lang=ALL-UNNAMED option to java command in Makefile. This is to alleviate Illegal reflective access by com.fasterxml.jackson.module.afterburner.util.MyClassLoader to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int). We may revisit this in near future once the underlying 3rd party libs extends support for JDK 11

PR Checklist Forms

  • CHANGELOG.md updated
  • Reviewer assigned
  • PR assigned (presumably to submitter)
  • Labels added (enhancement, bug, documentation)

@neoword
Copy link
Contributor

neoword commented Dec 23, 2018

nice! reviewing now.

@neoword neoword added this to the 0.5.0 milestone Dec 23, 2018
@neoword neoword added the enhancement New feature or request label Dec 23, 2018
@neoword neoword self-requested a review December 23, 2018 19:58
Makefile Outdated
@@ -13,7 +13,7 @@ build:
./mvnw clean install -B

run:
java -Xmx2G -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -Djava.awt.headless=true -jar assembly/target/stream-registry*SNAPSHOT.jar server config-dev.yaml
java --add-opens java.base/java.lang=ALL-UNNAMED -Xmx2G -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -Djava.awt.headless=true -jar assembly/target/stream-registry*SNAPSHOT.jar server config-dev.yaml
Copy link
Contributor

@neoword neoword Dec 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to leave a comment or reference for others in a breadcrumb comment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

along with instructions of what to add when we target jdk11 runtime (vs jdk8 runtime)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a rebase. The run command no longer looks like this

https://github.com/homeaway/stream-registry/blob/master/Makefile#L20-L21

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-based saketanisha:openjdk11 with homeaway:master. As part of the merge updated STREAM_REGISTRY_JAVA_OPTS and STREAM_REGISTRY_DEBUG_OPTS in Makefile with appropriate JDK flag ( i.e. --add-opens java.base/java.lang=ALL-UNNAMED )

<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<scope>runtime</scope>
</dependency>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we specify this scope at the parent level?

Copy link
Contributor

@neoword neoword Dec 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also.. since this was deprecated in jdk9 doesn't this mean the jdk runtime will not supply it anymore?

If we are expecting this at runtime should we add a --add_modules to startup scripts?

https://blog.codefx.org/java/five-command-line-options-hack-java-module-system/

Copy link
Contributor

@neoword neoword Dec 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous comment (--add_modules) ... disregard.

We still want to target JDK8 runtime for now for clients that haven't switched to JDK11. We will likely fix this when we switch to JDK11 target runtime in some future release.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved <scope>runtime</scope> to parent pom.xml

core/pom.xml Outdated
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>7.0</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7.0 is repeated a lot. Can we make it a property?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to asm.version property.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where's the change ? ${asm.version}

core/pom.xml Outdated
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>7.0</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where's the change ? ${asm.version}

@neoword
Copy link
Contributor

neoword commented Jan 2, 2019

Update CHANGELOG.md with the changes made in this PR. Please target a new milestone:
0.5.0 - SNAPSHOT as change merits a minor bump at a minimum.

@neoword neoword merged commit c5d1987 into ExpediaGroup:openjdk11 Jan 3, 2019
@saketanisha saketanisha deleted the openjdk11 branch January 12, 2019 04:31
@neoword neoword modified the milestones: 0.5.0, 0.4.2 Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants