Skip to content

Java 21 migration — Maven build config#20

Merged
devin-ai-integration[bot] merged 1 commit into
devin/1777913688-java21-migration-basefrom
devin/1777913842-java21-maven-config
May 4, 2026
Merged

Java 21 migration — Maven build config#20
devin-ai-integration[bot] merged 1 commit into
devin/1777913688-java21-migration-basefrom
devin/1777913842-java21-maven-config

Conversation

@devin-ai-integration
Copy link
Copy Markdown

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

Summary

Maven build configuration changes for the Java 8 → Java 21 / Spring Boot 2.0.2 → Spring Boot 3.2.5 migration. Scoped to Maven config only — no Gradle, source, or other files touched (those are handled by sibling PRs).

Changes in pom.xml:

  • Spring Boot parent: 2.0.2.RELEASE3.2.5
  • <java.version>: 1.821
  • Removed the spring-boot-properties-migrator dependency (it was added for the 1.x → 2.x migration and is no longer needed; it is also no longer published for Spring Boot 3.x)
  • Other dependencies (spring-boot-starter-web, spring-boot-starter-jdbc, h2) left untouched — they pick up compatible versions from the new parent BOM

Changes in .mvn/wrapper/maven-wrapper.properties:

  • distributionUrl: apache-maven-3.3.9apache-maven-3.9.6 (Maven 3.9+ is required for Java 21)

Review & Testing Checklist for Human

  • Confirm Spring Boot 3.2.5 is the intended target version for the migration
  • Confirm Maven wrapper version 3.9.6 matches whatever the integration PR / sibling PRs assume
  • Build/test will be exercised on the integration PR — verify a clean ./mvnw clean package runs there once Java source changes (sibling PR) are also merged in

Notes

  • This PR targets devin/1777913688-java21-migration-base (NOT master) so it can be combined with sibling PRs (Gradle config, Java source) on the integration branch.
  • Build/lint/tests intentionally not run in this child session — they will run on the integration PR.
  • build.gradle, gradle/wrapper/gradle-wrapper.properties, and all .java source files were intentionally left untouched (owned by sibling PRs).

Link to Devin session: https://app.devin.ai/sessions/ce68c976af9d48f1af76fae1be84dd26
Requested by: @dr-phil


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

- Bump Spring Boot parent from 2.0.2.RELEASE to 3.2.5
- Bump java.version from 1.8 to 21
- Remove spring-boot-properties-migrator (only needed for 1.x→2.x)
- Bump Maven wrapper distribution from 3.3.9 to 3.9.6 (required for Java 21)

Co-Authored-By: Phil Bedford <phil.bedford@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

@devin-ai-integration devin-ai-integration Bot merged commit 382eabc into devin/1777913688-java21-migration-base May 4, 2026
1 check was pending
Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

View 4 additional findings in Devin Review.

Open in Devin Review

Comment thread pom.xml
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.2.RELEASE</version>
<version>3.2.5</version>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 H2 2.x incompatible SQL syntax: DROP TABLE customers IF EXISTS

Upgrading Spring Boot to 3.2.5 pulls in H2 2.x, which no longer supports the legacy DROP TABLE tablename IF EXISTS syntax. The code at src/main/java/hello/Application.java:66 uses DROP TABLE customers IF EXISTS, which will throw a SQL parse error at runtime. H2 2.x requires the standard SQL syntax DROP TABLE IF EXISTS customers. Since this runs in a CommandLineRunner, it will crash the application on startup.

Prompt for agents
The Spring Boot upgrade from 2.0.2.RELEASE to 3.2.5 brings in H2 2.x, which has multiple SQL syntax breaking changes affecting src/main/java/hello/Application.java.

1. Line 66: DROP TABLE customers IF EXISTS must be changed to DROP TABLE IF EXISTS customers (H2 2.x dropped the legacy syntax).

2. Line 67: id SERIAL is no longer supported in H2 2.x default mode. It should be changed to id BIGINT GENERATED BY DEFAULT AS IDENTITY (or INT AUTO_INCREMENT, etc.).

Both of these execute inside the CommandLineRunner.run() method, so the app will fail to start. Fix both SQL statements in Application.java to use H2 2.x compatible syntax.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed real — src/main/java/hello/Application.java:66 does have DROP TABLE customers IF EXISTS, which will break under H2 2.x.

However, this PR is scoped to Maven build config only per the parent migration spec. .java source files are owned by a sibling child session that handles Java 8 → Java 21 source updates. This particular fix needs to land in that sibling PR (or in the integration PR), not this one. Flagging to the parent session so the sibling owner can pick it up.

Comment thread pom.xml
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.2.RELEASE</version>
<version>3.2.5</version>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 H2 2.x incompatible SQL syntax: SERIAL type removed in default mode

The upgrade to Spring Boot 3.2.5 brings in H2 2.x, which removed the SERIAL pseudo-type in its default SQL compatibility mode. The code at src/main/java/hello/Application.java:67 uses CREATE TABLE customers(id SERIAL, ...), which will fail with an unknown data type error. It should be replaced with id BIGINT GENERATED BY DEFAULT AS IDENTITY or id INT AUTO_INCREMENT. This runs in a CommandLineRunner so it will crash the application on startup.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed real — src/main/java/hello/Application.java:67 uses id SERIAL, which is no longer valid in H2 2.x default mode. Recommended fix is id BIGINT GENERATED BY DEFAULT AS IDENTITY (or id INT AUTO_INCREMENT).

Same scope note as the sibling comment: this PR is Maven build config only; .java source changes belong to the sibling child session. Flagging to the parent session for routing.

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