Generated project with Gradle+Kotlin+JPA does not build
Closed this issue · 1 comments
der-ambi commented
I generated a demo project on https://start.spring.io with the following settings
![image](https://private-user-images.githubusercontent.com/16489980/356132995-56f15e35-a7c5-4739-952d-0e8095446b67.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3MzE5NzcsIm5iZiI6MTczOTczMTY3NywicGF0aCI6Ii8xNjQ4OTk4MC8zNTYxMzI5OTUtNTZmMTVlMzUtYTdjNS00NzM5LTk1MmQtMGU4MDk1NDQ2YjY3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDE4NDc1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk5OTg4ZjFmY2ExN2Q3YzE5NTdmMDM4YzE3ZTg3MzAyOTY1MTkyZmE3OGFiMWI2ZTYzYWRlMmZjM2ZlZTkyMWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.3dvULIBK3MbiNKOyMlRTI8Ze513LAtFcd6w5i1F_r88)
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'
}
der-ambi commented
Looks like I better open the issue against https://github.com/spring-io/start.spring.io.
Will close this one.