Eclipse:无头 PDE 构建所需的最低 Eclipse 安装是多少?

发布于 2024-08-23 16:50:45 字数 462 浏览 6 评论 0原文

我目前正在无头模式下使用 PDE 构建来构建我的 OSGI Bundle 项目。 PDE Antrunner 任务使用 Eclipse 安装,我只是将其指向我的本地 Eclipse 安装。

不幸的是,我的 Eclipse 安装大约有 260MB 大,但我假设 PDE 构建不需要标准 Eclipse 安装中的所有这些插件。

现在有人知道我进行无头 PDE 构建所需的最少插件列表是什么吗? 我的所有依赖项实际上都在自定义目标平台文件夹中,所以我想我的 Eclipse 安装中唯一需要的是 PDE 构建实际需要的依赖项。但那些是什么? 我可以将安装规模缩减到最小吗?

我的目标是将这个“build-eclipse”文件夹签入到我的项目的 SVN 中,这样当您签出它时,您就拥有了开始完整构建所需的一切,而无需触及任何 build.properties。但如果我可能只需要 20MB,我不想提交 266MB 的 eclipse。

谢谢 克里斯托夫

I am currently using PDE build in headless mode to build my OSGI Bundle project.
The PDE Antrunner task uses an Eclipse installation and I am just pointing it to my local Eclipse installation.

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.

Does anyone now what is the minimum list of plugins I need for doing a headless PDE build?
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. 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. But I don't want to commit 266MB of eclipse if I maybe need only 20MB of it.

Thanks
Christoph

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

櫻之舞 2024-08-30 16:50:45

我今天终于需要自己做这件事(解决我遇到的一个问题是,名称中带有空格的目录没有包含在 PDE Build 生成的捆绑包中)。我最终得到了一些可以构建我的(基于 Java 的)插件集合的东西。我不知道它是否“最小”,但它以 Java PDE 构建为中心,并且比完整的 Eclipse IDE 安装小得多。

我做了粗略的笔记;这里可能有一些遗漏或多余的步骤,但总的来说应该具有指导意义。

I:

  1. 启动了一个最新的 Eclipse IDE(在我的例子中,我目前使用的是 3.5 实例)。
  2. 使用临时工作区,因此对目标平台的更改不会扰乱我的“真实”项目。
  3. 确保目标平台设置为我想要从中提取 PDE 构建器插件的位置(在我的例子中,只是我正在运行的 Eclipse)。 (窗口 | 首选项... | 插件开发 | 目标平台)
  4. 创建了一个新的空项目。
  5. 在该项目中创建了一个新的产品配置(使用“基本设置”)。
  6. 在新产品配置的“概述”页面上,取消选中“该产品包含本机启动器工件”。
  7. 在“依赖关系”中,指定以下插件构成产品:
    • org.eclipse.pde.build
    • org.apache.ant
    • org.eclipse.jdt.core
  8. 选中“包含可选依赖项”。 。 ”。
  9. 单击“添加所需插件”。
  10. 在 Package Explorer 中右键单击产品定义并选择“导出... | Eclipse 产品”。
  11. 告诉它我想要我的 PDE 构建器实例去哪里。
  12. 取消选中“导出前同步”。
  13. 取消选中“生成元数据存储库”。
  14. 单击“完成”。

现在我可以(继续)通过调用如下宏从正常的 Ant 构建启动 PDE 构建(有更好的方法吗?):

<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 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). I eventually got something that could build my collection of (Java-based) plug-ins. I don't know whether it's "minimal", but it's Java PDE Build-focused and much smaller than a full Eclipse IDE install.

I took rough notes; there could be a few omissions or superfluous steps here, but in the main it should guide.

I:

  1. Fired up a recent Eclipse IDE (in my case, the 3.5 instance I use at the moment).
  2. Used a scratch workspace, so changes to the target platform wouldn’t mess up my “real” projects.
  3. Made sure the target platform was set to the place I wanted to draw my PDE builder's plug-ins from (in my case, just my running Eclipse). (Window | Preferences... | Plug-in Development | Target Platform)
  4. Created a new empty project.
  5. Created a new Product Configuration within that project (using the "basic settings").
  6. On the new product configuration's "Overview" page, unchecked “The product includes native launcher artifacts.”
  7. On Dependencies, specified the following plug-ins as constituting the product:
    • org.eclipse.pde.build
    • org.apache.ant
    • org.eclipse.jdt.core
  8. Checked “Include optional dependencies . . .”
  9. Clicked “Add Required Plug-ins”.
  10. Right-clicked product definition in Package Explorer and picked “Export… | Eclipse product”.
  11. Told it where I wanted my PDE builder instance to go.
  12. Unchecked “Synchronize before exporting”.
  13. Unchecked “Generate metadata repository”.
  14. Clicked "Finish".

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?):

<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>
万劫不复 2024-08-30 16:50:45

我无法直接回答你的问题,但我可以稍微挥挥手,其中一些可能会帮助你找到真正的答案。

根据我的 PDE 经验,我发现区分以下内容非常有用:

  • 我用于交互式编辑的 Eclipse IDE
  • 我用于无头 PDE 构建的“Eclipse”安装
  • “目标平台”(插件/功能/等集)我正在构建的东西取决于)

听起来这些在您的头脑中也是清晰的、独立的概念:您已经隔离了“目标平台”,并且正在寻求将交互式 Eclipse 与 PDE 构建器隔离。

您可以尝试在交互式 Eclipse 中创建一个新的(空白)工作区(只是为了确保您正在查看它,而不是您的目标平台),打开“插件”视图,右键单击一个看起来有前途的插件-像org.eclipse.pde.build一样,然后选择“打开依赖项”。 “平面布局”可能是比层次结构更有用的查看结果的方法,尽管在我的 Eclipse 中我似乎无法复制和粘贴此列表。

就我而言,JDT 中没有提及任何内容,这让我认为实际上尝试构建基于 Java 的插件会失败,但希望这会提供另一个线索(例如“找不到 org. eclipse.jdt”,或者其他)。

似乎“应该”有一种方法可以使用软件更新机制、目标平台或 Buckminster 来仅命名一个插件,然后让所有其他插件就位。也许您可以使用目标平台,选择您需要的插件,点击按钮选择所需的插件,然后以某种方式导出一个“构建”,该“构建”将有效地收集所有这些插件?

我承认我们不久前刚刚签入了一个交互式 Eclipse 并将其用作我们的 PDE 构建器。我们不以交互方式使用它,并且我们也维护一个单独的目标平台。我们的偏微分方程构建器显然不是最小的,但也可能是最小的,所以我希望您能用您的发现更新这个空间。

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:

  • The Eclipse IDE I was using for interactive editing
  • The "Eclipse" installation I was using for headless PDE builds
  • The "target platform" (set of plug-ins/features/etc. the thing I'm building depends on)

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.

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". 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.

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 (e.g. "can't find org.eclipse.jdt", or something).

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. 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. 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文