Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Headless PDE Build: Building each plugin separately and then bundling into RCP application?
Headless PDE Build: Building each plugin separately and then bundling into RCP application? [message #461635] Mon, 15 January 2007 06:27 Go to next message
Barrie Treloar is currently offline Barrie TreloarFriend
Messages: 11
Registered: July 2009
Junior Member
My RCP application requires a data set in the order of 500Mb (GIS Map
data). This is relatively static data and doesn't change often.
Therefore it would be nice to build that plugin only when the data changes.

However, I currently have the plugin in the same structure as the rest
of the application so I can automate the build.

Is there a way I can build each plugin only when needed and get the RCP
application to include those already built plugins instead of rebuilding
the entire application?

The only way I can think of is to break the structure up from:
ROOT
- plugins/
- plugin A
- plugin B

To something like:
ROOT_plugin A
- plugins
- plugin A

ROOT_plugin B
- plugins
- plugin B

And maybe create a target platform that is copying these built plugins
into it.

Is there a standard way of doing this?

p.s Half the problem appears to be the inefficient way the bundles are
created, i.e. instead of laying everything out on disk and zipping the
ant tasks appears to update the zip archive, which is exceptionally slow
when they are 500Mb.
Re: Headless PDE Build: Building each plugin separately and then bundling [message #461638 is a reply to message #461635] Mon, 15 January 2007 08:03 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
You should be able to extract those plugins as a feature, and then have your RCP app depend on that feature, in much the same way that you don't depend on re-building the Eclipse RCP platform each time.

Alex.
Re: Headless PDE Build: Building each plugin separately and then bundling [message #461655 is a reply to message #461638] Mon, 15 January 2007 21:59 Go to previous messageGo to next message
Barrie Treloar is currently offline Barrie TreloarFriend
Messages: 11
Registered: July 2009
Junior Member
Alex Blewitt wrote:
> You should be able to extract those plugins as a feature, and then have your RCP app depend on that feature, in much the same way that you don't depend on re-building the Eclipse RCP platform each time.
>
> Alex.

Any chance you could explain this a little more.

So far my build is plugin based. I have not yet converted it to a
feature build (I want to so I can get update sites as well, just haven't
gotten around to it yet).

If I depend upon a feature build, where is the PDE build obtaining the
feature plugins from? The Target Platform?

It really feels like I need to create separate root projects for these
different "features" and then build up different Target Platforms as well.

So that
- ROOT_feature A uses the base Target Platform.
- ROOT_feature B uses base Target Platform plus plugins from feature A
- etc...

Thanks
Re: Headless PDE Build: Building each plugin separately and then [message #461666 is a reply to message #461655] Tue, 16 January 2007 04:55 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
So, getting onto the features is a first start :-)

When you build/compile your plugins, you are (implicitly) depending on the plugins in the target platform (i.e. your installed version of Eclipse). So, whilst you need to compile org.example.foo, you don't need to compile org.eclipse.core.runtime, because it's already there for you.

If you look in your eclipse/features/ directory, you'll find (at least) org.eclipse.platform and org.eclipse.sdk. If you look into the SDK feature, you'll find it will say something like:


<includes
id="org.eclipse.platform"
version="3.2.1.r321_v20060921-b_XVA-INSQSyMtx"/>
[/xml]

So, instead of the SDK having to list everything that it directly depends on, it can just require the org.eclipse.platform feature, and if the org.eclipse.platform feature changes in the future, the SDK doesn't care -- it just takes whatever the feature gives it.

So, I was suggesting that you have two features:

org.example.data.feature (containing org.example.data)
org.example.app.feature (containing org.example.app, depending on org.example.data)

The automated build, on a feature basis, will compile features separately. So you can have one build that compiles the org.example.data.feature (and dependent plugins) separately from the org.example.app.feature (and dependent plugins). Plus, you can then ship them separately, so that the data plugin changes less frequently than the app plugin, in much the same way that (e.g.) the org.eclipse.platform might change more slowly than org.eclipse.sdk.

Of course, in order for this to work, you'll need to move towards a feature-based plugin :-)

The other hack that you could do is to compile the data plugin and copy it into your plugins/ of your target platform. That way, you could still set up and compile your build without having to recompile the data each time. Of course, you'd still need to have a way of updating the data plugin, possibly manually.

Alex.
Re: Headless PDE Build: Building each plugin separately and then [message #462024 is a reply to message #461666] Sun, 21 January 2007 22:57 Go to previous messageGo to next message
Barrie Treloar is currently offline Barrie TreloarFriend
Messages: 11
Registered: July 2009
Junior Member
Alex Blewitt wrote:
> So, I was suggesting that you have two features:
>
> org.example.data.feature (containing org.example.data)
> org.example.app.feature (containing org.example.app, depending on
> org.example.data)
>
> The automated build, on a feature basis, will compile features
> separately. So you can have one build that compiles the
> org.example.data.feature (and dependent plugins) separately from the
> org.example.app.feature (and dependent plugins). Plus, you can then
> ship them separately, so that the data plugin changes less frequently
> than the app plugin, in much the same way that (e.g.) the
> org.eclipse.platform might change more slowly than org.eclipse.sdk.
>
> Of course, in order for this to work, you'll need to move towards a
> feature-based plugin :-)
>
> The other hack that you could do is to compile the data plugin and
> copy it into your plugins/ of your target platform. That way, you
> could still set up and compile your build without having to recompile
> the data each time. Of course, you'd still need to have a way of
> updating the data plugin, possibly manually.

Thank Alex.

I'm still having trouble seeing the difference between the automated
build and the hack.

For the org.example.app.feature build to work I still need the build of
the feature org.example.data.feature to have completed. And then I need
to have the org.example.data.feature plugins available somehow so that
the org.example.app.feature can find them.

How does the PDE build automate retrieval of dependent plugins from a
feature build? From my understanding it doesn't retrieve the plugins as
it expects them to be in your target platform.

It is feeling like I will have a maven project for each of the features
and each project will have its own target platform and I can automate
the population of the target platform via maven prior to invoking the
ant pde build.

Cheers
Barrie
Re: Headless PDE Build: Building each plugin separately and then [message #462025 is a reply to message #462024] Mon, 22 January 2007 03:54 Go to previous message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
> For the org.example.app.feature build to work I still need the build of
> the feature org.example.data.feature to have completed.

Yes, but -- and this is the important point -- they don't have to be done at the same time. You don't recompile org.eclipse.equinox.common each time you do your build, nor (in a Maven project) do you re-build the Log4J libraries if you happen to use them. In fact, Maven pretty much is predicated on building each pom at its own time, and resolving whatever non-source poms are left by reference to the maven repository. It's pretty much the same thing with the headless PDE build, except that the 'repository' is called the 'target platform'.

> How does the PDE build automate retrieval of dependent plugins from a
> feature build? From my understanding it doesn't retrieve the plugins as
> it expects them to be in your target platform.

You can think of the target platform as being the maven repo; that's the set of things you depend on, but don't build. So you'd have two builds; one for your 'data' feature, and the other for the 'code' feature. In the 'data' feature, your plugin is just the standard Eclipse RCP; in the 'code' feature your target platform becomes the RCP+data feature.

So yes, consider this as two separate builds, each with their own feature as output. It's really no different from a system where you have two developer teams producing a core library and a project that uses that library (and don't share maven repositories). You build the core library separately from the users of that library, then at strategic points, bump the version number of the core library up and make it available to the other team; except in your case, the 'core library' just contains data, not code.

Alex.
Previous Topic:Hide view from men
Next Topic:ScrollBar help in Section
Goto Forum:
  


Current Time: Fri Apr 26 06:37:26 GMT 2024

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

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

Back to the top