Maven Tycho无法满足插件依赖性

时间:2018-04-23 13:27:02

标签: eclipse eclipse-plugin eclipse-cdt tycho

我有一个eclipse产品,我正在根据目标定义进行配置 我定义了要使用的CDT版本9.4.3

<location...>
<unit id="org.eclipse.cdt.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gdb.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gdb.source.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gnu.build.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gnu.build.source.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gnu.debug.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gnu.debug.source.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gnu.dsf.source.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.native.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.native.source.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.platform.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.platform.source.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.sdk.feature.group" version="9.4.3.201802261533"/>
<repository location="http://download.eclipse.org/releases/oxygen/"/>
</location>

在eclipse中,目标成功加载,但是当我尝试使用maven tycho构建产品(运行mvn clean install)时,它会抱怨缺少插件依赖com.google.gson

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: PLUGIN.id 4.5.5.5
[ERROR]   Missing requirement: org.eclipse.cdt.core 6.4.0.201802261533 requires
'bundle com.google.gson 0.0.0' but it could not be found
[ERROR]   Cannot satisfy dependency: PLUGIN.id 4.5.5.5 depends on: com.domain.plugin.feature.feature.group [1.0.0,1.0.1)
[ERROR]   Cannot satisfy dependency: com.domain.plugin.feature.feature.group
 1.0.0.qualifier depends on: org.eclipse.cdt.core 0.0.0
[ERROR]
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting
for help.
[ERROR] Cannot resolve dependencies of MavenProject: com.domain.plugin:com.domain.plugin:1.0.0-SNAPSHOT @ D:\Dev\Sources\src\plugin\plugins\com.domain.plugin\pom.xml: See log for details -> [Help 1]

如何提供此依赖项以及为何不直接从eclipse oxygen p2 repo收集?

1 个答案:

答案 0 :(得分:1)

我认为 com.google.gson 不是eclipse氧标准回购的一部分,因为它是第三方库。 Eclipse轨道仓库维护着这些库。

<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="false" type="InstallableUnit">
  <unit id="com.google.gson" version="0.0.0"/>

   <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20170919201930/repository"/>
</location>

希望有所帮助!