从远程 p2 站点创建本地 p2 站点?
在 eclipse 中,我创建了一个 .target 文件,在其中添加来自远程 eclipse p2 站点的功能。
现在我想创建一个本地 p2 站点,它是目标定义中定义的聚合功能的副本(最好适用于所有环境)。
我需要将此本地 p2 站点与使用 maven3/tycho 的构建系统一起使用,但尚未找到“稳定”的方法来执行此操作。我尝试过以下操作:
1)将目标文件导出到本地目录。
问题: 不创建 p2 站点,而只是创建一个包含功能/插件的文件夹。
2) 将目标文件导出到本地目录并在该目录上运行 eclipse FeaturesAndBundlesPublisher 应用程序。
问题: 这会创建一个 p2 站点,但缺少一些原始功能/捆绑包。
3) 使用 Buckmeister 根据从 .target 文件初始化的功能创建 p2 站点:
问题: .target 文件内容的原始功能不会保留在生成的 p2 站点中。特别是如果目标文件包含以下功能,这就会成为问题: org.eclipse.equinox.executable.feature 在生成的 p2 站点中将缺少此功能。
4) 复制以下内容:
workspace.metadata.plugins\org.eclipse.pde.core.bundle_pool
问题:不是有效的 p2 站点。
关于如何从远程 p2 站点创建工作(具有完整功能)本地 p2 站点有什么建议吗?
In eclipse I have created a .target file where I add features from remote eclipse p2 sites.
Now I would like to create a local p2 site which is a copy of the aggregated features defined in the target definition (and preferably for all environments).
I need this local p2 site to be used with a build system using maven3/tycho but have not found a "stable" way to do this. I have tried the following:
1) Export the target file to local directory.
Problem:
Does not create a p2 site just a folder with features/plugins.
2) Export the target file to local directory AND run the eclipse FeaturesAndBundlesPublisher application on the directory.
Problem:
This creates a p2 site but some of the original features/bundles are missing.
3) Used buckmeister to create a p2 site from a feature initialized from a .target file:
Problem:
The original features from the content of the .target file are not preserved in the resulting p2 site. Especially this is a problem if the target file contains the feature:
org.eclipse.equinox.executable.feature this feature will be missing in the resulting p2 site.
4) Copy the content of:
workspace.metadata.plugins\org.eclipse.pde.core.bundle_pool
Problem: Is not a valid p2 site.
Any suggestion on how to create a working (with intact features) local p2 site from remote p2 sites?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您想使用 p2 镜像命令。为其指定一个远程存储库 URL 和一个要镜像到的本地目录。这是一个 Ant 宏来执行此操作。请注意它如何进行两次镜像调用,因为大多数 p2 存储库实际上是两个存储库合二为一(工件和元数据)。
它需要“bootstrap.platform”属性集,这是您要使用其 p2 的 Eclipse 安装位置。
You want to use p2 mirror command. Give it a remote repository URL and a local directory to mirror to. Here is an Ant macro to do this. Note how it's making two mirror calls as most p2 repositories are actually two repositories in one (artifacts and metadata).
It needs "bootstrap.platform" property set which is a location of Eclipse install whose p2 you want to use.
您可以直接从命令行运行它,而不是使用 Ant:
输入时每个命令当然应该是一行。
如果您使用 Windows 系统,则目标路径将类似于
如果您需要不同的版本 (
-source
),而不是查看 Eclipse 项目更新站点Instead of using Ant you can run it directly from command line:
Each command should be of course one line when entering.
If your a using a windows system the destination path would be like
If your need a different version (
-source
) than have a look at Eclipse Project Update Sites