@PostConstruct
public void initialize()
throws PlexusContainerException
{
DefaultContainerConfiguration conf = new DefaultContainerConfiguration();
conf.setAutoWiring( containerAutoWiring );
conf.setClassPathScanning( containerClassPathScanning );
conf.setComponentVisibility( containerComponentVisibility );
conf.setContainerConfigurationURL( overridingComponentsXml );
ClassWorld classWorld = new ClassWorld();
ClassRealm classRealm = new ClassRealm( classWorld, "maven", Thread.currentThread().getContextClassLoader() );
conf.setRealm( classRealm );
conf.setClassWorld( classWorld );
plexusContainer = new DefaultPlexusContainer( conf );
}