How to build Eclipse Plugin UpdateSite on headless server?
Asked Answered
P

1

7

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?

Periphrastic answered 1/3, 2011 at 10:0 Comment(1)
I'm not sure I'm gonna help you with existing build but I would suggest you to switch over to the tycho based build. You can find more info at eclipse tycho or sonatype tycho. I've tried setup two PDE based builds and IMO tycho is much much faster and nicer way to setup build and update site. There might be some issues. For an example take a look at this blog. I have a more real world example at github.Toboggan
E
0

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.

Egad answered 15/4, 2011 at 10:51 Comment(1)
Is there an example of a process_artifacts.xml? What should be the value of ${repository} ? Best regards Thomas.Orourke

© 2022 - 2024 — McMap. All rights reserved.