How to build Eclipse Plugin UpdateSite on headless server?

2.7k views Asked by At

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?

1

There are 1 answers

1
eldn On

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.