Why plug-in depends on its fragment(s)? [message #878658] |
Tue, 29 May 2012 17:00 |
|
Hello everybody!
I don't understand why plugin depends on its fragment. Consider this
simple scenario:
Main application resides in "plugin.a". According to "best practises"
test are placed in fragment "plugin.a.test".
Dependency tree for "plugin.a" looks like this:
plugin.a
+ some.plugin
+ some.other.plugin
+ ...
+ plugin.a.test <== Why?
I fully understand that fragment depends on its host, but why also
vice-versa?
Because I use fragments for tests (i18n is no matter for me), these
fragments themselves depend on org.junit bundle:
plugin.a.test
+ org.junit
Thus result dependency tree is:
plugin.a
+ some.plugin
+ some.other.plugin
+ ...
+ plugin.a.test
+ org.junit
And dependency calculators like "Add required" button in Run
Configuration always add test fragments and org.junit. For my point of
view it is undesirable and only pollute it.
Am I missing something or it is normal? How to workaround this?
Thanks
Libor
|
|
|
|
Re: Why plug-in depends on its fragment(s)? [message #882284 is a reply to message #880176] |
Wed, 06 June 2012 07:27 |
|
Hello Paul,
I observed that it's only "Plug-in Dependencies" view thing. I was
learning about OSGi dependencies and I used this view to confirm my
"mental model" how dependencies work. PDE is trying to be helpful and,
by default, shows fragments in tree in the same ways as true depending
plug-ins.
Anyway, thank you!
Libor
On 06/01/2012 04:58 PM, Paul Webster wrote:
> What does the manifest and fragment.xml look like in your plugin.a.test?
> What does plugin.a MANIFEST.MF say?
>
> Plugin's generally don't have a dependency on any fragments. By
> definition, a fragment requires its host bundle.
>
> PW
>
|
|
|
Powered by
FUDForum. Page generated in 0.02431 seconds