Our product (consisting of various plugins and features) is built on Eclipse, using Maven and Tycho, and we wish to support it on all Eclipse versions from Luna (V4.4) to 2019/12 (V4.14) inclusive. We will want to support it on newer versions when they become available. Until recent versions we had no problems but now we've hit an issue regarding the plugin 'org.eclipse.equinox.ds'. I have been attempting to build both Neon (V4.6) and 2019/12 (V4.14) and, whilst I can build each separately by changing the configuration in our .product file, I have been unable to discover a means to build both using the same file. Below is a summary of the errors I'm seeing (some names have been changed to protect the innocent):
************************************
BUILDING NEON
Building with config:
<configurations>
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
</configurations>
Builds Neon OK but 4.14 build fails with:
Building Productised Foo IDE (E4_1464).
Log file written to /home/jdoe/checkouts/foo-eclipse/build/E4_1464/build_productised.log
Cannot complete the install because one or more required items could not be found.
Software being installed: Foo IDE 9.0.0 (com.example.products.eclipse.foopp.product.ide 9.0.0)
Missing requirement: toolinggtk.linux.x86_64org.eclipse.equinox.ds 9.0.0 requires 'osgi.bundle; org.eclipse.equinox.ds 1.6.100.v20191001-1333' but it could not be found
Cannot satisfy dependency:
From: Foo IDE 9.0.0 (com.example.products.eclipse.foopp.product.ide 9.0.0)
To: org.eclipse.equinox.p2.iu; toolingcom.example.products.eclipse.foopp.product.ide.configuration [9.0.0,9.0.0]
Cannot satisfy dependency:
From: toolingcom.example.products.eclipse.foopp.product.ide.configuration 9.0.0
To: org.eclipse.equinox.p2.iu; toolinggtk.linux.x86_64org.eclipse.equinox.ds [9.0.0,9.0.0]
There were errors. See log file: /home/jdoe/checkouts/foo-eclipse/workspace/.metadata/.log
Failed to build the Productised Foo IDE (E4_1464), see log for details
The entries in /home/jdoe/checkouts/foo-eclipse/workspace/.metadata/.log
merely repeat the error shown above
************************************
BUILDING 4.14
Building with config:
<configurations>
<plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
</configurations>
Builds 4.14 OK but Neon fails with:
Building Productised Foo IDE (Neon64).
Log file written to /home/jdoe/checkouts/foo-eclipse/build/Neon64/build_productised.log
gogo: InterruptedException: sleep interrupted
java.lang.InterruptedException: sleep interrupted
at java.lang.Thread.sleep(Native Method)
at org.apache.felix.gogo.shell.Activator.run(Activator.java:72)
at java.lang.Thread.run(Thread.java:748)
Gtk-Message: 10:15:47.869: Failed to load module "canberra-gtk-module"
Failed to build the Productised Foo IDE (Neon64), see log for details
The log file contains:
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (Install Platform Feature (Neon64)) on project foo.product: Command execution failed.: Process exited with an error: 13 (Exit value: 13) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (Install Platform Feature (Neon64)) on project foo.product: Command execution failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
[... more stack-trace ...]
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:276)
[... more stack-trace ...]
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 13 (Exit value: 13)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
[... more stack-trace ...]
However, if I add <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
to the above config, it will build Neon but not 4.14.
************************************
I'm using Java 1.8 (the Oracle JDK) on Linux (Ubuntu 18.04, 64-bit) and building using Maven (V3.6.0) with the Tycho plugin (version 1.7.0).
My ideal solution would be a single configuration that would build all my required Eclipse versions. Is this even possible? If so, how?
I'd be very grateful for any help/advice. Please ask if you need more information.