如何使用本地目录作为Tycho构建的目标平台? [英] How can I use a local directory as target platform for a Tycho build?

查看:61
本文介绍了如何使用本地目录作为Tycho构建的目标平台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用目标平台(该目录是Maven/Tycho的目录)构建RCP应用程序.
现在,我遇到了无法解决依赖关系的麻烦.

I want to build an RCP-Application with a target platform which is a directory with Maven/Tycho.
Now I have some troubles that the dependencies could not be resolved.

Internal error: java.lang.RuntimeException: "No solution found because the  
problem is unsatisfiable.": ["Unable to satisfy dependency from  
de.test.prototype.main 1.0.0.qualifier to bundle org.eclipse.ui 0.0.0.",  
"Unable to satisfy dependency from de.test.prototype.main 1.0.0.qualifier  
to bundle org.eclipse.core.runtime 0.0.0.", ...

总而言之,有几个依赖项解析问题,所以我认为Tycho无法使用我的目标平台.
我阅读了 http://wiki.eclipse.org/Tycho/Target_Platform ,其中有以下注释:

All in all there are several dependency resolution problems, so I think Tycho can't use my target platform.
I read http://wiki.eclipse.org/Tycho/Target_Platform and there is the following note:

不支持位置类型目录",安装"和功能".

The location types "Directory", "Installation", and "Features" are not supported."

所以我的问题是:尽管Tycho是目录,我如何使Tycho使用我的目标平台?

So my question is: How do I get Tycho to use my target platform, although it is a directory?

推荐答案

Tycho需要p2元数据才能解决构建中的依赖性.这就是为什么不能使用仅包含捆绑软件和功能的文件夹的原因.

Tycho requires p2 metadata in order to resolve dependencies in your build. This is why a folder with just bundles and features can't be used.

但是,您可以使用功能和捆绑发布商应用程序将文件夹转换为p2存储库.完成此操作后,您可以通过目标定义文件中的file: URL将文件夹引用为软件站点"位置.然后Tycho也可以使用它.

However you can convert your folder into a p2 repository by using the Features and Bundles Publisher Application. After you have done this, you can to reference the folder as "Software Site" location through a file: URL in your target definition file. Then Tycho will also be able to use it.

但是请注意,您首先应该问自己是否真的需要这样做:

确实文件夹中的功能和捆绑包在任何p2存储库中都不可用吗?如果是这样,则强烈建议不要在其上运行Features and Bundles Publisher(或者您可能会违反p2的基本假设,这可能会导致通常只对用户可见的问题).相反,您应该直接从p2存储库中引用这些功能和捆绑包,例如通过目标文件中的软件站点"位置.

Note however that you should first be asking yourself if you really need to do this: Are the features and bundles in your folder really not available in any p2 repository? If they are, it is strongly recommended to not run the Features and Bundles Publisher on them (or you may be causing violations of basic assumptions of p2 which may lead to problems that are typically only visible to your users). Instead, you should reference these features and bundles directly from the p2 repository, e.g. via "Software Site" location in your target file.

这篇关于如何使用本地目录作为Tycho构建的目标平台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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