It sounds like what you are doing is correct. If you have a plugin "A" and it
has some classes that you want available to plugin "B", then plugin
"B"'s descriptor should have a <depends> tag on plugin "A":
<plugin name="B" ...>
<depends plugin="A" useClasses="true" />
...
</plugin>
What this does is put A's plugin classloader as the parent to B's plugin
classloader. You do not have to do anything else other than put that <depends> in
your descriptor (no need to put the plugin jar in your plugin jar's lib directory).
FYI: The useClasses, if not defined, is inferred on the last <depends> tag listed in
the descriptor. If you only have one <depends> tag, its useClasses is assumed true
if its not specified.
BTW: recently, alot of work has gone into trunk that performs more classloading
"stuff". See:
http://jopr.org/confluence/display/RHQ/Plugin+Dependencies+and+Class+Loaders
----- Original Message -----
From: "Bruno Wassermann" <bruno.wassermann(a)googlemail.com>
To: "jopr-dev" <jopr-dev(a)lists.jboss.org>
Sent: Thursday, July 30, 2009 5:46:05 PM GMT -05:00 US/Canada Eastern
Subject: Re: [jopr-dev] Plugin Dependencies
Whoops, it should rather be <depends plugin="xyz" useClasses="true/>,
right? Sorry about the premature question :(
-- Bruno
On Thu, Jul 30, 2009 at 10:41 PM, Bruno Wassermann < bruno.wassermann(a)googlemail.com
> wrote:
Hi,
This may be a typical newbie question...
I want the Axis plugin to be able to reuse some classes defined in the Tomcat plugin,
namely TomcatConfig. To achieve this lofty goal I add the following to
Axis.rhq-plugin.xml: <depends plugin="Tomcat"/>.
However, at runtime the class loader for the Axis plugin doesn't seem to have loaded
Tomcat's classes. Asking the agent to run a discovery scan, the Axis plugin reports a
NoClassDefFoundError for org.jboss.on.tomcat.helper.TomcatConfig.
What am I getting wrong here? Do I have to manually add the Tomcat plugin's jar file
to my plugin?
Many thanks,
-- Bruno
_______________________________________________
jopr-dev mailing list
jopr-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jopr-dev