Java 类org.springframework.boot.cli.compiler.grape.RepositoryConfiguration 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:GrabCommand.java   
@Override
protected ExitStatus run(OptionSet options) throws Exception {
    SourceOptions sourceOptions = new SourceOptions(options);

    List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
            .createDefaultRepositoryConfiguration();

    GroovyCompilerConfiguration configuration = new OptionSetGroovyCompilerConfiguration(
            options, this, repositoryConfiguration);

    if (System.getProperty("grape.root") == null) {
        System.setProperty("grape.root", ".");
    }

    GroovyCompiler groovyCompiler = new GroovyCompiler(configuration);
    groovyCompiler.compile(sourceOptions.getSourcesArray());
    return ExitStatus.OK;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RunCommand.java   
@Override
protected synchronized ExitStatus run(OptionSet options) throws Exception {
    synchronized (this.monitor) {
        if (this.runner != null) {
            throw new RuntimeException(
                    "Already running. Please stop the current application before running another (use the 'stop' command).");
        }

        SourceOptions sourceOptions = new SourceOptions(options);

        List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
                .createDefaultRepositoryConfiguration();
        repositoryConfiguration.add(0, new RepositoryConfiguration("local",
                new File("repository").toURI(), true));

        SpringApplicationRunnerConfiguration configuration = new SpringApplicationRunnerConfigurationAdapter(
                options, this, repositoryConfiguration);

        this.runner = new SpringApplicationRunner(configuration,
                sourceOptions.getSourcesArray(), sourceOptions.getArgsArray());
        this.runner.compileAndRun();

        return ExitStatus.OK;
    }
}
项目:spring-boot-concourse    文件:GrabCommand.java   
@Override
protected ExitStatus run(OptionSet options) throws Exception {
    SourceOptions sourceOptions = new SourceOptions(options);

    List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
            .createDefaultRepositoryConfiguration();

    GroovyCompilerConfiguration configuration = new OptionSetGroovyCompilerConfiguration(
            options, this, repositoryConfiguration);

    if (System.getProperty("grape.root") == null) {
        System.setProperty("grape.root", ".");
    }

    GroovyCompiler groovyCompiler = new GroovyCompiler(configuration);
    groovyCompiler.compile(sourceOptions.getSourcesArray());
    return ExitStatus.OK;
}
项目:spring-boot-concourse    文件:RunCommand.java   
@Override
protected synchronized ExitStatus run(OptionSet options) throws Exception {

    if (this.runner != null) {
        throw new RuntimeException(
                "Already running. Please stop the current application before running another (use the 'stop' command).");
    }

    SourceOptions sourceOptions = new SourceOptions(options);

    List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
            .createDefaultRepositoryConfiguration();
    repositoryConfiguration.add(0, new RepositoryConfiguration("local",
            new File("repository").toURI(), true));

    SpringApplicationRunnerConfiguration configuration = new SpringApplicationRunnerConfigurationAdapter(
            options, this, repositoryConfiguration);

    this.runner = new SpringApplicationRunner(configuration,
            sourceOptions.getSourcesArray(), sourceOptions.getArgsArray());
    this.runner.compileAndRun();

    return ExitStatus.OK;
}
项目:contestparser    文件:GrabCommand.java   
@Override
protected ExitStatus run(OptionSet options) throws Exception {
    SourceOptions sourceOptions = new SourceOptions(options);

    List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
            .createDefaultRepositoryConfiguration();

    GroovyCompilerConfiguration configuration = new OptionSetGroovyCompilerConfiguration(
            options, this, repositoryConfiguration);

    if (System.getProperty("grape.root") == null) {
        System.setProperty("grape.root", ".");
    }

    GroovyCompiler groovyCompiler = new GroovyCompiler(configuration);
    groovyCompiler.compile(sourceOptions.getSourcesArray());
    return ExitStatus.OK;
}
项目:contestparser    文件:RunCommand.java   
@Override
protected synchronized ExitStatus run(OptionSet options) throws Exception {

    if (this.runner != null) {
        throw new RuntimeException(
                "Already running. Please stop the current application before running another (use the 'stop' command).");
    }

    SourceOptions sourceOptions = new SourceOptions(options);

    List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
            .createDefaultRepositoryConfiguration();
    repositoryConfiguration.add(0, new RepositoryConfiguration("local",
            new File("repository").toURI(), true));

    SpringApplicationRunnerConfiguration configuration = new SpringApplicationRunnerConfigurationAdapter(
            options, this, repositoryConfiguration);

    this.runner = new SpringApplicationRunner(configuration,
            sourceOptions.getSourcesArray(), sourceOptions.getArgsArray());
    this.runner.compileAndRun();

    return ExitStatus.OK;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ArchiveCommand.java   
private GroovyCompiler createCompiler(OptionSet options) {
    List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
            .createDefaultRepositoryConfiguration();
    GroovyCompilerConfiguration configuration = new OptionSetGroovyCompilerConfiguration(
            options, this, repositoryConfiguration);
    GroovyCompiler groovyCompiler = new GroovyCompiler(configuration);
    groovyCompiler.getAstTransformations().add(0, new GrabAnnotationTransform());
    return groovyCompiler;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:OptionSetGroovyCompilerConfiguration.java   
public OptionSetGroovyCompilerConfiguration(OptionSet optionSet,
        CompilerOptionHandler compilerOptionHandler,
        List<RepositoryConfiguration> repositoryConfiguration) {
    this.options = optionSet;
    this.optionHandler = compilerOptionHandler;
    this.repositoryConfiguration = repositoryConfiguration;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:Installer.java   
private static GroovyCompilerConfiguration createCompilerConfiguration(
        OptionSet options, CompilerOptionHandler compilerOptionHandler) {
    List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
            .createDefaultRepositoryConfiguration();
    return new OptionSetGroovyCompilerConfiguration(options, compilerOptionHandler,
            repositoryConfiguration) {
        @Override
        public boolean isAutoconfigure() {
            return false;
        }
    };
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RepositoryConfigurationFactory.java   
/**
 * Create a new default repository configuration.
 * @return the newly-created default repository configuration
 */
public static List<RepositoryConfiguration> createDefaultRepositoryConfiguration() {
    MavenSettings mavenSettings = new MavenSettingsReader().readSettings();
    List<RepositoryConfiguration> repositoryConfiguration = new ArrayList<RepositoryConfiguration>();
    repositoryConfiguration.add(MAVEN_CENTRAL);
    if (!Boolean.getBoolean("disableSpringSnapshotRepos")) {
        repositoryConfiguration.add(SPRING_MILESTONE);
        repositoryConfiguration.add(SPRING_SNAPSHOT);
    }
    addDefaultCacheAsRepository(mavenSettings.getLocalRepository(),
            repositoryConfiguration);
    addActiveProfileRepositories(mavenSettings.getActiveProfiles(),
            repositoryConfiguration);
    return repositoryConfiguration;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RepositoryConfigurationFactory.java   
private static void addDefaultCacheAsRepository(String localRepository,
        List<RepositoryConfiguration> repositoryConfiguration) {
    RepositoryConfiguration repository = new RepositoryConfiguration("local",
            getLocalRepositoryDirectory(localRepository).toURI(), true);
    if (!repositoryConfiguration.contains(repository)) {
        repositoryConfiguration.add(0, repository);
    }
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RepositoryConfigurationFactory.java   
private static void addActiveProfileRepositories(List<Profile> activeProfiles,
        List<RepositoryConfiguration> configurations) {
    for (Profile activeProfile : activeProfiles) {
        Interpolator interpolator = new RegexBasedInterpolator();
        interpolator.addValueSource(
                new PropertiesBasedValueSource(activeProfile.getProperties()));
        for (Repository repository : activeProfile.getRepositories()) {
            configurations.add(getRepositoryConfiguration(interpolator, repository));
        }
    }
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RepositoryConfigurationFactory.java   
private static RepositoryConfiguration getRepositoryConfiguration(
        Interpolator interpolator, Repository repository) {
    String name = interpolate(interpolator, repository.getId());
    String url = interpolate(interpolator, repository.getUrl());
    boolean snapshotsEnabled = false;
    if (repository.getSnapshots() != null) {
        snapshotsEnabled = repository.getSnapshots().isEnabled();
    }
    return new RepositoryConfiguration(name, URI.create(url), snapshotsEnabled);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:GroovyGrabDependencyResolverTests.java   
@Before
public void setupResolver() {
    GroovyCompilerConfiguration configuration = new GroovyCompilerConfiguration() {

        @Override
        public boolean isGuessImports() {
            return true;
        }

        @Override
        public boolean isGuessDependencies() {
            return true;
        }

        @Override
        public boolean isAutoconfigure() {
            return false;
        }

        @Override
        public GroovyCompilerScope getScope() {
            return GroovyCompilerScope.DEFAULT;
        }

        @Override
        public List<RepositoryConfiguration> getRepositoryConfiguration() {
            return RepositoryConfigurationFactory
                    .createDefaultRepositoryConfiguration();
        }

        @Override
        public String[] getClasspath() {
            return new String[] { "." };
        }

    };
    this.resolver = new GroovyGrabDependencyResolver(configuration);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RepositoryConfigurationFactoryTests.java   
@Test
public void defaultRepositories() {
    SystemProperties.doWithSystemProperties(new Runnable() {
        @Override
        public void run() {
            List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
                    .createDefaultRepositoryConfiguration();
            assertRepositoryConfiguration(repositoryConfiguration, "central", "local",
                    "spring-snapshot", "spring-milestone");
        }
    }, "user.home:src/test/resources/maven-settings/basic");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RepositoryConfigurationFactoryTests.java   
@Test
public void snapshotRepositoriesDisabled() {
    SystemProperties.doWithSystemProperties(new Runnable() {
        @Override
        public void run() {
            List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
                    .createDefaultRepositoryConfiguration();
            assertRepositoryConfiguration(repositoryConfiguration, "central",
                    "local");
        }
    }, "user.home:src/test/resources/maven-settings/basic",
            "disableSpringSnapshotRepos:true");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RepositoryConfigurationFactoryTests.java   
@Test
public void activeByDefaultProfileRepositories() {
    SystemProperties.doWithSystemProperties(new Runnable() {
        @Override
        public void run() {
            List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
                    .createDefaultRepositoryConfiguration();
            assertRepositoryConfiguration(repositoryConfiguration, "central", "local",
                    "spring-snapshot", "spring-milestone", "active-by-default");
        }
    }, "user.home:src/test/resources/maven-settings/active-profile-repositories");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RepositoryConfigurationFactoryTests.java   
@Test
public void activeByPropertyProfileRepositories() {
    SystemProperties.doWithSystemProperties(new Runnable() {
        @Override
        public void run() {
            List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
                    .createDefaultRepositoryConfiguration();
            assertRepositoryConfiguration(repositoryConfiguration, "central", "local",
                    "spring-snapshot", "spring-milestone", "active-by-property");
        }
    }, "user.home:src/test/resources/maven-settings/active-profile-repositories",
            "foo:bar");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RepositoryConfigurationFactoryTests.java   
@Test
public void interpolationProfileRepositories() {
    SystemProperties.doWithSystemProperties(new Runnable() {
        @Override
        public void run() {
            List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
                    .createDefaultRepositoryConfiguration();
            assertRepositoryConfiguration(repositoryConfiguration, "central", "local",
                    "spring-snapshot", "spring-milestone", "interpolate-releases",
                    "interpolate-snapshots");
        }
    }, "user.home:src/test/resources/maven-settings/active-profile-repositories",
            "interpolate:true");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RepositoryConfigurationFactoryTests.java   
private void assertRepositoryConfiguration(
        List<RepositoryConfiguration> configurations, String... expectedNames) {
    assertThat(configurations).hasSize(expectedNames.length);
    Set<String> actualNames = new HashSet<String>();
    for (RepositoryConfiguration configuration : configurations) {
        actualNames.add(configuration.getName());
    }
    assertThat(actualNames).containsOnly(expectedNames);
}
项目:spring-boot-concourse    文件:ArchiveCommand.java   
private GroovyCompiler createCompiler(OptionSet options) {
    List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
            .createDefaultRepositoryConfiguration();
    GroovyCompilerConfiguration configuration = new OptionSetGroovyCompilerConfiguration(
            options, this, repositoryConfiguration);
    GroovyCompiler groovyCompiler = new GroovyCompiler(configuration);
    groovyCompiler.getAstTransformations().add(0, new GrabAnnotationTransform());
    return groovyCompiler;
}
项目:spring-boot-concourse    文件:OptionSetGroovyCompilerConfiguration.java   
public OptionSetGroovyCompilerConfiguration(OptionSet optionSet,
        CompilerOptionHandler compilerOptionHandler,
        List<RepositoryConfiguration> repositoryConfiguration) {
    this.options = optionSet;
    this.optionHandler = compilerOptionHandler;
    this.repositoryConfiguration = repositoryConfiguration;
}
项目:spring-boot-concourse    文件:Installer.java   
private static GroovyCompilerConfiguration createCompilerConfiguration(
        OptionSet options, CompilerOptionHandler compilerOptionHandler) {
    List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
            .createDefaultRepositoryConfiguration();
    return new OptionSetGroovyCompilerConfiguration(options, compilerOptionHandler,
            repositoryConfiguration) {
        @Override
        public boolean isAutoconfigure() {
            return false;
        }
    };
}
项目:spring-boot-concourse    文件:RepositoryConfigurationFactory.java   
/**
 * Create a new default repository configuration.
 * @return the newly-created default repository configuration
 */
public static List<RepositoryConfiguration> createDefaultRepositoryConfiguration() {
    MavenSettings mavenSettings = new MavenSettingsReader().readSettings();
    List<RepositoryConfiguration> repositoryConfiguration = new ArrayList<RepositoryConfiguration>();
    repositoryConfiguration.add(MAVEN_CENTRAL);
    if (!Boolean.getBoolean("disableSpringSnapshotRepos")) {
        repositoryConfiguration.add(SPRING_MILESTONE);
        repositoryConfiguration.add(SPRING_SNAPSHOT);
    }
    addDefaultCacheAsRepository(mavenSettings.getLocalRepository(),
            repositoryConfiguration);
    addActiveProfileRepositories(mavenSettings.getActiveProfiles(),
            repositoryConfiguration);
    return repositoryConfiguration;
}
项目:spring-boot-concourse    文件:RepositoryConfigurationFactory.java   
private static void addDefaultCacheAsRepository(String localRepository,
        List<RepositoryConfiguration> repositoryConfiguration) {
    RepositoryConfiguration repository = new RepositoryConfiguration("local",
            getLocalRepositoryDirectory(localRepository).toURI(), true);
    if (!repositoryConfiguration.contains(repository)) {
        repositoryConfiguration.add(0, repository);
    }
}
项目:spring-boot-concourse    文件:RepositoryConfigurationFactory.java   
private static void addActiveProfileRepositories(List<Profile> activeProfiles,
        List<RepositoryConfiguration> configurations) {
    for (Profile activeProfile : activeProfiles) {
        Interpolator interpolator = new RegexBasedInterpolator();
        interpolator.addValueSource(
                new PropertiesBasedValueSource(activeProfile.getProperties()));
        for (Repository repository : activeProfile.getRepositories()) {
            configurations.add(getRepositoryConfiguration(interpolator, repository));
        }
    }
}
项目:spring-boot-concourse    文件:RepositoryConfigurationFactory.java   
private static RepositoryConfiguration getRepositoryConfiguration(
        Interpolator interpolator, Repository repository) {
    String name = interpolate(interpolator, repository.getId());
    String url = interpolate(interpolator, repository.getUrl());
    boolean snapshotsEnabled = false;
    if (repository.getSnapshots() != null) {
        snapshotsEnabled = repository.getSnapshots().isEnabled();
    }
    return new RepositoryConfiguration(name, URI.create(url), snapshotsEnabled);
}
项目:spring-boot-concourse    文件:GroovyGrabDependencyResolverTests.java   
@Before
public void setupResolver() {
    GroovyCompilerConfiguration configuration = new GroovyCompilerConfiguration() {

        @Override
        public boolean isGuessImports() {
            return true;
        }

        @Override
        public boolean isGuessDependencies() {
            return true;
        }

        @Override
        public boolean isAutoconfigure() {
            return false;
        }

        @Override
        public GroovyCompilerScope getScope() {
            return GroovyCompilerScope.DEFAULT;
        }

        @Override
        public List<RepositoryConfiguration> getRepositoryConfiguration() {
            return RepositoryConfigurationFactory
                    .createDefaultRepositoryConfiguration();
        }

        @Override
        public String[] getClasspath() {
            return new String[] { "." };
        }

    };
    this.resolver = new GroovyGrabDependencyResolver(configuration);
}
项目:spring-boot-concourse    文件:RepositoryConfigurationFactoryTests.java   
@Test
public void defaultRepositories() {
    SystemProperties.doWithSystemProperties(new Runnable() {
        @Override
        public void run() {
            List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
                    .createDefaultRepositoryConfiguration();
            assertRepositoryConfiguration(repositoryConfiguration, "central", "local",
                    "spring-snapshot", "spring-milestone");
        }
    }, "user.home:src/test/resources/maven-settings/basic");
}
项目:spring-boot-concourse    文件:RepositoryConfigurationFactoryTests.java   
@Test
public void snapshotRepositoriesDisabled() {
    SystemProperties.doWithSystemProperties(new Runnable() {
        @Override
        public void run() {
            List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
                    .createDefaultRepositoryConfiguration();
            assertRepositoryConfiguration(repositoryConfiguration, "central",
                    "local");
        }
    }, "user.home:src/test/resources/maven-settings/basic",
            "disableSpringSnapshotRepos:true");
}
项目:spring-boot-concourse    文件:RepositoryConfigurationFactoryTests.java   
@Test
public void activeByDefaultProfileRepositories() {
    SystemProperties.doWithSystemProperties(new Runnable() {
        @Override
        public void run() {
            List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
                    .createDefaultRepositoryConfiguration();
            assertRepositoryConfiguration(repositoryConfiguration, "central", "local",
                    "spring-snapshot", "spring-milestone", "active-by-default");
        }
    }, "user.home:src/test/resources/maven-settings/active-profile-repositories");
}
项目:spring-boot-concourse    文件:RepositoryConfigurationFactoryTests.java   
@Test
public void activeByPropertyProfileRepositories() {
    SystemProperties.doWithSystemProperties(new Runnable() {
        @Override
        public void run() {
            List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
                    .createDefaultRepositoryConfiguration();
            assertRepositoryConfiguration(repositoryConfiguration, "central", "local",
                    "spring-snapshot", "spring-milestone", "active-by-property");
        }
    }, "user.home:src/test/resources/maven-settings/active-profile-repositories",
            "foo:bar");
}
项目:spring-boot-concourse    文件:RepositoryConfigurationFactoryTests.java   
@Test
public void interpolationProfileRepositories() {
    SystemProperties.doWithSystemProperties(new Runnable() {
        @Override
        public void run() {
            List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
                    .createDefaultRepositoryConfiguration();
            assertRepositoryConfiguration(repositoryConfiguration, "central", "local",
                    "spring-snapshot", "spring-milestone", "interpolate-releases",
                    "interpolate-snapshots");
        }
    }, "user.home:src/test/resources/maven-settings/active-profile-repositories",
            "interpolate:true");
}
项目:spring-boot-concourse    文件:RepositoryConfigurationFactoryTests.java   
private void assertRepositoryConfiguration(
        List<RepositoryConfiguration> configurations, String... expectedNames) {
    assertThat(configurations).hasSize(expectedNames.length);
    Set<String> actualNames = new HashSet<String>();
    for (RepositoryConfiguration configuration : configurations) {
        actualNames.add(configuration.getName());
    }
    assertThat(actualNames).containsOnly(expectedNames);
}
项目:contestparser    文件:ArchiveCommand.java   
private GroovyCompiler createCompiler(OptionSet options) {
    List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
            .createDefaultRepositoryConfiguration();
    GroovyCompilerConfiguration configuration = new OptionSetGroovyCompilerConfiguration(
            options, this, repositoryConfiguration);
    GroovyCompiler groovyCompiler = new GroovyCompiler(configuration);
    groovyCompiler.getAstTransformations().add(0, new GrabAnnotationTransform());
    return groovyCompiler;
}
项目:contestparser    文件:OptionSetGroovyCompilerConfiguration.java   
public OptionSetGroovyCompilerConfiguration(OptionSet optionSet,
        CompilerOptionHandler compilerOptionHandler,
        List<RepositoryConfiguration> repositoryConfiguration) {
    this.options = optionSet;
    this.optionHandler = compilerOptionHandler;
    this.repositoryConfiguration = repositoryConfiguration;
}
项目:contestparser    文件:Installer.java   
private static GroovyCompilerConfiguration createCompilerConfiguration(
        OptionSet options, CompilerOptionHandler compilerOptionHandler) {
    List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
            .createDefaultRepositoryConfiguration();
    return new OptionSetGroovyCompilerConfiguration(options, compilerOptionHandler,
            repositoryConfiguration) {
        @Override
        public boolean isAutoconfigure() {
            return false;
        }
    };
}
项目:contestparser    文件:RepositoryConfigurationFactory.java   
/**
 * Create a new default repository configuration.
 * @return the newly-created default repository configuration
 */
public static List<RepositoryConfiguration> createDefaultRepositoryConfiguration() {
    MavenSettings mavenSettings = new MavenSettingsReader().readSettings();
    List<RepositoryConfiguration> repositoryConfiguration = new ArrayList<RepositoryConfiguration>();
    repositoryConfiguration.add(MAVEN_CENTRAL);
    if (!Boolean.getBoolean("disableSpringSnapshotRepos")) {
        repositoryConfiguration.add(SPRING_MILESTONE);
        repositoryConfiguration.add(SPRING_SNAPSHOT);
    }
    addDefaultCacheAsRepository(mavenSettings.getLocalRepository(),
            repositoryConfiguration);
    addActiveProfileRepositories(mavenSettings.getActiveProfiles(),
            repositoryConfiguration);
    return repositoryConfiguration;
}
项目:contestparser    文件:RepositoryConfigurationFactory.java   
private static void addDefaultCacheAsRepository(String localRepository,
        List<RepositoryConfiguration> repositoryConfiguration) {
    RepositoryConfiguration repository = new RepositoryConfiguration("local",
            getLocalRepositoryDirectory(localRepository).toURI(), true);
    if (!repositoryConfiguration.contains(repository)) {
        repositoryConfiguration.add(0, repository);
    }
}
项目:contestparser    文件:RepositoryConfigurationFactory.java   
private static void addActiveProfileRepositories(List<Profile> activeProfiles,
        List<RepositoryConfiguration> repositoryConfiguration) {
    for (Profile activeProfile : activeProfiles) {
        for (Repository repository : activeProfile.getRepositories()) {
            repositoryConfiguration.add(new RepositoryConfiguration(
                    repository.getId(), URI.create(repository.getUrl()),
                    repository.getSnapshots() != null
                            ? repository.getSnapshots().isEnabled() : false));
        }
    }
}