Eclipse plugin Eclipse 2018-12依赖于Windows、Linux和MaxOS

Eclipse plugin Eclipse 2018-12依赖于Windows、Linux和MaxOS,eclipse-plugin,eclipse-rcp,tycho,p2,Eclipse Plugin,Eclipse Rcp,Tycho,P2,我刚刚更新了Eclipse4.9中应用程序的org.eclipse.e4.rcp特性。至4.10(或2012-09至2012-12)。现在我得到了一个例外: [ERROR] Cannot resolve target definition: [ERROR] Problems resolving provisioning plan.: [ERROR] Unable to satisfy dependency from org.eclipse.swt 3.109.0.v20181204

我刚刚更新了Eclipse4.9中应用程序的
org.eclipse.e4.rcp
特性。至4.10(或2012-09至2012-12)。现在我得到了一个例外:

[ERROR] Cannot resolve target definition:
[ERROR]   Problems resolving provisioning plan.:
[ERROR]      Unable to satisfy dependency from org.eclipse.swt 3.109.0.v20181204-1801 to org.eclipse.equinox.p2.iu; org.eclipse.swt.gtk.linux.x86_64 [3.109.0.v20181204-1801,3.109.0.v20181204-1801].
[ERROR]      Unable to satisfy dependency from org.eclipse.swt 3.109.0.v20181204-1801 to org.eclipse.equinox.p2.iu; org.eclipse.swt.cocoa.macosx.x86_64 [3.109.0.v20181204-1801,3.109.0.v20181204-1801].
[ERROR]      Unable to satisfy dependency from org.eclipse.swt 3.109.0.v20181204-1801 to org.eclipse.equinox.p2.iu; org.eclipse.swt.gtk.linux.ppc64le [3.109.0.v20181204-1801,3.109.0.v20181204-1801].
[ERROR]   Software being installed: org.acme.plugin 7.0.0.qualifier
[ERROR]   Missing requirement: org.eclipse.swt 3.109.0.v20181204-1801 requires 'org.eclipse.equinox.p2.iu; org.eclipse.swt.gtk.linux.x86_64 [3.109.0.v20181204-1801,3.109.0.v20181204-1801]' but it could not be found
[ERROR]   Cannot satisfy dependency: org.acme.plugin 7.0.0.qualifier depends on: java.package; org.eclipse.jface.preference 0.0.0
[ERROR]   Cannot satisfy dependency: org.eclipse.jface 3.15.0.v20181123-1505 depends on: osgi.bundle; org.eclipse.swt [3.104.0,4.0.0)
.target文件和pom.xml都将目标平台定义为仅适用于Windows:


win32
win32
x86_64
并且目标文件还有
includealplatforms=“false”
。如果我将其设置为true,我会得到非常类似的异常:

[ERROR] Cannot resolve target definition:
[ERROR]   Problems resolving provisioning plan.:
[ERROR]      Unable to satisfy dependency from org.eclipse.swt 3.109.0.v20181204-1801 to org.eclipse.equinox.p2.iu; org.eclipse.swt.gtk.linux.x86_64 [3.109.0.v20181204-1801,3.109.0.v20181204-1801].
[ERROR]      Unable to satisfy dependency from org.eclipse.swt 3.109.0.v20181204-1801 to org.eclipse.equinox.p2.iu; org.eclipse.swt.cocoa.macosx.x86_64 [3.109.0.v20181204-1801,3.109.0.v20181204-1801].
[ERROR]      Unable to satisfy dependency from org.eclipse.swt 3.109.0.v20181204-1801 to org.eclipse.equinox.p2.iu; org.eclipse.swt.gtk.linux.ppc64le [3.109.0.v20181204-1801,3.109.0.v20181204-1801].
[ERROR]   Software being installed: org.acme.plugin 7.0.0.qualifier
[ERROR]   Missing requirement: org.eclipse.swt 3.109.0.v20181204-1801 requires 'org.eclipse.equinox.p2.iu; org.eclipse.swt.gtk.linux.x86_64 [3.109.0.v20181204-1801,3.109.0.v20181204-1801]' but it could not be found
[ERROR]   Cannot satisfy dependency: org.acme.plugin 7.0.0.qualifier depends on: java.package; org.eclipse.jface.preference 0.0.0
[ERROR]   Cannot satisfy dependency: org.eclipse.jface 3.15.0.v20181123-1505 depends on: osgi.bundle; org.eclipse.swt [3.104.0,4.0.0)
如果我将片段添加到目标平台,我会得到以下消息(这是完全可以理解的):

将目标平台设置为
planner
模式不起作用。pom.xml中的设置
true
false
也不起作用)

查看该功能的XML文件,我看不出有任何错误(这些片段仅为其操作系统定义),但目标平台仍然希望有Linux和MacOS的片段,即使我在Windows上

目标平台如下所示(同样,如果我用2018-09替换2018-12,它会起作用):


它挂接在pom.xml中,如下所示:


org.eclipse.tycho
目标平台配置
p2
groupId
org.acme.plugin.build
7.0.0-SNAPSHOT
站台
符合事实的
win32
win32
x86_64

有什么问题?我该怎么修呢?

谁会想到呢?这与中的Eclipse错误完全相同。出于某种原因,我们的构建过程优先考虑Maven Central中的插件,而不是Eclipse存储库中的插件。因为他们已经破坏了Maven依赖,而且Tycho(显然)仍然在评估这些依赖,这就破坏了构建


在我们的例子中,修复非常简单,只需将Maven Central移动到目标平台中Eclipse repo的下方即可。

为了将Eclipse平台从4.9升级到4.10,您更改了哪些文件?只有目标定义<代码>[错误]无法解析目标定义:-显示目标定义。如果目标平台无法解决,那么构建如何可能进一步失败,并出现第二个错误:
[error]软件正在安装:…
显示Tycho的
目标平台配置
。在缺少某些东西时限制目标平台似乎不太可能。@howlger是的,我只更改了目标平台。我可以在2018-09和2018-12之间来回翻转存储库位置,引发错误或让它工作。我在问题中添加了目标平台和pom.xml。