我完全被編譯錯誤package sg.ncl.service.authentication.data.jpa does not exist
愚蠢,應該不會發生。Gradle多項目構建命令失敗,但對於子項目正常工作
我有一個Gradle多項目,我試圖更新到Spring Boot 1.4.0。 存儲庫位於https://github.com/nus-ncl/services-in-one/tree/DEV-483。
更新:1: 每當我使用任何下列命令:
./gradlew clean build
./gradlew clean assemble check
./gradlew clean assemble test
它們會導致以下錯誤。
D:\git\services-in-one\service-registration\src\test\java\sg\ncl\service\registration\logic\RegistrationServiceTest.java:16: error: package sg.ncl.service.authentication.data.jpa does not exist
import sg.ncl.service.authentication.data.jpa.CredentialsEntity;
^
D:\git\services-in-one\service-registration\src\test\java\sg\ncl\service\registration\Util.java:4: error: package sg.ncl.service.authentication.data.jpa does not exist
import sg.ncl.service.authentication.data.jpa.CredentialsEntity;
^
D:\git\services-in-one\service-registration\src\test\java\sg\ncl\service\registration\Util.java:120: error: cannot find symbol
public static CredentialsEntity getCredentialsEntity() {
^
symbol: class CredentialsEntity
location: class Util
D:\git\services-in-one\service-registration\src\test\java\sg\ncl\service\registration\Util.java:127: error: cannot find symbol
public static CredentialsEntity getInvalidCredentialsEntity() {
^
symbol: class CredentialsEntity
location: class Util
D:\git\services-in-one\service-registration\src\test\java\sg\ncl\service\registration\web\RegistrationControllerTest.java:22: error: package sg.ncl.service.authentication.data.jpa does not exist
import sg.ncl.service.authentication.data.jpa.CredentialsEntity;
^
5 errors
:service-registration:compileTestJava FAILED
但是當我使用下列任何命令時,編譯錯誤不會發生。
./gradlew clean :service-registration:build
./gradlew clean :service-registration:compileTestJava
./gradlew clean compileTestJava
./gradlew clean check
更新2:有趣的是,如果我使用./gradlew :service-registration:build build
,沒有錯誤。
我意識到我無法想出一個簡單的例子,併爲造成的不便表示歉意。不過,如果能夠解決這個問題,我將不勝感激。
謝謝。但是,而不是禁用'bootRepackage'。我刪除了'apply plugin:'spring-boot''到子項目。 – ChristopherZ