Package org.moxie

Examples of org.moxie.Dependency


  private static final String CHECK_SELECTED_VERSION_KNOWN = "check selected version known";

  private static final String CHECK_SELECTED_VERSION = "check selected version";

  public void testRange() throws InvalidVersionSpecificationException, OverConstrainedVersionException {
    Dependency artifact = null;

    VersionRange range = VersionRange.createFromVersionSpec("(,1.0]");
    List<Restriction> restrictions = range.getRestrictions();
    assertEquals(CHECK_NUM_RESTRICTIONS, 1, restrictions.size());
    Restriction restriction = (Restriction) restrictions.get(0);
View Full Code Here


  public static class ScopedDependency {
    private Dependency dependency;

    public void setCoordinates(String def) {
      this.dependency = new Dependency(def);
    }
View Full Code Here

    }
   
    titleClass(build.getPom().name);

    loadRuntimeDependencies(build,
        new Dependency("mx:pegdown"),
        new Dependency("mx:wikitext-core"),
        new Dependency("mx:wikitext-twiki"),
        new Dependency("mx:wikitext-textile"),
        new Dependency("mx:wikitext-tracwiki"),
        new Dependency("mx:wikitext-mediawiki"),
        new Dependency("mx:wikitext-confluence"),
        new Dependency("mx:freemarker"));

    Dependency bootstrap = new Dependency("mx:bootstrap");
    Dependency jquery = new Dependency("mx:jquery");
    Dependency d3js = new Dependency("mx:d3js");
    Dependency prettify = new Dependency("mx:prettify");
    Dependency less = new Dependency("mx:lesscss-engine");
   
    loadRuntimeDependencies(build, bootstrap, jquery, d3js, prettify, less);

    if (doc.outputDirectory.exists()) {
      FileUtils.delete(doc.outputDirectory);
View Full Code Here

      content += "\n" + FileUtils.readContent(doc.customLessFile, "\n");
    }
    FileUtils.writeContent(bsLess, content);

    Build build = getBuild();   
    loadRuntimeDependencies(build, new Dependency("mx:rhino"));

    // compile Bootstrap and custom.less overrides into css
    try {
      File bsCss = new File(outputFolder, "bootstrap/css/bootstrap.css");
      if (doc.minify) {
View Full Code Here

      page.content = token;
    }
  }
 
  void writeDependenciesAsJson() {
    DepNode root = new DepNode(new Dependency(getBuild().getPom().getCoordinates()));
    Set<Dependency> dependencies = getBuild().getSolver().getDependencies(Scope.test);
    DepNode currRoot = root;
    for (Dependency dep : dependencies) {
      if (currRoot.dep.ring == dep.ring) {
        // dep is at same ring as curr root, add to parent
View Full Code Here

    if (!allowSnapshots && pom.isSnapshot()) {
      // do not deploy snapshots into the repository
      return;
    }
   
    Dependency asDependency = new Dependency(pom.getCoordinates());
    IMavenCache artifactCache = getArtifactCache(pom.isSnapshot());
    File cacheRoot = artifactCache.getRootFolder();
    File artifactFile = artifactCache.getArtifact(asDependency, asDependency.extension);
    File artifactDir = artifactFile.getParentFile();
    File sourceDir = build.getConfig().getTargetDirectory();
   
    titleClass(pom.artifactId + "-" + pom.version);

    if (asDependency.isSnapshot()) {
      deploySnapshot(pom, sourceDir, artifactDir, artifactCache);
    } else {
      deployRelease(pom, sourceDir, artifactDir, true);
    }
   
View Full Code Here

   * @param sourceDir
   * @param artifactDir
   * @param artifactCache
   */
  protected void deploySnapshot(Pom pom, File sourceDir, File artifactDir, IMavenCache artifactCache) {
    Dependency asDependency = new Dependency(pom.getCoordinates());

    // setup REVISION
    String timestamp = new SimpleDateFormat(Metadata.snapshotTimestamp).format(new Date());
    int buildNumber = 1;

View Full Code Here

public class DependencyParseTest extends Assert {

  @Test
  public void testParsing1() {
    Dependency dep = new Dependency("org.moxie:moxie:1.0.0");
    assertEquals("org.moxie", dep.groupId);
    assertEquals("moxie", dep.artifactId);
    assertEquals("1.0.0", dep.version);
    assertNull(dep.classifier);
    assertEquals("jar", dep.extension);
View Full Code Here

    assertFalse(dep.optional);
  }

  @Test
  public void testParsing2() {
    Dependency dep = new Dependency("'org.moxie:moxie:1.0.0:jdk15'");
    assertEquals("org.moxie", dep.groupId);
    assertEquals("moxie", dep.artifactId);
    assertEquals("1.0.0", dep.version);
    assertEquals("jdk15", dep.classifier);
    assertEquals("jar", dep.extension);
View Full Code Here

    assertFalse(dep.optional);
  }

  @Test
  public void testParsing3() {
    Dependency dep = new Dependency("\"org.moxie:moxie:1.0.0:jdk15:jar\"");
    assertEquals("org.moxie", dep.groupId);
    assertEquals("moxie", dep.artifactId);
    assertEquals("1.0.0", dep.version);
    assertEquals("jdk15", dep.classifier);
    assertEquals("jar", dep.extension);
View Full Code Here

TOP

Related Classes of org.moxie.Dependency

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.