Skip to content

Commit

Permalink
Adding build and runtime support for open jdk 11 (#71)
Browse files Browse the repository at this point in the history
* openjdk8 EOL - switching to openjdk11
* switching to openjdk8
* switching back to oraclejdk8
* Attempting to fix for openjdk11
* Add unit test output to build on failure
* sync with upstream
* Adding build and runtime support for open jdk 11
  • Loading branch information
anishasaket authored and neoword committed Jan 3, 2019
1 parent e9f7d46 commit c5d1987
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 10 deletions.
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"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [0.4.1] - SNAPSHOT
### Changed
- Adding un-annotated `streamName` path param to streamUpsert HTTP resource (#69)
- Updated pom.xml to remove unused retrofit library, and clean up some versioning (#70)

### Removed
- Deleted TODO/Documentation that referenced incorrect `http://localhost:8081/healthcheck` (#64)
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# run 'STREAM_REGISTRY_DEBUG_SUSPEND=y make debug' in order to enable suspend
STREAM_REGISTRY_DEBUG_SUSPEND ?= n
STREAM_REGISTRY_DEBUG_PORT ?= 5105

STREAM_REGISTRY_HEAP_OPTS ?= -Xmx2g
STREAM_REGISTRY_JAVA_OPTS = $(STREAM_REGISTRY_HEAP_OPTS) --add-opens java.base/java.lang=ALL-UNNAMED -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -Djava.awt.headless=true
STREAM_REGISTRY_DEBUG_OPTS = $(STREAM_REGISTRY_JAVA_OPTS) --add-opens java.base/java.lang=ALL-UNNAMED -agentlib:jdwp=transport=dt_socket,server=y,suspend=$(STREAM_REGISTRY_DEBUG_SUSPEND),address=$(STREAM_REGISTRY_DEBUG_PORT)

.PHONY: clean tests build run debug all just-deploy deploy ci-setup ci-deploy

Expand All @@ -13,10 +18,10 @@ 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
MAVEN_OPTS="$(STREAM_REGISTRY_JAVA_OPTS)" ./mvnw exec:java

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
MAVEN_OPTS="$(STREAM_REGISTRY_DEBUG_OPTS)" ./mvnw exec:java

all: build

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>

<!-- 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>${asm.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down
97 changes: 91 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@
<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>

<asm.version>7.0</asm.version>

<!--Encoding-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Expand All @@ -64,7 +66,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 @@ -92,7 +94,7 @@

<!-- Swagger -->
<dropwizard-swagger.version>1.1.2-1</dropwizard-swagger.version>
<swagger.version>1.5.13</swagger.version>
<swagger.version>1.5.21</swagger.version>

<!-- Kafka + Confluent versions-->
<scala.version>2.11</scala.version>
Expand All @@ -115,10 +117,10 @@
<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>

<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>

<!-- OSSRH -->
<nexusStaging.pluginVersion>1.6.7</nexusStaging.pluginVersion>
Expand Down Expand Up @@ -200,6 +202,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 +363,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 +381,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 +418,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 +450,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>${asm.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down Expand Up @@ -508,6 +544,13 @@
<configuration>
<failOnError>false</failOnError>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
Expand Down Expand Up @@ -561,10 +604,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>${asm.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -623,6 +675,39 @@
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
<configuration>
<mainClass>${mainClass}</mainClass>
<includePluginDependencies>true</includePluginDependencies>
<arguments>
<!-- Standard Dropwizard app arguments -->
<argument>server</argument>
<argument>${project.basedir}/config-dev.yaml</argument>
</arguments>
</configuration>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>stream-registry-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kafka-infra-provider</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
Expand Down

0 comments on commit c5d1987

Please sign in to comment.