使用Maven Tycho构建Eclipse跨平台 [英] Build Eclipse cross-platform with Maven Tycho

查看:217
本文介绍了使用Maven Tycho构建Eclipse跨平台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用 Maven Tycho编译 Eclipse Indigo RCP 应用程序。如果我只是为一个平台构建它,那么效果很好,但是如果我尝试为更多平台构建它,则构建停止工作。

I try to compile an Eclipse Indigo RCP application with Maven and Tycho. It works fine if I just build it for one platform but if I try to build it for more the build stops working.

问题是我在特定于平台的插件中我要构建的产品文件。像 org.eclipse.swt.win32.win32.x86 这样的依赖项是 org.eclipse.swt 的片段插件。

当我没有在产品中添加任何平台特定的片段时,该应用程序将无法启动,因为没有像org.eclipse.swt.win32.win32.x86这样的平台库。
作为Tycho存储库,我们使用托管在我们自己服务器上的eclipse indigo更新站点的克隆。它包括增量包装。
当我为所有平台添加所有片段时,构建崩溃了,maven告诉我,例如,平台筛选器与Linux构建不匹配。

The Problem is that I have platform specific plugins in my product file I want to build. Dependencies like org.eclipse.swt.win32.win32.x86 which are fragment plugins for org.eclipse.swt.
When I add no platform specific fragments to my product the application wouldn't start because there are no platform libraries like org.eclipse.swt.win32.win32.x86. As Tycho repository we use a clone of the eclipse indigo update site hosted on our own server. It includes the delta-pack. And when I add all fragments for all platforms the build crashed and maven tell me that the platform filters did not match for the Linux build for example.

有有人知道如何解决此问题吗?

是否应将这些依赖于平台的内容添加到我的产品中?我更喜欢将特定的依赖项保留在产品中,对吗?

Does anyone know how to fix this?
Should I add these platform dependent stuff into my product? I prefer to keep the specific dependencies out of my product, am I right?

推荐答案

听起来像您有一个插件基础产品。在这种情况下,您将需要手动编辑.product文件并为这些插件添加平台过滤器。不幸的是,eclipse中的内置产品编辑器没有公开这些值。参见 http://wiki.eclipse.org/Tycho/FAQ#How_to_build_plugin- based_products_with_platform-specific_fragments.3F

It sounds like you have a plug-in based product. In this case you will need to manually edit your .product file and add in platform filters for these plug-ins. Unfortunately the built-in product editor in eclipse does not expose these values. See http://wiki.eclipse.org/Tycho/FAQ#How_to_build_plugin-based_products_with_platform-specific_fragments.3F

对于每个插件org.eclipse.swt.win32.win32.x86,您将需要添加以下内容;

For each plugin e.g. org.eclipse.swt.win32.win32.x86 you will need to add something like;

<plugin id="org.eclipse.swt.win32.win32.x86" fragment="true" ws="win32" os="win32" arch="x86"/>

注意,如果使用产品编辑器,它将删除这些值。

Note, if you use the product editor it will remove these values.

但是,最好使用基于功能的产品。功能编辑器允许编辑这些字段。

It is better however to use a feature based product. The feature editor permits these fields to be edited.

这篇关于使用Maven Tycho构建Eclipse跨平台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆