Skip to content

Incorrect artifact coordinates for Hibernate enhancer with Spring Boot 4 #1990

@danthe1st

Description

@danthe1st

The Hibernate enhancement Maven plugin was moved to different artifact coordinates with Hibernate 7 and it seems like start.spring.io tries to use the nonexisting old artifact coordinates.

Steps to reproduce

  • Go to start.spring.io
  • Add Spring Data JPA and GraalVM native support
  • Make sure that Maven and Spring Boot 4.0.0 is selected
  • Download the project
  • Run mvn verify
Image

The output I get with mvn verify is the following:

[INFO] 
[INFO] 1 problem was encountered while building the effective settings (use -e to see details)
[INFO] 
[INFO] Scanning for projects...
[INFO] Loaded 21683 auto-discovered prefixes for remote repository central (prefixes-central.txt)
[INFO] Loaded 74 auto-discovered prefixes for remote repository apache.snapshots (prefixes-apache.snapshots-c1d4c55f9308e5ac18a4069bed41dca64d85c515.txt)
[INFO] Loaded 21683 auto-discovered prefixes for remote repository maven-central (prefixes-maven-central-de66ab544dabb92499170649134bc3bd0ea8afac.txt)
[INFO] 
[INFO] ---------------------------------------------------< com.example:demo >---------------------------------------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO]   from pom.xml
[INFO] ---------------------------------------------------------[ jar ]----------------------------------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/hibernate/orm/tooling/hibernate-enhance-maven-plugin/7.1.8.Final/hibernate-enhance-maven-plugin-7.1.8.Final.pom
[WARNING] The POM for org.hibernate.orm.tooling:hibernate-enhance-maven-plugin:jar:7.1.8.Final is missing, no dependency information available
Downloading from central: https://repo.maven.apache.org/maven2/org/hibernate/orm/tooling/hibernate-enhance-maven-plugin/7.1.8.Final/hibernate-enhance-maven-plugin-7.1.8.Final.jar
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time:  4.634 s
[INFO] Finished at: 2025-11-21T11:30:19+01:00
[INFO] --------------------------------------------------------------------------------------------------------------------------
[ERROR] Plugin org.hibernate.orm.tooling:hibernate-enhance-maven-plugin:7.1.8.Final or one of its dependencies could not be resolved:
[ERROR]         Could not find artifact org.hibernate.orm.tooling:hibernate-enhance-maven-plugin:jar:7.1.8.Final in central (https://repo.maven.apache.org/maven2): The following artifacts could not be resolved: org.hibernate.orm.tooling:hibernate-enhance-maven-plugin:jar:7.1.8.Final (absent): Could not find artifact org.hibernate.orm.tooling:hibernate-enhance-maven-plugin:jar:7.1.8.Final in central (https://repo.maven.apache.org/maven2)
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the '-e' switch
[ERROR] Re-run Maven using the '-X' switch to enable verbose output
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

The problem is start.spring.io adding a reference to the removed plugin:

      <plugin>
        <groupId>org.hibernate.orm.tooling</groupId>
        <artifactId>hibernate-enhance-maven-plugin</artifactId>
        <version>${hibernate.version}</version>
        <executions>
          <execution>
            <id>enhance</id>
            <goals>
              <goal>enhance</goal>
            </goals>
            <configuration>
              <enableLazyInitialization>true</enableLazyInitialization>
              <enableDirtyTracking>true</enableDirtyTracking>
              <enableAssociationManagement>true</enableAssociationManagement>
            </configuration>
          </execution>
        </executions>
      </plugin>

The correct artifact coordinates should be org.hibernate.orm:hibernate-maven-plugin according to this. Unfortunately, it seems like the plugin is also unavailable for Hibernate 7.1.8 which is used by Spring Boot 4.0.0. The plugin being unavailable is discussed here but this part is probably outside of start.spring.io's control.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions