幾個月來,我們一直在使用Buildship 1.X以及一些手動啓動/任務來構建每個開發環境的Eclipse/WTP配置文件。我目前正試圖遷移到使用Buildship 2(我希望將擺脫手動位的需求)。Buildship 2子項目不鏈接爲項目依賴關係
但是,當我導入項目(此時有0個eclipse配置文件)通過構建/ gradle導入,子項目通過'庫'而不是'項目'(參見下圖)。相反,如果我使用gradle的eclipse任務來生成eclipse配置文件(即.classpath),那麼配置結果如我所料。這是Buildship的當前侷限性,還是我需要在我的Gradle文件中採用不同的方式強制Buildship將它們作爲項目引入?
最終我不知道我應該關心這種差異,但我確實知道我收到編譯器錯誤,指出來自子項目的類從類路徑中丟失。只要我能解決這個問題,我就非常開心。
潛在有用的信息
settings.gradle:
rootProject.name = 'projectroot'
include 'Project2.0'
project(':Project2.0').name = 'projectx'
include 'the-platform'
include 'the-platform:central-repo:central-repo-common'
include 'the-platform:central-repo:central-repo-model'
include 'the-platform:central-repo:central-repo-persist'
include 'the-platform:central-repo:central-repo-service'
Project2.0 /的build.gradle(片段):
dependencies {
...
compile project(':the-platform:central-repo:central-repo-common')
compile project(':the-platform:central-repo:central-repo-model')
compile project(':the-platform:central-repo:central-repo-persist')
compile project(':the-platform:central-repo:central-repo-service')
...
}