Gradle: Could not find method providedRuntime() for arguments [org.springframework.boot:spring-boot-starter-tomcat]

Viewed 27

I wanted to deploy SpringBoot app with Gradle to Tomcat. Followed by documentation https://docs.spring.io/spring-boot/docs/2.3.0.M1/gradle-plugin/reference/html/#packaging-executable. I added starter tomcat and web.

build.gradle:

plugins {
    id 'org.springframework.boot' version '2.6.7'
    id 'war'
    id 'groovy'

}

dependencies {
    implementation platform('org.springframework.boot:spring-boot-dependencies:2.6.7')
    implementation 'org.springframework.boot:spring-boot-starter-web'
    providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
}

By building the project, I'm getting error like:

Could not find method providedRuntime() for arguments [org.springframework.boot:spring-boot-starter-tomcat] 

I'm using gradle version 7.3.3

0 Answers
Related