Package org.moxie

Examples of org.moxie.RemoteRepository


      new File(localArtifactsRoot, repository).mkdirs();
    }
   
    // default proxy of central
    remoteRepositories = new ArrayList<RemoteRepository>();
    remoteRepositories.add(new RemoteRepository("central", "http://repo1.maven.org/maven2", false));
   
    remoteRepositoryLookup = new HashMap<String, RemoteRepository>();
    for (RemoteRepository repository : remoteRepositories) {
      remoteRepositoryLookup.put(repository.id, repository);
      remoteRepositoryLookup.put(StringUtils.urlToFolder(repository.url), repository);
View Full Code Here


      for (Object o : map.getList("remoteRepositories", Collections.emptyList())) {
        MaxmlMap repoMap = (MaxmlMap) o;
        String id = repoMap.getString("id", null);
        String url = repoMap.getString("url", null);
        boolean allowSnapshots = repoMap.getBoolean("allowSnapshots", false);
        RemoteRepository repo = new RemoteRepository(id, url, allowSnapshots);
        repo.connectTimeout = repoMap.getInt("connectTimeout", repo.connectTimeout);
        repo.readTimeout = repoMap.getInt("readTimeout", repo.readTimeout);
        repo.username = repoMap.getString("username", null);
        repo.password = repoMap.getString("password", null);
        remotes.add(repo);
View Full Code Here

    } else {
      repo = relativePath;
    }

    if (remoteRepositoryLookup.containsKey(repo)) {
      RemoteRepository repository = remoteRepositoryLookup.get(repo);
      return new File(remoteArtifactsRoot, StringUtils.urlToFolder(repository.url));     
    }
    return new File(localArtifactsRoot, repo);
  }
View Full Code Here

        File file = new File(localArtifactsRoot, repo);
        return new MavenCache(file);
      }
    }
    if (remoteRepositoryLookup.containsKey(repository)) {
      RemoteRepository repo = remoteRepositoryLookup.get(repository);
      String folder = StringUtils.urlToFolder(repo.url);
      File file = new File(remoteArtifactsRoot, folder);
      return new MavenCache(file);
    }
    return null;
View Full Code Here

    return getProxyConfig().isRemoteRepository(repository);
  }
 
  String getRepositoryUrl() {
    if (isRemoteRepository()) {
      RemoteRepository repository = getProxyConfig().getRemoteRepository(getBasePath());
      return repository.url;
    }
    String repository = getBasePath();
    return getRootRef() + "/m2/" + repository;
  }
View Full Code Here

  String getRepositoryNote(Pom pom) {
    if (pom != null) {
      return null;
    } else if (isRemoteRepository()) {
      // remote/proxied repository
      RemoteRepository repository = getProxyConfig().getRemoteRepository(getBasePath());
      String message = getTranslation().getString("mp.remoteRepositoryNote");
      return MessageFormat.format(message, repository.id, repository.getHost(), getProxyUrl());
    } else {
      // local repository
      String repository = getBasePath();
      String message = getTranslation().getString("mp.localRepositoryNote");
      return MessageFormat.format(message, repository);
View Full Code Here

      // artifact
      sb.append("dependencies:\n");
      sb.append(" - compile '").append(pom.getCoordinates()).append('\'');
    } else if (isRemoteRepository()) {
      // proxy settings
      RemoteRepository repository = getProxyConfig().getRemoteRepository(getBasePath());     
      sb.append("proxies:\n");
      sb.append(MessageFormat.format("- '{'\n    active: true\n    id: ''moxieProxy''\n    protocol: ''{0}''\n    host: ''{1}''\n    port: {2,number,0}\n    username: ''username''\n    password: ''password''\n    proxyHosts: ''{3}''\n'}'", getProxyScheme(), getRootRef().getHostDomain(), getProxyConfig().getProxyPort(), repository.getHost()));
    } else {
      // repository settings
      sb.append("registeredRepositories:\n");
      sb.append(MessageFormat.format(" - '{'\n    id: ''{0}''\n    url: ''{1}''\n'   }'\n", getRepositoryId(), getRepositoryUrl()));
      sb.append(MessageFormat.format("repositories: ''central'', ''{0}''\n", getRepositoryId()));     
View Full Code Here

TOP

Related Classes of org.moxie.RemoteRepository

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.