Package org.moxie

Examples of org.moxie.Solver


    }
    folder.mkdirs();
    System.setProperty("mx.root", folder.getAbsolutePath());
    System.out.println("mx.root=" + folder.getAbsolutePath());
    BuildConfig config = new BuildConfig(new File("test.moxie"), null);
    Solver solver = new Solver(new Console(), config);
    return solver;
  }
View Full Code Here


    Solver solver = new Solver(new Console(), config);
    return solver;
  }

  private Solver solve(Dependency dep) throws IOException, MaxmlException {
    Solver solver = getSolver();
    solver.getBuildConfig().getPom().addDependency(dep, Scope.compile);
    solver.solve();
    return solver;
  }
View Full Code Here

  }

  @Test
  public void testParsing1() throws IOException, MaxmlException {
    Dependency dep = new Dependency("org.eclipse.jetty:jetty-ajp:7.4.2.v20110526");
    Solver solver = solve(dep);
    Pom pom = solver.getPom(dep);
    assertEquals("org.eclipse.jetty", pom.groupId);
    assertEquals("7.4.2.v20110526", pom.version);
  }
View Full Code Here

  }

  @Test
  public void testParentProperties() throws Exception {
    Dependency dep = new Dependency("org.jboss.resteasy.mobile:resteasy-mobile:1.0.0");
    Solver solver = solve(dep);
    // [httpcomponents-client:4.0.3]
    //    ${httpcore.version} = 4.0.1
    // [httpclient:4.0.3]
    //    [httpcore:${httpcore.version}]
    // [resteasy-mobile:1.0.0]
    Set<Dependency> deps = solver.getDependencies(Scope.compile);
    Dependency httpcore = new Dependency("org.apache.httpcomponents:httpcore:4.0.1");
    assertTrue(deps.contains(httpcore));
  }
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.Solver

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.