如何在无头服务器上构建 Eclipse Plugin UpdateSite?

发布于 2024-10-20 06:10:05 字数 1034 浏览 5 评论 0原文

在过去的几天里,我一直在尝试在无头 Debian VM 上测试构建我的 eclipse 插件。使用无头 Debian VM 的原因是,一旦我完成了构建设置,构建和 UpdateSite 将托管在远程服务器上。 到目前为止我已经完成的工作:

  • 构建插件本身 (${Projectname}-${version}.jar)
  • 构建功能 (${Prohjectname}_Feature_${version}.jar)
  • 将功能和插件以及 site.xml 移动到带有 ./features 和 ./plugins 的文件夹 ${structed-folder}

在我的具有完整 Ubuntu 的开发盒上,我能够在 CLI 上运行以下命令来构建所需的 content.jar 和 artifacts.jar

/usr/bin/eclipse -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -metadaRepository file:${folder-to-repo} -artifactRepository file:${folder-to-repo} -source ${structured-folder} -publishArtifacts -compress

:无头构建我尝试用“/usr/bin/eclipse/”替换,

java -jar ${path-to-eclipse/plugins}/org.eclipse.equinox.launcher_${version-string}.jar -initialize -application ...

但这根本没有给我任何输出。然后我尝试安装 eclipse 本身,它在运行时没有产生任何积极的结果/usr/bin/eclipse 需要 GTK 和 X。

所以我的问题是: 在无头模式下构建和发布 Eclipse 插件的正确设置是什么样的?我需要什么插件?我需要下载哪些 Eclipse 部分以及应该如何运行该过程?

For the last few days I have been trying to test-build my eclipse plugin on a headless Debian VM. The reason for the headless Debian VM is that once I have the build setup, the build and the UpdateSite will be hosted on a remote server.
What I have accomplished so far:

  • build the plugin itself (${Projectname}-${version}.jar)
  • build the feature (${Prohjectname}_Feature_${version}.jar)
  • move the feature and plugin and site.xml to a folder ${structured-folder} with ./features and ./plugins

On my development box with full blown Ubuntu, I am able to run the following command on the CLI to build the required content.jar and artifacts.jar:

/usr/bin/eclipse -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -metadaRepository file:${folder-to-repo} -artifactRepository file:${folder-to-repo} -source ${structured-folder} -publishArtifacts -compress

On my headless build I tried to substiture "/usr/bin/eclipse/ with

java -jar ${path-to-eclipse/plugins}/org.eclipse.equinox.launcher_${version-string}.jar -initialize -application ...

But that does not give me any output at all. I then tried installing eclipse itself which it did not lead to any positive results as running /usr/bin/eclipse requires GTK and X.

So my question is:
What does a proper setup to build and publish eclipse plugins in headless mode look like? What plugins do I need? What pieces of eclipse do I need to download and how should I run the process?

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

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

发布评论

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

评论(1

何其悲哀 2024-10-27 06:10:05

我正在使用 ant 和 hudson 构建我们的 eclipse 产品和更新站点。根据您的需要,任务将如下所示:

<java jar="${eclipse.build.launcher}" fork="true" failonerror="true">
    <arg value="-application" />
    <arg value="org.eclipse.ant.core.antRunner" />
    <arg value="-buildfile" />
    <arg file="${basedir}/process_artifacts.xml" />
    <jvmarg value="-Dp2.repo=${repository}" />
</java>

您可以使用 P2 wiki 页面 以 eclipse 为参考。

在我最初设置时,Tycho 尚未准备好使用。几周前我再次尝试过,效果非常顺利,所以我建议尝试一下。

I'm building our eclipse product and update site with ant and hudson. Depending on your needs, the task will look something like this:

<java jar="${eclipse.build.launcher}" fork="true" failonerror="true">
    <arg value="-application" />
    <arg value="org.eclipse.ant.core.antRunner" />
    <arg value="-buildfile" />
    <arg file="${basedir}/process_artifacts.xml" />
    <jvmarg value="-Dp2.repo=${repository}" />
</java>

You can use the P2 wiki page of eclipse as reference.

At the time I initially set that up, Tycho wasn't ready to use. I've tried it out a few weeks ago again and it worked out really smoothly so I suggest to give it a try.

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