chore: migrate from Java 8 to Java 11#32
Open
devin-ai-integration[bot] wants to merge 4 commits into
Open
Conversation
- Upgrade Spring Boot from 2.0.2.RELEASE to 2.7.18 - Update java.version from 1.8 to 11 in Maven pom.xml - Add maven.compiler.release=11 and project.build.sourceEncoding=UTF-8 - Add maven-compiler-plugin 3.11.0, maven-surefire-plugin 3.2.5, maven-enforcer-plugin 3.5.0 (requiring Java 11+) - Update Gradle sourceCompatibility/targetCompatibility from 1.8 to 11 - Upgrade Spring Boot Gradle plugin from 2.0.2.RELEASE to 2.7.18 - Replace deprecated compile/testCompile with implementation/testImplementation - Replace deprecated baseName/version with archiveBaseName/archiveVersion - Add missing JDBC and H2 dependencies to Gradle build - Upgrade Gradle wrapper from 4.6 to 8.5 - Upgrade Maven wrapper from 3.3.9 to 3.9.6 - Add GitHub Actions CI workflow for JDK 11 with Maven caching - Add MIGRATION_NOTES.md documenting all changes - Update README.md with JDK 11 requirement - Make mvnw and gradlew executable Co-Authored-By: Lukas Burger <lukas.burger@cognition.ai>
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:
|
The maven-enforcer-plugin is already bound to the validate phase, which runs automatically during compile. The separate 'enforce' step used an invalid lifecycle phase name. Co-Authored-By: Lukas Burger <lukas.burger@cognition.ai>
With pom packaging, Maven does not bind compiler:compile to the compile phase, making ./mvnw compile a no-op. Changed to jar packaging so Maven actually compiles the 13 Java source files. Co-Authored-By: Lukas Burger <lukas.burger@cognition.ai>
Matches the runtime scope used in pom.xml. Using implementation unnecessarily exposes this on the compile classpath. Co-Authored-By: Lukas Burger <lukas.burger@cognition.ai>
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 8 (1.8) to Java 11, upgrading both Maven and Gradle build systems.
Key changes:
java.version1.8 → 11, addedmaven.compiler.release=11,maven-compiler-plugin3.11.0,maven-surefire-plugin3.2.5,maven-enforcer-plugin3.5.0 (enforces Java ≥ 11), changed packaging frompomtojarso compile phase actually workssourceCompatibility/targetCompatibility1.8 → 11, Spring Boot plugin 2.7.18, replaced deprecatedcompile/testCompilewithimplementation/testImplementation, added missing JDBC/H2 dependencies, corrected dependency scopes.github/workflows/build.ymlfor JDK 11 with Maven cachingMIGRATION_NOTES.md, updatedREADME.mdwith JDK 11 requirementNo source code changes were needed — all Java 8 APIs (Stream, NIO, Date/Time, lambdas, Optional) are fully supported on Java 11. No JPMS
module-info.javaadded; project stays on classpath.Review & Testing Checklist for Human
./mvnw -B compile(now compiles all 13 source files withjarpackaging)./gradlew build./mvnw spring-boot:runor./gradlew bootRunand testGET http://localhost:8080/topicNotes
<packaging>pom</packaging>→<packaging>jar</packaging>so Maven compile is no longer a no-op (caught by Devin Review)spring-boot-properties-migratorto useruntimeOnlyin Gradle to match Maven's<scope>runtime</scope>(caught by Devin Review)build.gradlewas updated to includespring-boot-starter-jdbcandh2dependencies that were missing from the original (they were only inpom.xml)Link to Devin session: https://app.devin.ai/sessions/0936dacd7f134740a8af4053e9d05494
Requested by: @lburgers
Devin Review