return buildPlexusContainer(mavenRequest,conf);
}
public static PlexusContainer buildPlexusContainer(ClassLoader mavenClassLoader, ClassLoader parent, MavenRequest mavenRequest) throws MavenEmbedderException {
DefaultContainerConfiguration conf = new DefaultContainerConfiguration();
conf.setAutoWiring( mavenRequest.isContainerAutoWiring() )
.setClassPathScanning( mavenRequest.getContainerClassPathScanning() )
.setComponentVisibility( mavenRequest.getContainerComponentVisibility() )
.setContainerConfigurationURL(mavenRequest.getOverridingComponentsXml());
ClassWorld classWorld = new ClassWorld();
ClassRealm parentRealm = createParentRealm(classWorld, parent,
MavenExecutionRequestPopulator.class,
RepositorySystem.class,
PlexusCipher.class);
ClassRealm classRealm = createClassRealm( classWorld, "maven", mavenClassLoader );
classRealm.setParentRealm( parentRealm );
conf.setRealm( classRealm );
conf.setClassWorld( classWorld );
return buildPlexusContainer(mavenRequest,conf);
}