Hi
I am using Gradle 4.2 for Spring Boot application. I would like to apply Spring Boot plugin to sub-projects of my project so I put this plugin into subprojects section. How my overall build fails because Spring Boot plugin is executed for root project, could not find main class and generates error.
Please advise how specify this plugin for sub-projects only.
plugins { id "io.spring.dependency-management" version "1.0.3.RELEASE" apply false }
plugins { id 'org.springframework.boot' version '1.5.7.RELEASE' }
allprojects {
apply plugin: 'maven'
group = 'test'
}
subprojects {
apply plugin: 'java'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.springframework.boot'
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext {
springVersion = '4.3.11.RELEASE'
springBootVersion = '1.5.7.RELEASE'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile("org.springframework.boot:spring-boot-devtools:${springBootVersion}")
}
}