Package org.sonatype.nexus.proxy.repository

Examples of org.sonatype.nexus.proxy.repository.ConfigurableRepository


    repoRes.setRepoType("proxy");

    AbstractMavenRepositoryTemplate m2Template = (AbstractMavenRepositoryTemplate) template;
    repoRes.setRepoPolicy(m2Template.getRepositoryPolicy().name());

    ConfigurableRepository cfg = template.getConfigurableRepository();
    repoRes.setWritePolicy(cfg.getWritePolicy().name());
    repoRes.setBrowseable(cfg.isBrowseable());
    repoRes.setIndexable(cfg.isIndexable());
    repoRes.setExposed(cfg.isExposed());
    repoRes.setNotFoundCacheTTL(cfg.getNotFoundCacheTimeToLive());

    AbstractMavenRepositoryConfiguration repoCfg =
        (AbstractMavenRepositoryConfiguration) template.getConfigurableRepository().getCurrentCoreConfiguration()
            .getExternalConfiguration().getConfiguration(false);
View Full Code Here


    repoRes.setRepoType("hosted");

    AbstractMavenRepositoryTemplate m2Template = (AbstractMavenRepositoryTemplate) template;
    repoRes.setRepoPolicy(m2Template.getRepositoryPolicy().name());

    ConfigurableRepository cfg = template.getConfigurableRepository();
    repoRes.setWritePolicy(cfg.getWritePolicy().name());
    repoRes.setBrowseable(cfg.isBrowseable());
    repoRes.setIndexable(cfg.isIndexable());
    repoRes.setExposed(cfg.isExposed());
    repoRes.setNotFoundCacheTTL(cfg.getNotFoundCacheTimeToLive());

    return repoRes;
  }
View Full Code Here

      throws Exception
  {
    final RepositoryTemplate template =
        (RepositoryTemplate) getRepositoryTemplates().getTemplates(Maven2ContentClass.class,
            RepositoryPolicy.RELEASE, MavenProxyRepository.class).pick();
    final ConfigurableRepository templateConf = template.getConfigurableRepository();
    templateConf.setId("test");
    templateConf.setName("Test");
    final CRemoteStorage remoteStorageConf = new CRemoteStorage();
    remoteStorageConf.setUrl("http://localhost:" + server.getPort());
    template.getCoreConfiguration().getConfiguration(true).setRemoteStorage(remoteStorageConf);
    final MavenProxyRepository mavenProxyRepository = (MavenProxyRepository) template.create();
View Full Code Here

    return mainFacet;
  }

  public ConfigurableRepository getConfigurableRepository() {
    if (configurableRepository == null) {
      configurableRepository = new ConfigurableRepository(getTemplateProvider().getApplicationConfiguration());

      try {
        configurableRepository.configure(getCoreConfiguration());
      }
      catch (ConfigurationException e) {
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.proxy.repository.ConfigurableRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.