5
我有以下項目結構:插件ID爲春季啓動在父母的build.gradle沒有發現
的Java/
的build.gradle
settings.gradle
了projectA/
build.gradle
projectB/
的build.gradle
當我把下面碼,例如了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'
...
一切工作正常。
但是如果我把上面的代碼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'
...
}
運行時的gradle乾淨的構建,它使報告如下錯誤:
Plugin with id 'spring-boot' not found.
任何人都遇到過這個問題?爲什麼?