Package org.apache.maven.index.artifact

Examples of org.apache.maven.index.artifact.Gav


  @Test
  public void downloadArtifact()
      throws Exception
  {
    Gav gav =
        new Gav(this.getTestId(), "release-jar", "1", null, "jar", 0, new Date().getTime(),
            "Release Jar", false, null, false, null);

    File artifact = downloadArtifactFromGroup("nexus-test", gav, "./target/downloaded-jars");

    assertTrue(artifact.exists());

    File originalFile =
        this.getTestResourceAsFile("projects/" + gav.getArtifactId() + "/" + gav.getArtifactId() + "."
            + gav.getExtension());

    Assert.assertTrue(FileTestingUtils.compareFileSHA1s(originalFile, artifact));

  }
View Full Code Here


  @Test
  public void validateGroupsInGroups()
      throws Exception
  {
    Gav gav = GavUtil.newGav("nexus3546", "artifact", "1.0.0");

    prepare(gav);

    TestContainer.getInstance().getTestContext().setUsername(TEST_USER_NAME);
    TestContainer.getInstance().getTestContext().setPassword(TEST_USER_PASSWORD);
View Full Code Here

  @Test
  public void maven3()
      throws Exception
  {
    Gav gav =
        new Gav("org.apache.maven", "apache-maven", "3.0.3", "bin", "tar.gz", null, null, null, false, null,
            false, null);
    File bundle =
        downloadArtifact(getNexusTestRepoUrl(), gav, "target/downloads/nexus4218/" + gav.getArtifactId() + "-" + gav.getVersion());

    UnArchiver unArchive = TestContainer.getInstance().getPlexusContainer().lookup(ArchiverManager.class).getUnArchiver(bundle);
    unArchive.setSourceFile(bundle);
    unArchive.setDestDirectory(bundle.getParentFile());
    unArchive.extract();
View Full Code Here

    Assert.assertTrue(repo.isIndexable());

    TaskScheduleUtil.waitForAllTasksToStop();
    getEventInspectorsUtil().waitForCalmPeriod();

    Gav gav = GavUtil.newGav("nexus2556", "artifact", "1.0");
    getDeployUtils().deployUsingGavWithRest(repoId, gav, getTestFile("artifact.jar"));

    TaskScheduleUtil.waitForAllTasksToStop();
    getEventInspectorsUtil().waitForCalmPeriod();
View Full Code Here

  @SuppressWarnings("unchecked")
  @Test
  public void maven2()
      throws Exception
  {
    Gav gav =
        new Gav("org.apache.maven", "apache-maven", "2.0.6", "bin", "tar.gz", null, null, null, false, null,
            false, null);
    File bundle =
        downloadArtifact(getNexusTestRepoUrl(), gav, "target/downloads/nexus4218/" + gav.getArtifactId() + "-" + gav.getVersion());

    UnArchiver unArchive = TestContainer.getInstance().getPlexusContainer().lookup(ArchiverManager.class).getUnArchiver(bundle);
    unArchive.setSourceFile(bundle);
    unArchive.setDestDirectory(bundle.getParentFile());
    unArchive.extract();
View Full Code Here

    TaskScheduleUtil.waitForAllTasksToStop();

    // now upload an artifact to the repo
    File artifact = getTestFile("artifact.jar");
    Gav gav = GavUtil.newGav("nexus3567", "artifact", "1.0.0");
    int code = getDeployUtils().deployUsingGavWithRest(repoId, gav, artifact);
    Assert.assertTrue("Unable to deploy artifact " + code, Status.isSuccess(code));

    getEventInspectorsUtil().waitForCalmPeriod();
  }
View Full Code Here

  @Test
  public void ivy()
      throws Exception
  {
    Gav gav =
        new Gav("org.apache.ivy", "apache-ivy", "2.2.0", "bin", "tar.gz", null, null, null, false, null, false,
            null);
    File bundle =
        downloadArtifact(getNexusTestRepoUrl(), gav, "target/downloads/nexus4218/" + gav.getArtifactId() + "-" + gav.getVersion());

    UnArchiver unArchive = TestContainer.getInstance().getPlexusContainer().lookup(ArchiverManager.class).getUnArchiver(bundle);
    unArchive.setSourceFile(bundle);
    unArchive.setDestDirectory(bundle.getParentFile());
    unArchive.extract();
View Full Code Here

  private final Gav gav;

  public Nexus602SearchSnapshotArtifactIT()
      throws Exception
  {
    gav = new Gav("nexus602", "artifact", "1.0-SNAPSHOT", null, "jar", 0, 0L, null, false, null, false, null);
  }
View Full Code Here

    giveUserRole(TEST_USER_NAME, "repo-all-read");

    TestContainer.getInstance().getTestContext().setUsername(TEST_USER_NAME);
    TestContainer.getInstance().getTestContext().setPassword(TEST_USER_PASSWORD);

    Gav gav = GavUtil.newGav(this.getTestId(), "project", "1.0.1");

    File artifact = downloadArtifactFromGroup("g4", gav, "./target/downloaded-jars");

    assertTrue(artifact.exists());
View Full Code Here

    addPriv(TEST_USER_NAME, "g4" + "-read-priv", TargetPrivilegeDescriptor.TYPE, "1", null, "g4", "read");

    TestContainer.getInstance().getTestContext().setUsername(TEST_USER_NAME);
    TestContainer.getInstance().getTestContext().setPassword(TEST_USER_PASSWORD);

    Gav gav = GavUtil.newGav(this.getTestId(), "project", "0.8");

    File artifact = downloadArtifactFromGroup("g4", gav, "./target/downloaded-jars");

    assertTrue(artifact.exists());
View Full Code Here

TOP

Related Classes of org.apache.maven.index.artifact.Gav

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.