Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Building pure e4 application with maven/tycho(Unable to get rid of 3.x workbench plugins)
Building pure e4 application with maven/tycho [message #1794751] Thu, 06 September 2018 05:33 Go to next message
Robert Hilbrich is currently offline Robert HilbrichFriend
Messages: 12
Registered: April 2018
Location: Berlin
Junior Member

I am building a small e4 application and everything is coming along nicely. You can see the code here [1]. When I tried to add keyboard shortcuts for menu items, I stumbled over this [2] and realized, that in addition to the 4.x workbench plugins, somehow also the 3.x style workbench plugins (org.eclipse.ui.workbench, ...) were added to the target platform (and the final product).

When I manually removed these plugins after the deployment from the plugins folder of the final product, the keyboard shortcuts were working and shown right next to the menu items.

My next goal was to get rid of these 3.x workbench plugins in the target platform. In the Eclipse launcher, I was able to get rid of the 3.x workbench plugins simply by deselecting these plugins from the list of enabled plugins. The application launched just fine - and the shortcuts were there.

Finally, I wanted to do the same thing with my maven/tycho build. At first, I tried to manually remove the plugin from the target platform. Unfortunately, tycho/maven does not support that and provided me with link to "Filtering" (see [3]) in the target platform. I tried that approach by filtering the eclipse-plugin "org.eclipse.ui.workbench" (and also org.eclipse.compare):
<filters>
	<filter>
		<type>eclipse-plugin</type>
		<id>org.eclipse.ui.workbench</id>
		<removeAll />
	</filter>
	<filter>
		<type>eclipse-plugin</type>
		<id>org.eclipse.compare</id>
		<removeAll />
	</filter>
</filters>

Unfortunately, the dependency resolution of the build failed, because org.eclipse.platform.feature.group seems to require compare (which requires workbench):
[ERROR]   Software being installed: blackant 1.0.0
[ERROR]   Missing requirement: org.eclipse.platform.feature.group 4.8.0.v20180611-0656 requires 'org.eclipse.equinox.p2.iu; org.eclipse.compare [3.7.200.v20180418-1233,3.7.200.v20180418-1233]' but it could not be found
[ERROR]   Cannot satisfy dependency: blackant 1.0.0 depends on: org.eclipse.equinox.p2.iu; org.eclipse.platform.feature.group [4.8.0.v20180611-0656,4.8.0.v20180611-0656]


My target platform is pretty simple:
<locations>
		<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
			<repository location="http://download.eclipse.org/releases/photon"/>
			<unit id="org.eclipse.equinox.sdk.feature.group" version="3.14.0.v20180518-2029"/>
			<unit id="org.eclipse.sdk.feature.group" version="4.8.0.v20180611-0826"/>
			<unit id="org.eclipse.xtend.sdk.feature.group" version="2.14.0.v20180523-0937"/>
		</location>
		<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
			<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20180606145124/repository"/>
			<unit id="org.apache.commons.io.source" version="2.2.0.v201405211200"/>
			<unit id="javax.xml" version="1.3.4.v201005080400"/>
			<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/>
			<unit id="org.apache.commons.collections" version="3.2.2.v201511171945"/>
			<unit id="org.apache.poi" version="3.9.0.v201405241750"/>
			<unit id="org.apache.poi.ooxml" version="3.9.0.v201405241905"/>
			<unit id="org.apache.poi.ooxml.schemas" version="3.9.0.v201405241750"/>
			<unit id="org.apache.xmlbeans" version="2.3.0.v201605172150"/>
		</location>
	</locations>

I know the app works fine, when I use the eclipse builder / launcher. So in short, my question is: what feature(s) should I add to my target platform, so that I can have a maven/tycho build and no dependency to org.eclipse.ui.workbench?

[1]: https://github.com/roberthilbrich/blackant
[2]: https://www.eclipse.org/forums/index.php/t/842677/
[3]: https://wiki.eclipse.org/Tycho/Target_Platform#Filtering
Re: Building pure e4 application with maven/tycho [message #1794804 is a reply to message #1794751] Thu, 06 September 2018 18:57 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 845
Registered: July 2009
Senior Member
I think you should select the org.eclipse.e4.rcp feature (not org.eclipse.rcp feature) to your product contents to get rid of the eclipse.ui plugin.
Re: Building pure e4 application with maven/tycho [message #1794817 is a reply to message #1794804] Fri, 07 September 2018 06:14 Go to previous message
Robert Hilbrich is currently offline Robert HilbrichFriend
Messages: 12
Registered: April 2018
Location: Berlin
Junior Member

Thanks - you are right and it is working now.

The target platform still contains "org.eclipse.sdk.feature.group", but my custom plugin is only referring to the "org.eclipse.e4.rcp" feature and no longer to the "org.eclipse.rcp" as well.
Previous Topic:Eclipse 3.7 RCP app -> e4 RCP
Next Topic:How to remove breakpoint condtional?
Goto Forum:
  


Current Time: Sat Sep 22 05:53:08 GMT 2018

Powered by FUDForum. Page generated in 0.01584 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top