the whole project is based on spring cloud
.build.gradle configuration of the parent project:
group "com.xxx.yyy"
version "0.1.0"
buildscript {
ext {
springBootVersion = "1.5.10.RELEASE"
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("se.transmode.gradle:gradle-docker:1.2")
}
}
subprojects {
apply plugin: "idea"
apply plugin: "java"
apply plugin: "docker"
apply plugin: "org.springframework.boot"
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceSets {
main {
java.srcDir "src"
}
}
repositories {
mavenCentral()
}
configurations {
all*.exclude module: "spring-boot-starter-logging"
all*.exclude module: "logback-classic"
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:Edgware.SR3"
}
}
dependencies {
compile("org.springframework.boot:spring-boot-starter")
compile("org.springframework.boot:spring-boot-starter-log4j2")
compile("org.springframework.boot:spring-boot-starter-test")
compile("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml")
}
}
the configuration of the subproject is relatively simple
subproject 1 :
group "com.xxx.yyy"
version "0.1.0"
archivesBaseName = "prj1"
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
// ...
}
subitem 2 :
group "com.xxx.yyy"
version "0.1.0"
archivesBaseName = "prj2"
dependencies {
compile project(":prj1")
}
under the parent project directory, execute gradle build-x test
command
> Task :prj2:compileJava
ConsumerHelper.java:5: : com.xxx.yyy.zzz
what is the cause of this?