I just tried to implement this reflection-based option. My tasks added in the plugin context by a custom plugin are not retrieved in the war plugin.
In fact, the pluginContext Map is a different object reference in the two plugins. Isn't the pluginContext designed to share datas between plugins ? 2007/10/19, nicolas de loof <[EMAIL PROTECTED]>: > > An option would be to use reflection to avoid classloaders issues : > Create a ReflectWarPackagingTask that invokes performPackaging by > reflection, so that the passed-by-plugin-context tasks are not casted into > WarPackagingTask. > > Nico. > > > > 2007/10/19, nicolas de loof <[EMAIL PROTECTED]>: > > > > I just realize that for plugins to share components, we need to consider > > classloaders issues : a WarPackagingTask created wy a plugin and passed in > > the plugin context is not assignable to WarPackagingTask class in the war > > plugin classloader, due to per-plugin classloaders. > > > > Would it be possible to use some "command" class available at maven core > > classpath as a packaging task ? > > > > Nico. > > > >
