我想为用于创建应用程序的基本Eclipse平台创建一个功能,但是对于多个操作系统。
由于 feature.xml 似乎支持它,我认为这样做很简单:
<plugin
id="org.eclipse.swt"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.swt.win32.win32.x86"
os="win32"
ws="win32"
arch="x86"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>
<plugin
id="org.eclipse.swt.win32.win32.x86_64"
os="win32"
ws="win32"
arch="x86_64"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>
...将插件添加到目标平台并使用Tycho构建它。但是我得到以下例外:
[ERROR] Cannot resolve target definition:
[ERROR] Problems resolving provisioning plan.:
[ERROR] org.eclipse.swt.win32.win32.x86_64 3.7.2.v3740f cannot be installed in this environment because its filter is not applicable.
[ERROR]
[ERROR] Failed to resolve target definition C:\workspaces\MyGreatWorkspace\org.acme.platform.feature\build.target: See log for details: org.eclipse.swt.win32.win32.x86_64 3.7.2.v3740f cannot be installed in this environment because its filter is not applicable. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
目标平台定义和 pom.xml 都没有定义environment
标记,因此我甚至不确定Tycho正在验证的内容。
拥有环境标记不会改变例外:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<!-- [SNIP] -->
<environments>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
如何为多个操作系统创建功能?