Skip to content

chore: migrate from Java 8 to Java 11#32

Open
devin-ai-integration[bot] wants to merge 4 commits into
masterfrom
devin/java8-to-11
Open

chore: migrate from Java 8 to Java 11#32
devin-ai-integration[bot] wants to merge 4 commits into
masterfrom
devin/java8-to-11

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented May 15, 2026

Summary

Migrates the project from Java 8 (1.8) to Java 11, upgrading both Maven and Gradle build systems.

Key changes:

  • Spring Boot: 2.0.2.RELEASE → 2.7.18 (latest 2.x, supports Java 11)
  • Maven: java.version 1.8 → 11, added maven.compiler.release=11, maven-compiler-plugin 3.11.0, maven-surefire-plugin 3.2.5, maven-enforcer-plugin 3.5.0 (enforces Java ≥ 11), changed packaging from pom to jar so compile phase actually works
  • Gradle: sourceCompatibility/targetCompatibility 1.8 → 11, Spring Boot plugin 2.7.18, replaced deprecated compile/testCompile with implementation/testImplementation, added missing JDBC/H2 dependencies, corrected dependency scopes
  • Maven wrapper: 3.3.9 → 3.9.6
  • Gradle wrapper: 4.6 → 8.5
  • CI: Added .github/workflows/build.yml for JDK 11 with Maven caching
  • Docs: Added MIGRATION_NOTES.md, updated README.md with JDK 11 requirement

No 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.java added; project stays on classpath.

Review & Testing Checklist for Human

  • Verify Maven build compiles: ./mvnw -B compile (now compiles all 13 source files with jar packaging)
  • Verify Gradle build compiles: ./gradlew build
  • Verify app starts: ./mvnw spring-boot:run or ./gradlew bootRun and test GET http://localhost:8080/topic

Notes

  • Both Maven and Gradle builds verified locally on JDK 11
  • Fixed <packaging>pom</packaging><packaging>jar</packaging> so Maven compile is no longer a no-op (caught by Devin Review)
  • Fixed spring-boot-properties-migrator to use runtimeOnly in Gradle to match Maven's <scope>runtime</scope> (caught by Devin Review)
  • Gradle build.gradle was updated to include spring-boot-starter-jdbc and h2 dependencies that were missing from the original (they were only in pom.xml)

Link to Devin session: https://app.devin.ai/sessions/0936dacd7f134740a8af4053e9d05494
Requested by: @lburgers


Devin Review

Status Commit
⚪ Not started

Run Devin Review

💡 Connect your GitHub account to enable automatic code reviews.

Open in Devin Review (Staging)
Open in Devin Review

- 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>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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>
devin-ai-integration[bot]

This comment was marked as resolved.

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>
devin-ai-integration[bot]

This comment was marked as resolved.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant