I have an Eclipse E4 RCP product, which used to be exportable using Eclipse 4.29. The export worked just fine for multiple platforms (usually gtk.linux.x86_64 and win32.win32.x86_64).
I have a freshly installed Eclipse IDE 4.31 for RCP developments (using java-17-openjdk and kubuntu 23-10). Also the workspace is a new one (because migrating the old one produced some exceptions in the IDE later, but this is not the problem now). I removed some javax
dependencies since they were deprecated in Eclipse 4.30 (annotation and injection as well as servlet-api as a dependency from some platform bundle).
The project is unchanged apart from renaming javax
to jakarta
for annotations and injection imports. The product definition (content tab) has been adapted for the new dependencies. The project compiles just fine.
When I export the product for the (single) linux platform, this works without errors. However the folder org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.900.v20240129-1338
is missing from the plugins
folder in the export. Consequently the product cannot be started, because the launcher shared library resides in that folder. If I add the folder from the p2 cache (.../workspaces/Skylog_4/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/plugins), the product launches normally and works as designed.
When I export for multiple platforms, I get an error that the dependency to the win32 launcher (org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.900.v20240213-1244
) could not be resolved. The plugin is present in the target (visible in the contents folder) and it is also in the p2 cache (see above).
I also tried Eclipse 4.30 as target, which produced the same results (missing folder resp. unresolved win32 dependency).
This is my new target definition:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="Eclipse RCP 4.31">
<locations>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<repository location="https://download.eclipse.org/releases/2024-03"/>
<unit id="org.eclipse.equinox.sdk.feature.group" version="3.23.1100.v20240218-1855"/>
<unit id="org.eclipse.sdk.feature.group" version="4.31.0.v20240229-1022"/>
<unit id="org.eclipse.rcp.source.feature.group" version="4.31.0.v20240229-0520"/>
<unit id="org.eclipse.emf.sdk.feature.group" version="2.37.0.v20240203-1010"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/latest"/>
<unit id="jakarta.inject.jakarta.inject-api" version="2.0.1"/>
<unit id="jakarta.annotation-api" version="2.1.1"/>
<unit id="org.apache.commons.commons-io" version="2.15.1"/>
<unit id="org.apache.commons.commons-logging" version="1.3.0"/>
<unit id="org.apache.commons.jxpath" version="1.3.0"/>
<unit id="jakarta.servlet-api" version="4.0.0"/>
<unit id="com.sun.jna" version="5.14.0.v20231211-1200"/>
<unit id="com.sun.jna.platform" version="5.14.0"/>
</location>
</locations>
</target>
It uses the new (may be only for me) orbit-aggregation repo instead of the various drops used in the old definition. So this also now uses the recommended sources.
This has been the old target definition used with Explipse 4.29:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="Skylog 4 RCP 4.29">
<locations>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/releases/2023-09"/>
<unit id="org.eclipse.emf.sdk.feature.group" version="2.35.0.v20230829-0934"/>
<unit id="org.eclipse.sdk.feature.group" version="4.29.0.v20230903-1000"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/eclipse/updates/4.29"/>
<unit id="org.eclipse.equinox.sdk.feature.group" version="3.23.900.v20230808-1403"/>
<unit id="org.eclipse.rcp.feature.group" version="4.29.0.v20230903-1000"/>
<unit id="org.eclipse.rcp.source.feature.group" version="4.29.0.v20230903-1000"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20230403150144/repository"/>
<unit id="com.sun.jna" version="5.12.1.v20221103-2317"/>
<unit id="com.sun.jna.platform" version="5.12.1.v20221103-2317"/>
<unit id="javax.annotation" version="1.3.5.v20221203-1659"/>
<unit id="javax.inject" version="1.0.0.v20220405-0441"/>
<unit id="org.apache.commons.io" version="2.8.0.v20210415-0900"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20150519210750/repository/"/>
<unit id="org.apache.commons.jxpath" version="1.3.0.v200911051830"/>
</location>
</locations>
</target>
It seems to have been a bug in Eclipse 3.31. Using eclipse 4.32 exporting a product works again.