Skip to content

spring-boot-maven-plugin doesn't work with Java 22 #39927

@krzyk

Description

@krzyk

Steps to reproduce:

  1. Go to https://start.spring.io/
  2. Generate project with Maven and Java 21 (don't change anything else)
  3. Download, unzip
  4. Change <java.version>21</java.version> to <java.version>22</java.version>
  5. Execute mvn clean verify

Results with:

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.2.3:repackage (repackage) on project demo: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:3.2.3:repackage failed: Unsupported class file major version 66 -> [Help 1]

This is because spring-boot-maven-plugin:3.2.3 uses old ASM version 9.5. Easily to see using mvn dependency:resolve-plugins:

...
[INFO]       org.ow2.asm:asm:jar:9.5
[INFO]       org.ow2.asm:asm-commons:jar:9.5
[INFO]       org.ow2.asm:asm-tree:jar:9.5
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions