Migrate from Java 6 to Java 11 with Dropwizard 2.1.12#32
Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Open
Migrate from Java 6 to Java 11 with Dropwizard 2.1.12#32devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
- Upgrade Dropwizard BOM from 1.0.5 to 2.1.12, decoupling project version - Add dropwizard-dependencies BOM import - Add JAXB/Jakarta dependencies managed in dependencyManagement for convergence - Update all Maven plugin versions for Java 11 compatibility - Update maven-compiler-plugin to use release 11 instead of source/target 1.6 - Fix @notempty import: org.hibernate.validator.constraints -> javax.validation.constraints - Fix EmployeeDAO namedQuery typing for Dropwizard 2.x Hibernate API - Migrate test from JUnit 3 to JUnit 5 (Jupiter) - Update example.yml ALPN comment (Java 11 has native ALPN support) - Update README to reflect Dropwizard 2.1.12 and Java 11 requirement - Add module-info.class exclusion in shade plugin filter Co-Authored-By: Wes Convery <2wconvery@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the project from Java 6 / Dropwizard 1.0.5 to Java 11 / Dropwizard 2.1.12. This is a major framework upgrade touching build configuration, dependency management, source compatibility, and test infrastructure.
Build & Dependencies (
pom.xml)${project.version}into a<dropwizard.version>property set to2.1.12dropwizard-dependenciesBOM import alongside the existingdropwizard-bomjakarta.xml.bind-api,jaxb-runtime,jakarta.activation-api) with versions pinned in<dependencyManagement>to satisfy dependency convergencesource/target 1.6torelease 11module-info.classexclusion in shade plugin filterSource Changes
EmployeeConfiguration.java:@NotEmptyimport moved from deprecatedorg.hibernate.validator.constraintstojavax.validation.constraintsEmployeeDAO.java: Added explicit cast ofnamedQuery()result toQuery<Employee>for Dropwizard 2.x Hibernate API compatibilityAppTest.java: Migrated from JUnit 3 (junit.framework) to JUnit 5 (org.junit.jupiter)Config & Docs
example.yml(Java 11 has native ALPN support)README.mdto reference Dropwizard 2.1.12 and Java 11mvn clean installpasses on JDK 11.Review & Testing Checklist for Human
EmployeeDAO.findAll()castsnamedQuery()result fromQuery<?>toQuery<Employee>. This compiles and passes the trivial test suite, but should be verified with actual database operations (POST an employee, then GET the list).java -jar target/DropwizardEmployee-1.0.5.jar db migrate example.ymlthen start the server and exercise the CRUD endpoints.jaxb-runtimeis pinned to 2.3.3 in dependencyManagement, overriding Hibernate 5.6.15's transitive 2.3.1. Verify no runtimeClassNotFoundExceptionorNoSuchMethodErrorfrom Hibernate's XML binding paths.mvn package && java -jar target/DropwizardEmployee-1.0.5.jar server example.yml— verify the app boots on port 8080, POST/GET/employeework, and admin on 8081 responds.Notes
assertTrue(true)) and provides no meaningful coverage of the migration. Manual smoke testing is essential.1.0.5(only the Dropwizard framework version was upgraded). The jar filename in the README still referencesDropwizardEmployee-1.0.5.jarwhich is correct.Link to Devin session: https://app.devin.ai/sessions/557bb933cbe84da99855f70a1ff44c29
Requested by: @WesternConcrete