I have below the project structure:
Java /
build.gradle
settings.gradle
PROJECTA /
build.gradle
projectB /
build.gradle
When I put below codes, for example, projectA build.gradle,
buildscript { repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.6.RELEASE") } } apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'spring-boot' ...
everything is working fine.
But if I put the above code in Java build.gradle:
subprojects { buildscript { repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.6.RELEASE") } } apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'spring-boot' ... }
When running gradle clean build, it reports the error below:
Plugin with id 'spring-boot' not found.
Has anyone encountered this problem before? And why?
source share