views:

98

answers:

2

I have an Eclipse RCP plug-in project, called proj.a.

I have another Eclipse RCP plug-in project, proj.b, which has a product definition file in it. This project uses depends on the proj.a plug-in.

When I change proj.a, say to include JUnit tests, the dependency to JUnit is automatically added to the build path of proj.a.

But when I go to run the product I have defined in proj.b, I have to manually add the dependency to the product definition in proj.b.

Why is that? Can't eclipse figure out that the product depends on JUnit? Or is this the problem domain of Buckminster and Maven and the like?

A: 

I'm not sure this will help but you need to reexport the dependency if you want other plugins downstream to see the dependencies plugin A have. You can do that on the Dependency tab in the PDE-editor (Properties button)

Kire Haglin
A: 

The product file lists the whole dependency graph. If you add a dependency to Junit in plugin.a it's like you say plugin.a cannot be run without JUnit. And the product file lists all plugins that are defined in other plugins as depenedencies. So I'm wondering why you add Junit as a dependency for your plugin.a Best practise is to create a separate plugin with all your testcases that references to plugin.a and Junit. And this newly created plugin is not listed in your product file (wo wants to ship JUnit and Testcases with the final build?) In addition there is no need to add dependencies manually In your product-editor you have a button "Add required plugins" which does that job for you.

toms