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
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ notifications:

cache:
directories:
- "$HOME/.m2"
- "$HOME/.m2"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 )


debug:
java -Xmx2G -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -Djava.awt.headless=true -agentlib:jdwp=transport=dt_socket,server=y,suspend=$(STREAM_REGISTRY_DEBUG_SUSPEND),address=5105 -jar assembly/target/stream-registry*SNAPSHOT.jar server config-dev.yaml
Expand Down
15 changes: 14 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@
<artifactId>javax.ws.rs-api</artifactId>
</dependency>

<!-- JDK 11 Changes -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</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


<!-- Test Dependencies -->
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -341,7 +347,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M1</version>
<version>3.0.0-M2</version>
<executions>
<execution>
<goals>
Expand All @@ -353,6 +359,13 @@
</configuration>
</execution>
</executions>
<dependencies>
<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}

</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down
65 changes: 61 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<properties>

<!--Java-->
<java.version>1.8</java.version>
<java.version>11</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

Expand All @@ -64,7 +64,7 @@
<!-- Testing -->
<junit.version>4.12</junit.version>
<hamcrest.version>1.3</hamcrest.version>
<mockito.version>2.18.3</mockito.version>
<mockito.version>2.23.4</mockito.version>
<curator-test.version>2.9.0</curator-test.version>

<!-- Utilities -->
Expand Down Expand Up @@ -115,8 +115,8 @@
<dependency.pluginVersion>3.1.1</dependency.pluginVersion>
<deploy.pluginVersion>3.0.0-M1</deploy.pluginVersion>
<release.pluginVersion>2.5.3</release.pluginVersion>
<mavenCompiler.pluginVersion>3.6.1</mavenCompiler.pluginVersion>
<surefire.pluginVersion>2.21.0</surefire.pluginVersion>
<mavenCompiler.pluginVersion>3.8.0</mavenCompiler.pluginVersion>
<surefire.pluginVersion>3.0.0-M2</surefire.pluginVersion>
<build-helper.maven.plugin.version>3.0.0</build-helper.maven.plugin.version>


Expand Down Expand Up @@ -200,6 +200,10 @@
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>aopalliance-repackaged</artifactId>
</exclusion>
<exclusion>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -357,6 +361,10 @@
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand All @@ -371,6 +379,19 @@
</exclusions>
</dependency>

<!-- JDK 11 changes -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.4.0-b180830.0359</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.24.1-GA</version>
</dependency>

<!-- Test Dependencies -->
<dependency>
<groupId>org.hamcrest</groupId>
Expand All @@ -395,6 +416,12 @@
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
<version>${curator-test.version}</version>
<exclusions>
<exclusion>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
Expand All @@ -421,6 +448,13 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.pluginVersion}</version>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>7.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down Expand Up @@ -508,6 +542,13 @@
<configuration>
<failOnError>false</failOnError>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>7.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
Expand Down Expand Up @@ -561,10 +602,19 @@
<ignoredUnusedDeclaredDependency>org.hamcrest:hamcrest-core:jar:${hamcrest.version}</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>org.slf4j:slf4j-api:jar:${slf4j.version}</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>io.dropwizard:dropwizard-testing:jar:1.3.5</ignoredUnusedDeclaredDependency>
<!-- JDK 11 changes -->
<ignoredUnusedDeclaredDependency>javax.xml.bind:jaxb-api:jar:2.4.0-b180830.0359</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>7.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -623,6 +673,13 @@
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>7.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
Expand Down