Package org.moxie

Examples of org.moxie.Repository$DownloadData


      if (StringUtils.isEmpty(repositoryId)) {
        // return MoxieCache
        cache = getBuild().getSolver().getMoxieCache();
      } else {
        // get repository by identifier
        Repository repository = getBuild().getConfig().getRepository(repositoryId);
        if (repository == null) {
          throw new MoxieException("Failed to find repositoryId: {0}", repositoryId);
        }
        if (isSnapshot && !repository.allowSnapshots()) {
          if (allowSnapshots) {
            getConsole().warn("Repository \"{0}\" prohibits snapshots! Overridden by \"allowSnapshots\" attribute!", repository.toString());
          } else {
            throw new MoxieException("Repository \"{0}\" prohibits installation or deployment of snapshots!",
              repository.toString(), repository.getRepositoryUrl());
          }
        }
        String url = repository.getRepositoryUrl();
        if (url.startsWith("file:/")) {         
          try {
            URI uri = new URI(url);
            baseDir = new File(uri);
            cache = new MavenCache(baseDir);           
View Full Code Here


  @Test
  public void testRedirects() throws Exception {
    // Eclipse.org redirects http:// requests to https://
    Solver solver = getSolver();
    Repository r = new Repository("EclipseSnapshots", "http://repo.eclipse.org/content/groups/releases");
    Dependency dep = new Dependency("org.eclipse.jgit:org.eclipse.jgit:3.1.0.201310021548-r");
    File file = r.download(solver, dep, dep.extension);
    assertTrue(file.exists());
  }
View Full Code Here

TOP

Related Classes of org.moxie.Repository$DownloadData

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.