throw new IllegalStateException( "The internal default plexus-bootstrap.xml is missing. " +
"This is highly irregular, your plexus JAR is " +
"most likely corrupt." );
}
PlexusConfiguration systemConfiguration = PlexusTools.buildConfiguration( BOOTSTRAP_CONFIGURATION, new InputStreamReader( is ) );
// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
// Some of this could probably be collapsed as having a plexus.xml in your
// META-INF/plexus directory is probably a better solution then specifying
// a configuration with an URL but I'm leaving the configuration by URL
// as folks might be using it ... I made this change to accomodate Maven
// but I think it's better to discover a configuration in a standard
// place.
configuration = systemConfiguration;
PlexusXmlComponentDiscoverer discoverer = new PlexusXmlComponentDiscoverer();
PlexusConfiguration plexusConfiguration = discoverer.discoverConfiguration( getContext(), plexusRealm );
if ( plexusConfiguration != null )
{
configuration = PlexusConfigurationMerger.merge( plexusConfiguration, configuration );
processConfigurationsDirectory();
}
if ( configurationReader != null )
{
// User userConfiguration
PlexusConfiguration userConfiguration =
PlexusTools.buildConfiguration( "<User Specified Configuration Reader>", getInterpolationConfigurationReader( configurationReader ) );
// Merger of systemConfiguration and user userConfiguration
configuration = PlexusConfigurationMerger.merge( userConfiguration, configuration );