繁体   English   中英

使用Buildship 2子项目时,未将其作为项目依赖项链接

[英]With Buildship 2 subprojects are not linked as Project Dependencies

几个月来,我们一直在使用Buildship 1.X以及一些手动的.launch / tasks在每个开发环境中构建Eclipse / WTP配置文件。 我目前正在尝试迁移到使用Buildship 2(我希望这将使我们摆脱对手动钻头的需求。)

但是,当我通过buildship / gradle导入导入项目(此时具有0个eclipse配置文件)时,子项目是通过“库”而不是“项目”包含的(请参见下图。)相反,如果我使用gradle的eclipse任务生成eclipse配置文件(即.classpath),然后配置按我期望的那样结束。 这是Buildship的当前限制,还是我需要在gradle文件中做一些不同的操作来强制Buildship将其作为Projects引入?

最终,我不知道我应该关心这种差异,但是我确实知道我在遇到编译器错误,即子路径中缺少子项目中的类。 只要我能解决该问题,我都会非常高兴。

与我期望看到的相反

可能有用的信息

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')
    ...
}

嗯,没关系。 我关于buildship和eclipse插件的行为之间的区别的直觉是不正确的,以负责我的类路径问题。 由于现在可以正常工作,因此必须要解决其他问题(尚未解释)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM