本文介绍了如何导出具有依赖项的 Eclipse 插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我已经开始编辑一个现有的插件.因此,它具有依赖性.我想把这个插件放到另一个 Eclipse IDE 中(不是我现在的).这个 Eclipse IDE 不会安装依赖的插件 jar.现在我正在使用 droppins 文件夹,但是这并没有安装我需要的依赖项.那么我将这个插件安装到另一个 Eclipse IDE 中的最佳方法是什么?并且作为一个完整的包/简单的一次性步骤.

解决方案

使用 /dropins 的问题是它没有执行依赖解析来查找并包含所有需要的依赖.相反,您需要通过 p2(Eclipse 的软件包安装基础架构)进行安装 - 在 Eclipse 中,当您选择 Help > Install New Software...p>

  • 创建一个功能项目来包含您的插件,将您的插件包含在功能中.在功能编辑器的 Dependencies 选项卡上,使用 Compute 按钮来声明插件所需的依赖项(或者如果您愿意,可以手动添加它们).
  • 为您的功能创建一个更新站点项目.包含您的功能,构建站点(右键单击 site.xml 文件),然后使用 Help > Install New Software... 选择本地更新站点并从中安装.

Eclipse 帮助内容可以详细解释所有这些内容,但这是一个非常简单的过程.

So I have begun to edit an existing plugin. As such it has dependencies. I want to take this plugin and put it into another eclipse IDE (not my current one). This eclipse IDE will not have the dependent plugin jars installed. Right now I am using the droppins folder, however this does not reach out and install the dependencies I need. So what is the best way for me to install this plugin into another eclipse IDE? And as a complete package/simple onetime step.

解决方案

The problem with using /dropins is that it does not perform dependency resolution to find and include all required dependencies. Instead, you'll want to install via p2 (Eclipse's package installation infrastructure) - in Eclipse it's what you get when you select Help > Install New Software...

  • Create a Feature Project to contain your plugin, include your plugin in the Feature. On the Dependencies tab of the Feature editor, use the Compute button to declare the dependencies your plugin requires (or manually add them if you prefer).
  • Create an Update Site Project for your Feature. Include your Feature, build the site (right-click on the site.xml file), and then use Help > Install New Software... to select the local update site and installing from that.

The Eclipse Help Contents can explain more about all of this, but it's a pretty straightforward process.

这篇关于如何导出具有依赖项的 Eclipse 插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 15:34
查看更多