"This is highly irregular, your plexus JAR is most likely corrupt.";
throw new ComponentConfigurationException( msg );
}
ComponentDescriptor componentDescriptor = new ComponentDescriptor();
componentDescriptor.setRole( role );
componentDescriptor.setImplementation( implementation );
PlexusConfiguration configuration = new XmlPlexusConfiguration( "configuration" );
configuration.addChild( c );
try
{
configurator.configureComponent( this, configuration, plexusRealm );
}
catch ( ComponentConfigurationException e )
{
// TODO: don't like rewrapping the same exception, but better than polluting this all through the config code
String message = "Error configuring component: " + componentDescriptor.getHumanReadableKey();
throw new ComponentConfigurationException( message, e );
}
}