I'm digging around in the maven-core project, specifically, in the
DefaultPluginManager, populatePluginFields method. The problem I'm having is
in overriding the ComponentConfigurator via the plexus components.xml file.
What I have is something like:
<component-set>
...
<component>
<role>org.codehaus.plexus.component.configurator.ComponentConfigurator
</role>
<implementation>
net.propellors.plexus.component.configurator.RubyComponentConfigurator
</implementation>
</component>
which resides in a base project that is in turn used by a plugin project.
The base project (lets call it, say, maven-script-ruby) has no problem using
the components.xml defined ComponentConfigurator (RubyComponentConfigurator)
when running local tests. However, when I export that project, and try and
run a plugin which was in turn depending upon maven-script-ruby (call it,
maven-rubytest-plugin), the component that I defined is ignored, and it
reverts back to the default (
org.codehaus.plexus.component.configurator.BasicComponentConfigurator). The
problem being, that the rubytest plugin cannot run without the
RubyComponentConfigurator, and a mess ensues:
org.codehaus.plexus.component.configurator.ComponentConfigurationException:
Cannot find setter nor field in RubyMojo for 'prop'
at
org.codehaus.plexus.component.configurator.converters.ComponentValueSetter
.<init>(ComponentValueSetter.java:68)
at
org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration
(ObjectWithFieldsConverter.java:134)
at
org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent
(BasicComponentConfigurator.java:56)
at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields
(DefaultPluginManager.java:1050)
... 19 more
So my question is: How can I get Maven (or Plexus?) to honor my specified
RubyComponentConfigurator component.
Any help would be hot!
Thanks;
Eric