Package org.moxie

Examples of org.moxie.Dependency


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


    assertFalse(dep.optional);
  }

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

    assertFalse(dep.optional);
  }

  @Test
  public void testParsing6() {
    Dependency dep = new Dependency("org/moxie:moxie:1.0.0::doc optional -org.moxie.ignore:ignore1 -org.moxie.ignore:ignore2");
    assertEquals("org.moxie", dep.groupId);
    assertEquals("moxie", dep.artifactId);
    assertEquals("1.0.0", dep.version);
    assertNull(dep.classifier);
    assertEquals("doc", dep.extension);
View Full Code Here

 
  @Test
  public void testFilenames1() {   
    String pattern = "[artifactId]-[version](-[classifier])(-[revision]).[ext]";
   
    Dependency dep = new Dependency("org.moxie:moxie-toolkit:1.0.0");
    String filename = Dependency.getFilename(dep, dep.extension, pattern);
    assertEquals("moxie-toolkit-1.0.0.jar", filename);
   
    dep = new Dependency("org.moxie:moxie-toolkit:1.0.0:sources");
    filename = Dependency.getFilename(dep, dep.extension, pattern);
    assertEquals("moxie-toolkit-1.0.0-sources.jar", filename);

    dep = new Dependency("org.moxie:moxie-toolkit:1.0.0:sources:zip");
    filename = Dependency.getFilename(dep, dep.extension, pattern);
    assertEquals("moxie-toolkit-1.0.0-sources.zip", filename);

  }
View Full Code Here

 
  @Test
  public void testFilenames2() {   
    String pattern = "[groupId]-[artifactId]-[version](-[classifier])(-[revision]).[ext]";
   
    Dependency dep = new Dependency("org.moxie:moxie-toolkit:1.0.0");
    String filename = Dependency.getFilename(dep, dep.extension, pattern);
    assertEquals("org.moxie-moxie-toolkit-1.0.0.jar", filename);
   
    dep = new Dependency("org.moxie:moxie-toolkit:1.0.0:sources");
    filename = Dependency.getFilename(dep, dep.extension, pattern);
    assertEquals("org.moxie-moxie-toolkit-1.0.0-sources.jar", filename);

    dep = new Dependency("org.moxie:moxie-toolkit:1.0.0:sources:zip");
    filename = Dependency.getFilename(dep, dep.extension, pattern);
    assertEquals("org.moxie-moxie-toolkit-1.0.0-sources.zip", filename);
  }
View Full Code Here

 
  @Test
  public void testFilenames3() {   
    String pattern = "lib-[artifactId]-[version](-[classifier])(-[revision]).[ext]";
   
    Dependency dep = new Dependency("org.moxie:moxie-toolkit:1.0.0");
    String filename = Dependency.getFilename(dep, dep.extension, pattern);
    assertEquals("lib-moxie-toolkit-1.0.0.jar", filename);
   
    dep = new Dependency("org.moxie:moxie-toolkit:1.0.0:sources");
    filename = Dependency.getFilename(dep, dep.extension, pattern);
    assertEquals("lib-moxie-toolkit-1.0.0-sources.jar", filename);

    dep = new Dependency("org.moxie:moxie-toolkit:1.0.0:sources:zip");
    filename = Dependency.getFilename(dep, dep.extension, pattern);
    assertEquals("lib-moxie-toolkit-1.0.0-sources.zip", filename);
  }
View Full Code Here

 
  @Test
  public void testPaths1() {
    String pattern = Constants.MAVEN2_ARTIFACT_PATTERN;
   
    Dependency dep = new Dependency("org.moxie:moxie-toolkit:1.0.0");
    String path = Dependency.getArtifactPath(dep, dep.extension, pattern);
    assertEquals("org/moxie/moxie-toolkit/1.0.0/moxie-toolkit-1.0.0.jar", path);
   
    dep = new Dependency("org.moxie:moxie-toolkit:1.0.0:sources");
    path = Dependency.getArtifactPath(dep, dep.extension, pattern);
    assertEquals("org/moxie/moxie-toolkit/1.0.0/moxie-toolkit-1.0.0-sources.jar", path);
   
    dep = new Dependency("org.moxie:moxie-toolkit:1.0.0:sources:zip");
    path = Dependency.getArtifactPath(dep, dep.extension, pattern);
    assertEquals("org/moxie/moxie-toolkit/1.0.0/moxie-toolkit-1.0.0-sources.zip", path);
  }
View Full Code Here

    /**
     * Load the file and then execute it
     */
    public void execute() throws BuildException {
    Build build = (Build) getProject().getReference(Key.build.referenceId());
    MxTask.loadRuntimeDependencies(build, new Dependency("mx:groovy"));
   
    if (scope != null) {
      createProjectClasspath(build);
    }
   
View Full Code Here

   * @param optionally update metadata
   */
  protected void deployRelease(Pom pom, File sourceDir, File artifactDir, boolean updateMetadata) {   
    String artifact = pom.artifactId + "-" + pom.version;
    String pattern = artifact + "*";
    Dependency asDependency = new Dependency(pom.getCoordinates());

    // copy artifacts
    copy(sourceDir, pattern, artifactDir);

    // output pom file
View Full Code Here

    if (!allowSnapshots && pom.isSnapshot()) {
      // do not install snapshots into the repository
      return;
    }
   
    Dependency asDependency = new Dependency(pom.getCoordinates());
    IMavenCache cache = getArtifactCache(pom.isSnapshot());
    File artifactFile = cache.getArtifact(asDependency, asDependency.extension);
    File artifactDir = artifactFile.getParentFile();
    File sourceDir = build.getConfig().getTargetDirectory();
   
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.