Managing Plug-In Dependencies [message #315348] |
Tue, 08 May 2007 21:47  |
Eclipse User |
|
|
|
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 #315435 is a reply to message #315433] |
Wed, 09 May 2007 19:57   |
Eclipse User |
|
|
|
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?
|
|
|
|
Powered by
FUDForum. Page generated in 0.50750 seconds