spring-io/initializr

Generated project with Gradle+Kotlin+JPA does not build

Closed this issue · 1 comments

I generated a demo project on https://start.spring.io with the following settings

image

The resulting project does not build:

➜  demo ./gradlew build

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/ambi/Projects/demo/build.gradle' line: 4

* What went wrong:
An exception occurred applying plugin request [id: 'org.hibernate.orm', version: '6.5.2.Final']
> Failed to apply plugin 'org.hibernate.orm'.
   > Could not create an instance of type org.hibernate.orm.tooling.gradle.HibernateOrmSpec.
      > Extension of type 'JavaPluginExtension' does not exist. Currently registered extension types: [ExtraPropertiesExtension, VersionCatalogsExtension, SpringBootExtension, StandardDependencyManagementExtension, SourceSetContainer]

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 401ms

To fix it, I need to add to add the following line to the plugins section of build.gradle so it reads like this

plugins {
	id 'java'
	id 'org.springframework.boot' version '3.3.2'
	id 'io.spring.dependency-management' version '1.1.6'
	id 'org.hibernate.orm' version '6.5.2.Final'
	id 'org.graalvm.buildtools.native' version '0.10.2'
	id 'org.jetbrains.kotlin.plugin.jpa' version '1.9.24'
	id 'org.jetbrains.kotlin.jvm' version '1.9.24'
	id 'org.jetbrains.kotlin.plugin.spring' version '1.9.24'
}

Looks like I better open the issue against https://github.com/spring-io/start.spring.io.

Will close this one.