Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Managing Plug-In Dependencies
Managing Plug-In Dependencies [message #315348] Tue, 08 May 2007 21:47 Go to next message
Eclipse UserFriend
Originally posted by: dshaw.avaya.com

I'm exploring PDE for the first time. I've created two PDE projects:
com.example.core and com.example.business. I can work within each one just
fine and generate the respective plug-in jar files. However when I try to
export a product containing both of them I run into trouble. When the
business classes are being built they give compile errors which state that
the core classes cannot be found. This is hard to explain as the business
plug-in depends on the core plug-in and the core plug-in exports its
packages to dependent plug-ins. Does anyone have any thoughts on what I
might be doing wrong? Is there a good tutorial on this somewhere? I've
worked through the Eclipse help and so on, but it only seems to deal with
how to make a single plug-in, not a product that contains two or more.

Some more detail:

The core plug-in depends on org.eclipse.core.runtime. It also contains
some third party libraries, eg. lib/extra.jar. At runtime it exports the
core packages and the third party-library packages. The third-party
libraries are included in the plug-in classpath and the build properties.
When I export the core plug-in it builds a single jar containing the third
party libs and the core classes. (Unless the third party libs were on the
plug-in classpath I'd get compile errors during the export step only, due
to missing third party classes.)

The business plug-in is even simpler. It depends on the core plug-in and
org.eclipse.core.runtime. It doesn't export anything or include anything
in its plug-in classpath or build.properties. There are no third-party
libraries. When I export the business plug-in it builds a single jar
containing the business classes.

One of the business classes is an application, ie. it use the application
extension point. I then added a product (using an extension point) that
refers to this application. I can test this application from the product
definition within Eclipse and it runs successfully.

When I go to export the product I get build errors. When the business
classes are being compiled, the core classes cannot be found. (Although
the third party classes can it seems.) After trying many things I can't
get past this step. Any thoughts?
Re: Managing Plug-In Dependencies [message #315392 is a reply to message #315348] Wed, 09 May 2007 10:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lamont_gilbert.rigidsoftware.com

On Wed, 09 May 2007 01:47:18 +0000, David Shaw wrote:

> I'm exploring PDE for the first time. I've created two PDE projects:
> com.example.core and com.example.business. I can work within each one just
> fine and generate the respective plug-in jar files. However when I try to
> export a product containing both of them I run into trouble. When the
> business classes are being built they give compile errors which state that
> the core classes cannot be found. This is hard to explain as the business
> plug-in depends on the core plug-in and the core plug-in exports its
> packages to dependent plug-ins. Does anyone have any thoughts on what I
> might be doing wrong? Is there a good tutorial on this somewhere? I've
> worked through the Eclipse help and so on, but it only seems to deal with
> how to make a single plug-in, not a product that contains two or more.
>
> Some more detail:
>
> The core plug-in depends on org.eclipse.core.runtime. It also contains
> some third party libraries, eg. lib/extra.jar. At runtime it exports the
> core packages and the third party-library packages. The third-party
> libraries are included in the plug-in classpath and the build properties.
> When I export the core plug-in it builds a single jar containing the third
> party libs and the core classes. (Unless the third party libs were on the
> plug-in classpath I'd get compile errors during the export step only, due
> to missing third party classes.)
>
> The business plug-in is even simpler. It depends on the core plug-in and
> org.eclipse.core.runtime. It doesn't export anything or include anything
> in its plug-in classpath or build.properties. There are no third-party
> libraries. When I export the business plug-in it builds a single jar
> containing the business classes.
>
> One of the business classes is an application, ie. it use the application
> extension point. I then added a product (using an extension point) that
> refers to this application. I can test this application from the product
> definition within Eclipse and it runs successfully.
>
> When I go to export the product I get build errors. When the business
> classes are being compiled, the core classes cannot be found. (Although
> the third party classes can it seems.) After trying many things I can't
> get past this step. Any thoughts?

Is this prouct based on features or plugins? Are the plugins built to
linked output folders? Does your export target location contain the
required basic Eclipse structure?

When I export the product it does not automatically export the features
its based on. To get the features I must export them seperately.
Re: Managing Plug-In Dependencies [message #315433 is a reply to message #315392] Wed, 09 May 2007 19:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dshaw.avaya.com

The product is based on plug-ins, not features. But it's not so much what
the product is based on, it's building the product when it consists of
more than one of my plug-ins.

To get around my problem, I've created a single plug-in containing both
the core and business classes (and the third party libraries). This is not
ideal, but I was able to successfully export this as a product and it
would run.

So the problem seems to be the dependencies between my plug-ins when I
build a product based on two (or more) plug-ins. Any thoughts on what I'm
doing wrong?
Re: Managing Plug-In Dependencies [message #315435 is a reply to message #315433] Wed, 09 May 2007 19:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lamont_gilbert.rigidsoftware.com

On Wed, 09 May 2007 23:28:17 +0000, David Shaw wrote:

> The product is based on plug-ins, not features. But it's not so much what
> the product is based on, it's building the product when it consists of
> more than one of my plug-ins.

The build is different based on what the produce is made of. My question
was asked because this affects the way dependencies are calculated. If it
were features, then the build would not care about the plugin
dependencies as listed in the plugins themselves. it will only care
about them as listed in the feature manifest.

>
> To get around my problem, I've created a single plug-in containing both
> the core and business classes (and the third party libraries). This is not
> ideal, but I was able to successfully export this as a product and it
> would run.
>
> So the problem seems to be the dependencies between my plug-ins when I
> build a product based on two (or more) plug-ins. Any thoughts on what I'm
> doing wrong?


I had similar problem before, by chance does the export work? I know it
throws up errors, but is the build actually complete and runnable? Mine
usually were.

Also are you using any linked resources? Which version of eclipse are you
using?
Re: Managing Plug-In Dependencies [message #315476 is a reply to message #315348] Thu, 10 May 2007 08:20 Go to previous message
Eclipse UserFriend
What does your core build.properties look like?

Usually if you are including 3rd party libs, your classpath needs to have:
Bundle-ClassPath: ., lib/lib1.jar, lib/lib2.jar

Check out
http://wiki.eclipse.org/index.php/Plug-in_Development_Enviro nment which
has a useful list for creating a plugin that contains 3rd party jars

PW
Previous Topic:accessing OSGI services from command line
Next Topic:Choice & Sequences in Extension Point
Goto Forum:
  


Current Time: Mon Jul 14 07:13:03 EDT 2025

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

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

Back to the top