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

Build and run Dropwizard on JDK9 #2197

Merged
merged 15 commits into from Nov 10, 2017

Conversation

Projects
None yet
4 participants
@arteam
Member

arteam commented Nov 10, 2017

This change adds a Java profile which allows to compile and run the tests of Dropwizard on JDK9. TravisCI support it on their machines, so we can run the tests automatically for changes and pull requests.

Most of the Dropwizard dependencies are compatible with JDK9 with exceptions of:

  • jadira. I created a pull request there: JadiraOrg/jadira#66, but there's no response. To workaround it, I forked Jadira, applied the patch and published it via jitpack.
  • findbugs (I think we are better of with error-prone anyway)
  • The JDBI module had a bug with converting Instants (in JDK8 Instant had a millesecond resultion, in JDK9 - nanosecond)

So, this change makes sure that we are testing that Dropwizard apps can be successfuly run on JDK9 with the java.xml.bind module enabled.

arteam added some commits Sep 25, 2017

Upgrade maven-javadoc-plugin to 3.0.0-M1
It seems that 2.10.4 uses an outdated `commons-lang` dependency which
doesn't work with Java 9.
Remove the findbugs plugin
Unfortunately, findbugs doesn't support Java 9
Update maven-jar-plugin to 3.0.2
Version 2.6 doesn't seem to work with Java9.
Update maven-source-plugin to 3.0.1
Version 2.4 doesn't seem to work with Java9.
Support nano-time resolution for java.time.Instant
It supports clocks with the nano-time resolution in JDK9 and test
fail because JDBI mappers work only with the millisecond resolution.
Add alpn-client and alpn-server dependencies for Jetty HTTP/2
With Jetty9 we need add them to negotiate the ALPN protocol instead of
using alpn-boot.

@arteam arteam force-pushed the java_9_build branch from cb73e79 to ec26920 Nov 10, 2017

@arteam arteam force-pushed the java_9_build branch from ec26920 to 79b4224 Nov 10, 2017

@arteam arteam changed the title from Build and run Dropwizard with JDK9 to Build and run Dropwizard on JDK9 Nov 10, 2017

@dropwizard dropwizard deleted a comment from coveralls Nov 10, 2017

Add a test for the toString method of DefaultLoggingFactoryTest
Actually, just to pad the coverage stats.
@coveralls

This comment has been minimized.

coveralls commented Nov 10, 2017

Coverage Status

Coverage increased (+0.07%) to 85.582% when pulling 49c9781 on java_9_build into 27aafaf on master.

@isaki

This comment has been minimized.

Contributor

isaki commented Nov 10, 2017

Does this mean that future DropWizard releases will be compiled with the JDK9 compiler or is this purely for compatibility testing?

@arteam

This comment has been minimized.

Member

arteam commented Nov 10, 2017

No, Dropwizard will stay compatible with JDK8. It will be compiled with the JDK9 compiler only if it's set as the default in the system.

@isaki

This comment has been minimized.

Contributor

isaki commented Nov 10, 2017

Awesome, thank you for the information!

@dropwizard dropwizard deleted a comment from coveralls Nov 10, 2017

@jplock jplock added the improvement label Nov 10, 2017

@jplock jplock added this to the 1.3.0 milestone Nov 10, 2017

@jplock

jplock approved these changes Nov 10, 2017

<effort>Max</effort>
<threshold>Default</threshold>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>${basedir}/../findbugs-exclude.xml</excludeFilterFile>

This comment has been minimized.

@jplock

jplock Nov 10, 2017

Member

should we also remove the findbugs-exclude.xml file too?

This comment has been minimized.

@arteam

arteam Nov 10, 2017

Member

Yes, that makes sence!

Remove findbugs-exclude
We ditched findbugs in favor of `error-prone`.
@coveralls

This comment has been minimized.

coveralls commented Nov 10, 2017

Coverage Status

Coverage increased (+1.4%) to 86.932% when pulling 4bc4ceb on java_9_build into 27aafaf on master.

@jplock jplock merged commit a1f4b33 into master Nov 10, 2017

7 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codeclimate All good!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+1.4%) to 86.932%
Details

@jplock jplock deleted the java_9_build branch Nov 10, 2017

sankate pushed a commit to sankate/dropwizard that referenced this pull request Nov 21, 2017

aaanders added a commit to aaanders/dropwizard that referenced this pull request Sep 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment