如何从“源"生成可安装形式的Eclipse插件? [英] How do I produce an installable form of an Eclipse plugin from "sources"?

查看:144
本文介绍了如何从“源"生成可安装形式的Eclipse插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要使用的插件的更新站点, OpenCL开发工具,已经死了.但是,似乎某种形式的来源是可用:

An update site for a plugin I want to use, OpenCL development tool, is dead. However, it seems some form of the sources is available:

hu.ngms.opencl.aggregator      19.4 kB  2015-04-08      
hu.ngms.opencl.common         131.4 kB  2015-04-08      
hu.ngms.opencl.editor         829.4 kB  2015-04-08      
hu.ngms.opencl.feature        148.6 kB  2015-04-08      
hu.ngms.opencl.product        188.6 kB  2015-04-08      
hu.ngms.opencl.projectwizard  741.7 kB  2015-04-08

我不是Eclipse开发人员,但我希望我可以以某种形式重新创建该插件,以将其用于在我的Eclipse安装中安装(可能是Eclipse CDT 18.09,可能晚于该版本;如果Eclipse版本是一个问题,我也想知道.)特别是,一个带有此安装过程的压缩更新站点.会很好.

I'm not an Eclipse developer, but I was hoping I could recreate the plugin in some form I could use to install it in my installation of Eclipse (which may be Eclipse CDT 18.09 and may be later than that; if the Eclipse version is an issue, I'd like to know that too.) Specifically, a zipped update site with this installation procedure would be nice.

我该怎么做?

推荐答案

有了源代码,您可以使用Maven插件Eclipse Tycho创建更新站点,我已经为您完成了

Having the sources, you can create an update site using the Maven plug-in Eclipse Tycho, which I have done for you here:

  1. 原始Git存储库(或更准确地说,由于将源分散在多个存储库中,因此我只创建了hu.ngms.opencl.product分叉,将所有内容移动到一个子文件夹中,然后将非空存储库的内容复制到了我的存储库中;为简单起见,但是丢失了其他存储库)
  2. 在根目录中,添加父 pom.xml 文件和 .mvn/extensions.xml 启用无POM 的Tycho并删除子文件夹中不再需要的pom.xml文件
  3. pom.xml文件中,添加 category.xml 文件放入子文件夹
  4. pom.xml文件中,将子文件夹添加为
  1. Fork the original Git repositories (or to be more precise and because the sources were split across multiple repositories, I only forked hu.ngms.opencl.product, moved everything into a subfolder and just copied the content of the non-empty repostiories into my repository; for simplicity's sake, but with losing the history of the other repositories)
  2. In the root directory add a parent pom.xml file and enable Tycho
  3. Add .mvn/extensions.xml to enable POM-less Tycho and delete the no longer required pom.xml files in the subfolders
  4. In the pom.xml file, add the target platform as p2 repository (this is sufficient, but a separate target definition file would be better here since it would allow a more specific definition of the target platform)
  5. For the update site, add a category.xml file into a subfolder
  6. In the pom.xml file, add the subfolders as modules:
    • Both plug-ins, hu.ngms.opencl.editor and hu.ngms.opencl.projectwizard
    • Feature: hu.ngms.opencl.feature
    • Update site (update-site)
  • At the first attempt everything except the update site was successfully built. The removal of the unnecessary (since everything here is platform independent) listing of all supported platforms solved the problem. Alternatively, an older Eclipse target platform with 32 bit support could have been used instead.

有关更多详细信息,请参见 用于构建插件和OSGi捆绑包的Eclipse Tycho和Eclipse应用程序-教程 .

For more details see Eclipse Tycho for building plug-ins, OSGi bundles and Eclipse applications - Tutorial.

这篇关于如何从“源"生成可安装形式的Eclipse插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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