Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Looking for advice on plugin 'library' projects
Looking for advice on plugin 'library' projects [message #10651] Thu, 24 April 2003 10:55 Go to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

I have a number of projects that exist just to produce jar files used by
plugins.

In order to conveniently debug in the runtime-workspace, I have made each of
these projects individual plugins. The plugins compile with them through
project dependencies and locate them during debugging through
<requires><import> elements in the manifest.

However, to build a plugin for production, I must manually produce a
build.xml script that compiles each of these 'library' projects into jar
files, copies the jars into the output plugin folder and rewrites the
plugin.xml to change the dependencies to <runtime><library> form.

What I would greatly prefer is a way to set up these projects in a more
natural way, so that the output of each 'library' project is one or more jar
files that are automagically folded into the plugins that depend on them at
debug time, and for which Eclipse will write the build.xml file(s) to
assemble the plugins for production.

Is there a better way to do this?

Bob
Re: Looking for advice on plugin 'library' projects [message #11956 is a reply to message #10651] Thu, 24 April 2003 11:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lmap.canada.com

What about adding the output folders of the "library" project to the
classpath of the plugin project? Would it solve your problem?

"Bob Foster" <bob@objfac.com> wrote in message
news:b88t5m$4v8$1@rogue.oti.com...
> I have a number of projects that exist just to produce jar files used by
> plugins.
>
> In order to conveniently debug in the runtime-workspace, I have made each
of
> these projects individual plugins. The plugins compile with them through
> project dependencies and locate them during debugging through
> <requires><import> elements in the manifest.
>
> However, to build a plugin for production, I must manually produce a
> build.xml script that compiles each of these 'library' projects into jar
> files, copies the jars into the output plugin folder and rewrites the
> plugin.xml to change the dependencies to <runtime><library> form.
>
> What I would greatly prefer is a way to set up these projects in a more
> natural way, so that the output of each 'library' project is one or more
jar
> files that are automagically folded into the plugins that depend on them
at
> debug time, and for which Eclipse will write the build.xml file(s) to
> assemble the plugins for production.
>
> Is there a better way to do this?
>
> Bob
>
>
Re: Looking for advice on plugin 'library' projects [message #12009 is a reply to message #10651] Thu, 24 April 2003 12:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cagatayk.stop.acm.org

Bob Foster wrote:
> I have a number of projects that exist just to produce jar files used by
> plugins.
>
> In order to conveniently debug in the runtime-workspace, I have made each of
> these projects individual plugins. The plugins compile with them through
> project dependencies and locate them during debugging through
> <requires><import> elements in the manifest.
>
> However, to build a plugin for production, I must manually produce a
> build.xml script that compiles each of these 'library' projects into jar
> files, copies the jars into the output plugin folder and rewrites the
> plugin.xml to change the dependencies to <runtime><library> form.
>
> What I would greatly prefer is a way to set up these projects in a more
> natural way, so that the output of each 'library' project is one or more jar
> files that are automagically folded into the plugins that depend on them at
> debug time, and for which Eclipse will write the build.xml file(s) to
> assemble the plugins for production.
>
> Is there a better way to do this?
>
> Bob
>
>

I'd prefer to leave them as actual plugins. I assume you have good
reasons for not doing that and instead rolling them into another plugin.
Still, I'm curious to know what they are :-)).
Re: Looking for advice on plugin 'library' projects [message #12924 is a reply to message #10651] Thu, 24 April 2003 14:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: matt_conway.i2.com

Bob Foster wrote:
> However, to build a plugin for production, I must manually produce a
> build.xml script that compiles each of these 'library' projects into jar
> files, copies the jars into the output plugin folder and rewrites the
> plugin.xml to change the dependencies to <runtime><library> form.

If you don't mind distributing multiple plugins, you can always define a
feature+updatesite and use the build button in the site.xml editor to
build and package all plugins in the feature. I think this makes use of
some eclipse custom ant tasks which would make it easier to write your
own buildfile to do this without the feature/site overhead. I haven't
investigated this much (yet!) though, so let me know what you discover.

> What I would greatly prefer is a way to set up these projects in a more
> natural way, so that the output of each 'library' project is one or more jar
> files that are automagically folded into the plugins that depend on them at
> debug time, and for which Eclipse will write the build.xml file(s) to
> assemble the plugins for production.

I would like this too.

Matt
Re: Looking for advice on plugin 'library' projects [message #12978 is a reply to message #12009] Thu, 24 April 2003 14:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

"Cagatay Kavukcuoglu" <cagatayk@stop.acm.org> wrote in message
news:b893bc$b8t$1@rogue.oti.com...
> I'd prefer to leave them as actual plugins. I assume you have good
> reasons for not doing that and instead rolling them into another plugin.
> Still, I'm curious to know what they are :-)).

There are a couple of reasons for not lumping everything in one big project.
Some of it comes from other sources and I want to keep it isolated so I can
easily tell what, if anything, has been changed. A project that size is just
too unwieldy. I have enough trouble navigating around in the smaller ones.

I could keep them in plugin form, by choosing some appropriate naming
convention so it was obvious to a user what set of plugins corresponded to
the single feature they have installed. There is a little extra overhead
involved here.

But the real problem with maintaining library projects as plugins is that
they aren't plugins. Real plugins have an implied dependency on a couple of
Eclipse plugins which PDE is eager to force on you. These don't depend on
anything in Eclipse. It's awkward to use them in non-plugin projects, like
test projects, regular applications, etc. I would like to use them in a way
that respects their nature.

Bob
Re: Looking for advice on plugin 'library' projects [message #20598 is a reply to message #10651] Mon, 28 April 2003 19:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

If you're just going with multiple projects as a means of organizing
code, you may want to consider using multiple source folders in a single
project. You can then setup build.properties to generate one JAR per
source folder, one JAR for all source folder, or some other combination.
This can work well even in large projects. For example, the entire
java UI in Eclipse is in a single project that is broken into several
source folders.

I definitely would NOT recommend creating multiple plugins purely as a
means of organizing development. If you can't conceive of the pieces
being deployed seperately, then keep them in one plugin. That will make
the install story much easier for your users, and avoid plugin registry
bloat.
--


Bob Foster wrote:
> I have a number of projects that exist just to produce jar files used by
> plugins.
>
> In order to conveniently debug in the runtime-workspace, I have made each of
> these projects individual plugins. The plugins compile with them through
> project dependencies and locate them during debugging through
> <requires><import> elements in the manifest.
>
> However, to build a plugin for production, I must manually produce a
> build.xml script that compiles each of these 'library' projects into jar
> files, copies the jars into the output plugin folder and rewrites the
> plugin.xml to change the dependencies to <runtime><library> form.
>
> What I would greatly prefer is a way to set up these projects in a more
> natural way, so that the output of each 'library' project is one or more jar
> files that are automagically folded into the plugins that depend on them at
> debug time, and for which Eclipse will write the build.xml file(s) to
> assemble the plugins for production.
>
> Is there a better way to do this?
>
> Bob
>
>
Re: Looking for advice on plugin 'library' projects [message #22899 is a reply to message #20598] Tue, 29 April 2003 14:32 Go to previous message
Eclipse UserFriend
Originally posted by: bob.objfac.com

"John Arthorne" <John_Arthorne@oti.com_> wrote in message
news:3EADB342.2070005@oti.com_...
> If you're just going with multiple projects as a means of organizing
> code, you may want to consider using multiple source folders in a single
> project. You can then setup build.properties to generate one JAR per
> source folder, one JAR for all source folder, or some other combination.
> This can work well even in large projects. For example, the entire
> java UI in Eclipse is in a single project that is broken into several
> source folders.

I see your point and thanks.

That approach seems to have some drawbacks, though. It is important to me to
keep these "sub-projects" distinct and control the dependencies between
them. Very reluctant doesn't begin to express how I would feel about mixing
something like Xalan (built from source) together with my own code in CVS.
Not to mention that it might very well be used by multiple projects. Nor do
I want to be the one that introduces a separate Xalan plugin. Other IDEs
have a post-build integration process (sometimes called "deployment") that
allows complex applications to be assembled from the build results of
individual, separate projects. I wish Eclipse had this notion.

But it is easier to work with a tool than fight it. Pointers on how to deal
with the Team/CVS issues are welcome. I see that I can check out into a
folder, but how is the overall project, the part that contains the folders,
plugin.xml, etc., checked in and out?

> I definitely would NOT recommend creating multiple plugins purely as a
> means of organizing development. If you can't conceive of the pieces
> being deployed seperately, then keep them in one plugin. That will make
> the install story much easier for your users, and avoid plugin registry
> bloat.

That's a misunderstanding. I don't deploy them as separate plugins; the fact
that they are plugins at all is purely so I can run/debug with PDE. I would
much prefer that these projects just build library jars. If you can suggest
a way to have separate projects build library jars that can be used by a
plugin launched with PDE without any manual steps, that would solve my
problem!

Bob
Previous Topic:Stuck again - ProgressMonitorDialog this time
Next Topic:org.eclipse.ui.parts.editors missing in v2.1
Goto Forum:
  


Current Time: Mon May 12 17:43:51 EDT 2025

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

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

Back to the top