Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329436 - Reverse dependencies to avoid specific build according to platform
Summary: Reverse dependencies to avoid specific build according to platform
Status: RESOLVED FIXED
Alias: None
Product: SWTBot
Classification: Technology
Component: SWTBot (show other bugs)
Version: 2.0.0-dev   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-04 09:48 EDT by Mickael Istria CLA
Modified: 2012-12-08 09:35 EST (History)
0 users

See Also:


Attachments
Suggested refactoring of bundles for org.eclipse.swtbot.junit4_x (50.82 KB, application/x-zip)
2010-11-04 09:50 EDT, Mickael Istria CLA
no flags Details
Beginning of refactoring of the org.eclipse.swtbot.eclipse.ui bundle (72.19 KB, application/x-zip)
2010-11-04 13:33 EDT, Mickael Istria CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2010-11-04 09:48:14 EDT
The org.eclipse.swtbot.junit4_x bundle and org.eclipse.swtbot.eclipse.ui have different code inside according to the version of Junit or Eclipse.
That makes the build very difficult to run and maintain.

We'd rather use a more OSGi-friendly way to deal with these dependencies to improve usability and openness of the project to new contributors
Comment 1 Mickael Istria CLA 2010-11-04 09:50:27 EDT
Created attachment 182368 [details]
Suggested refactoring of bundles for org.eclipse.swtbot.junit4_x

This splits some bundles, and move some classes to avoid platform-specific MANIFEST and so on.

It is not well tested at the moment... But I'll try work on it !
Comment 2 Mickael Istria CLA 2010-11-04 13:33:39 EDT
Created attachment 182400 [details]
Beginning of refactoring of the org.eclipse.swtbot.eclipse.ui bundle

This archive contains the bundle splitted into several Eclipse-version-specific bundles.
It has currently an issue under Helios. (Caused by: org.osgi.framework.BundleException: The activator org.eclipse.swtbot.eclipse.ui.Activator for bundle org.eclipse.swtbot.eclipse.ui is invalid)
Comment 3 Mickael Istria CLA 2010-11-08 04:07:58 EST
I created a new branch for SWTBot. You can find it here: https://github.com/mickaelistria/SWTBot.

I mainly consists in separating the 2 bundles that has some version-specific source folders into 2 different bundles using a strict version for org.eclipse.core.runtime dependency and using it as an optional dependency in other bundles.
That way, according to the version of org.eclipse.core.runtime, only one of these bundles will be loaded by other bundles that depend on it.

I tested it in dev-mode (ie I did not built it yet), and it works correctly.

Next step is to update the build to follow this refactoring. I'll probably give a try to Tycho, which solves naturally the dependency managements issues at runtime, allowing bundles to be build against different target platforms.
Comment 4 Mickael Istria CLA 2012-12-08 09:35:14 EST
This was fixed as part of the move to Tycho. Minimum compatibility for future releases is Helios, and Junit 4.