I'm writing a Maven plugin that requires a customized version of the SCP Wagon.
While I've written a number of plugins in the past, this is the first time I've
tried to create a Plexus component and I seem to be stuck.
Here's what I've done:
* In one project, I have a class (...JschTunnelWagon), an interface
(...TunnelWagon), and a components.xml file (in src/main/resources/plexus) with
this content:
<component-set>
<components>
<component>
<role>org.apache.maven.wagon.Wagon</role>
<role-hint>ssh-pf</role-hint>
<implementation>com.mtvi.plateng.maven.wagon.JschTunnelWagon</implementation>
[other configuration]
</component>
</components>
</component-set>
* In my plugin project, I depend upon the first project and do this:
/**
* The Tunneling Wagon.
*
* @parameter expression="${component.org.apache.maven.wagon.Wagon#ssh-pf}"
* @required
* @readonly
*/
private TunnelWagon wagon;
When I try to execute my mojo, I get this error:
Component descriptor cannot be found in the component repository:
org.apache.maven.wagon.Wagonssh-pf.
With -X, I see this:
Caused by: org.codehaus.plexus.component.composition.CompositionException:
Composition failed of field wagon in object of type
com.mtvi.plateng.maven.utils.TunnelCreatorMojo because the requirement
ComponentRequirement{role='org.apache.maven.wagon.Wagon', roleHint='ssh-pf',
fieldName='wagon'} was missing
I'm sure I'm missing something simple, but if anyone can help, I'd appreciate
it.
Thanks,
Justin