[英]Eclipse: What is the minimum Eclipse installation needed for a headless PDE build?
I am currently using PDE build in headless mode to build my OSGI Bundle project. 我目前正在无头模式下使用PDE构建来构建我的OSGI Bundle项目。 The PDE Antrunner task uses an Eclipse installation and I am just pointing it to my local Eclipse installation.
PDE Antrunner任务使用Eclipse安装,我只是指向我的本地Eclipse安装。
unfortunatelly my eclipse installation is about 260MB big, but I assume that a PDE build does NOT require all of those plugins in a standard eclipse installation. 不幸的是,我的eclipse安装大约260MB,但我认为PDE版本不需要在标准的eclipse安装中使用所有这些插件。
Does anyone now what is the minimum list of plugins I need for doing a headless PDE build? 现在有人做了无头PDE构建所需的最小插件列表吗? All of my dependencies I actually have in a custom target platform folder, so I guess the only thing I need from my eclipse installation are the dependencies which PDE build actually needs.
我在自定义目标平台文件夹中实际拥有的所有依赖项,所以我想我在eclipse安装中唯一需要的是PDE构建实际需要的依赖项。 But what are those?
但是那些是什么? Can I shrink my installation to a very minimum?
我可以将安装缩小到最低限度吗?
My goal is to also check-in this "build-eclipse" folder into my project's SVN so that when you check it out, you have everything you need to start a full build, without touching any build.properties. 我的目标是在我的项目的SVN中签入这个“build-eclipse”文件夹,这样当你检查它时,你就拥有了启动完整构建所需的一切,而不需要触及任何build.properties。 But I don't want to commit 266MB of eclipse if I maybe need only 20MB of it.
但如果我可能只需要20MB的话,我不想提供266MB的日食。
Thanks Christoph 谢谢Christoph
I finally needed to do this myself today (to address a problem I was having where directories with spaces in their names weren't being included in the bundle PDE Build produced ). 我今天终于需要自己这样做了(为了解决我所遇到的问题,其名称中包含空格的目录未包含在生成的PDE Build包中 )。 I eventually got something that could build my collection of (Java-based) plug-ins.
我最终得到了一些可以构建我的(基于Java的)插件集合的东西。 I don't know whether it's "minimal", but it's Java PDE Build-focused and much smaller than a full Eclipse IDE install.
我不知道它是否是“最小”,但它是以Java PDE Build为重点,并且比完整的Eclipse IDE安装小得多。
I took rough notes; 我粗略地记笔记; there could be a few omissions or superfluous steps here, but in the main it should guide.
这里可能会有一些遗漏或多余的步骤,但主要是它应该引导。
I: 一世:
org.eclipse.pde.build
org.apache.ant
org.eclipse.jdt.core
Now I can (continue to) launch a PDE Build from my normal Ant build by invoking a macro like the following (is there a better way?): 现在我可以(继续)通过调用如下的宏来从我的普通Ant构建启动PDE Build(有更好的方法吗?):
<macrodef name="build-a-product">
<attribute name="config-dir"/>
<sequential>
<property name="product-build-file" value="${pde-builder-path}\plugins\org.eclipse.pde.build_3.5.2.R35x_20100114\scripts\productBuild\productBuild.xml" />
<java jar="${pde-builder-path}\plugins\org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar" fork="yes" failonerror="yes" >
<arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" />
<arg value="-buildfile" />
<arg value="${product-build-file}" />
<arg value="-Dbuilder=@{config-dir}" />
<arg value="-Dbasedir=${basedir}" />
</java>
</sequential>
</macrodef>
I can't directly answer your question, but I can wave my hands around a little bit, some of which might help you find a real answer. 我不能直接回答你的问题,但我可以挥手一点,其中一些可能会帮助你找到真正的答案。
In my PDE experience I have found it very useful to distinguish: 在我的PDE体验中,我发现区分它非常有用:
It sounds like these are clear, separate concepts in your head as well: you have already isolated the "target platform" and are looking to isolate your interactive Eclipse from your PDE builder. 听起来这些都是清晰,独立的概念:您已经隔离了“目标平台”,并希望将您的交互式Eclipse与PDE构建器隔离开来。
You could try creating a new (blank) workspace in your interactive Eclipse (just to be sure you're looking at it, not at your target platform), opening the "Plug-ins" view, right-clicking a promising-looking plug-in like org.eclipse.pde.build
, and choosing "Open Dependencies". 您可以尝试在交互式Eclipse中创建一个新的(空白)工作区(只是为了确保您正在查看它,而不是在目标平台上),打开“插件”视图,右键单击看似有希望的插件-in像
org.eclipse.pde.build
,并选择“Open Dependencies”。 The "Flat Layout" might be a more useful way to view the results than the hierarchical, though in my Eclipse I don't seem to be able to copy and paste this list. “平面布局”可能是比分层结构更有用的查看结果的方式,但在我的Eclipse中我似乎无法复制和粘贴此列表。
In my case this didn't mention anything in the JDT which makes me think that actually trying to build a Java-based plug-in would fail, but hopefully that would provide another lead (eg "can't find org.eclipse.jdt
", or something). 在我的情况下,这没有提到JDT中的任何内容,这让我觉得实际上尝试构建基于Java的插件会失败,但希望这会提供另一个引导(例如“找不到
org.eclipse.jdt
“, 或者其他的东西)。
It seems like there "ought" to be a way to use the Software Updates mechanism, Target Platform, or Buckminster to just name one plug-in and have all the others fall into place. 看起来似乎“应该”使用软件更新机制,目标平台或Buckminster来命名一个插件并让所有其他插件到位。 Maybe you could use the Target Platform, select the plug-in you need, hit the button to select required ones, then somehow export a "build" that would effectively just collect all those plug-ins?
也许您可以使用目标平台,选择您需要的插件,点击按钮选择所需的插件,然后以某种方式导出一个“构建”,有效地收集所有这些插件?
I confess that we just checked in an interactive Eclipse some time ago and use it as our PDE builder. 我承认我们刚刚在交互式Eclipse中签入并将其用作我们的PDE构建器。 We don't use it interactively, and we do maintain a separate target platform as well.
我们不会以交互方式使用它,我们也会维护一个单独的目标平台。 Our PDE builder is clearly not minimal, but could also perhaps stand to be, so I hope you'll update this space with your discoveries.
我们的PDE构建器显然不是最小的,但也可能是,所以我希望您将用您的发现更新此空间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.