|
|
@ -44,27 +44,21 @@ public abstract class AetherGrapeEngineFactory {
|
|
|
|
|
|
|
|
|
|
|
|
public static AetherGrapeEngine create(GroovyClassLoader classLoader,
|
|
|
|
public static AetherGrapeEngine create(GroovyClassLoader classLoader,
|
|
|
|
List<RepositoryConfiguration> repositoryConfigurations,
|
|
|
|
List<RepositoryConfiguration> repositoryConfigurations,
|
|
|
|
DependencyResolutionContext dependencyResolutionContext) {
|
|
|
|
DependencyResolutionContext dependencyResolutionContext, boolean quiet) {
|
|
|
|
|
|
|
|
|
|
|
|
RepositorySystem repositorySystem = createServiceLocator()
|
|
|
|
RepositorySystem repositorySystem = createServiceLocator()
|
|
|
|
.getService(RepositorySystem.class);
|
|
|
|
.getService(RepositorySystem.class);
|
|
|
|
|
|
|
|
|
|
|
|
DefaultRepositorySystemSession repositorySystemSession = MavenRepositorySystemUtils
|
|
|
|
DefaultRepositorySystemSession repositorySystemSession = MavenRepositorySystemUtils
|
|
|
|
.newSession();
|
|
|
|
.newSession();
|
|
|
|
|
|
|
|
|
|
|
|
ServiceLoader<RepositorySystemSessionAutoConfiguration> autoConfigurations = ServiceLoader
|
|
|
|
ServiceLoader<RepositorySystemSessionAutoConfiguration> autoConfigurations = ServiceLoader
|
|
|
|
.load(RepositorySystemSessionAutoConfiguration.class);
|
|
|
|
.load(RepositorySystemSessionAutoConfiguration.class);
|
|
|
|
|
|
|
|
|
|
|
|
for (RepositorySystemSessionAutoConfiguration autoConfiguration : autoConfigurations) {
|
|
|
|
for (RepositorySystemSessionAutoConfiguration autoConfiguration : autoConfigurations) {
|
|
|
|
autoConfiguration.apply(repositorySystemSession, repositorySystem);
|
|
|
|
autoConfiguration.apply(repositorySystemSession, repositorySystem);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
new DefaultRepositorySystemSessionAutoConfiguration()
|
|
|
|
new DefaultRepositorySystemSessionAutoConfiguration()
|
|
|
|
.apply(repositorySystemSession, repositorySystem);
|
|
|
|
.apply(repositorySystemSession, repositorySystem);
|
|
|
|
|
|
|
|
|
|
|
|
return new AetherGrapeEngine(classLoader, repositorySystem,
|
|
|
|
return new AetherGrapeEngine(classLoader, repositorySystem,
|
|
|
|
repositorySystemSession, createRepositories(repositoryConfigurations),
|
|
|
|
repositorySystemSession, createRepositories(repositoryConfigurations),
|
|
|
|
dependencyResolutionContext);
|
|
|
|
dependencyResolutionContext, quiet);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static ServiceLocator createServiceLocator() {
|
|
|
|
private static ServiceLocator createServiceLocator() {
|
|
|
|