Package org.apache.maven.index.artifact

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


  @Test
  public void deployPlainArtifact()
      throws Exception
  {
    Gav gav = GavUtil.newGav("nexus1646", "artifact", "1.33.44");
    File artifact = getTestFile("artifact.jar");

    int code = getDeployUtils().deployUsingGavWithRest(REPO_TEST_HARNESS_RELEASE_REPO, gav, artifact);
    Assert.assertTrue("Unable to deploy artifact " + code, Status.isSuccess(code));

    File metadataFile =
        new File(nexusWorkDir, "storage/nexus-test-harness-release-repo/nexus1646/artifact/maven-metadata.xml");
    Assert.assertTrue("Metadata file not found " + metadataFile.getAbsolutePath(), metadataFile.isFile());

    try (FileInputStream input = new FileInputStream(metadataFile)) {
      Metadata md = MetadataBuilder.read(input);

      Assert.assertEquals(md.getVersioning().getLatest(), gav.getVersion());
      Assert.assertEquals(md.getVersioning().getRelease(), gav.getVersion());
      Assert.assertEquals(1, md.getVersioning().getVersions().size());
      Assert.assertEquals(md.getVersioning().getVersions().get(0), gav.getVersion());
    }
  }
View Full Code Here


  @Test
  public void deploySnapshotToRelease()
      throws Exception
  {
    Gav gav = GavUtil.newGav("nexus1646", "artifact", "1.1.1-SNAPSHOT");

    File artifact = getTestFile("artifact.jar");
    int code = getDeployUtils().deployUsingGavWithRest(REPO_TEST_HARNESS_RELEASE_REPO, gav, artifact);

    Assert.assertEquals("Unable to deploy artifact " + code, code, 400);
View Full Code Here

  @Test
  public void deployPlainSnapshotArtifact()
      throws Exception
  {
    Gav gav = GavUtil.newGav("nexus1646", "artifact", "1.1.1-SNAPSHOT");

    File artifact = getTestFile("artifact.jar");
    int code = getDeployUtils().deployUsingGavWithRest(REPO_TEST_HARNESS_SNAPSHOT_REPO, gav, artifact);

    Assert.assertEquals("Unable to deploy artifact " + code, code, 400);
View Full Code Here

  @Test
  public void checkViewAccess()
      throws Exception
  {
    // force re-indexing to ensure that our artifact will be found by artifact info
    final Gav gav = new Gav("nexus3615", "artifact", "1.0");
    getSearchMessageUtil().reindexGAV(REPO_TEST_HARNESS_RELEASE_REPO, gav);
    getSearchMessageUtil().reindexGAV(REPO_TEST_HARNESS_REPO2, gav);
    getSearchMessageUtil().reindexGAV(REPO_TEST_HARNESS_REPO, gav);

    this.giveUserRole(TEST_USER_NAME, "ui-search", true);
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.