Package org.apache.maven.index.artifact

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


  public static Gav newGav(String groupId, String artifactId, String version) {
    return newGav(groupId, artifactId, version, "jar");
  }

  public static Gav newGav(String groupId, String artifactId, String version, String packging) {
    return new Gav(groupId, artifactId, version, null, packging, null, null, null, false, null, false, null);
  }
View Full Code Here


  @Test
  public void doReleaseArtifactTest()
      throws Exception
  {
    Gav gav =
        new Gav(this.getTestId(), "artifact", "1.0.0", null, "xml", 0, new Date().getTime(), "", false,
            null, false, null);
    this.setTestRepositoryId(TEST_RELEASE_REPO);
    this.deployPrivWithWagon(gav, this.getNexusTestRepoUrl());
  }
View Full Code Here

  @Test
  public void doSnapshotArtifactTest()
      throws Exception
  {
    Gav gav =
        new Gav(this.getTestId(), "artifact", "1.0.0-SNAPSHOT", null, "xml", 0, new Date().getTime(), "",
            false, null, false, null);
    this.setTestRepositoryId(TEST_SNAPSHOT_REPO);
    this.deployPrivWithWagon(gav, this.getNexusTestRepoUrl());
  }
View Full Code Here

  public Nexus526FeedsIT()
      throws Exception
  {
    super("nexus-test-harness-repo");
    this.gav =
        new Gav(this.getTestId(), "artifact1", "1.0.0", null, "jar", 0, new Date().getTime(), "Artifact 1",
            false, null, false, null);
  }
View Full Code Here

  public void deployPrivWithPom()
      throws Exception
  {
    // GAV
    Gav gav =
        new Gav(this.getTestId(), "uploadWithGav", "1.0.0", null, "xml", 0, new Date().getTime(), "",
            false, null, false, null);

    // file to deploy
    File fileToDeploy = this.getTestFile(gav.getArtifactId() + "." + gav.getExtension());

    File pomFile = this.getTestFile("pom.xml");

    // deploy
    TestContainer.getInstance().getTestContext().setUsername("test-user");
View Full Code Here

  public void deployPrivWithGav()
      throws Exception
  {
    // GAV
    Gav gav =
        new Gav(this.getTestId(), "uploadWithGav", "1.0.0", null, "xml", 0, new Date().getTime(), "",
            false, null, false, null);

    // file to deploy
    File fileToDeploy = this.getTestFile(gav.getArtifactId() + "." + gav.getExtension());

    // deploy
    TestContainer.getInstance().getTestContext().setUsername("test-user");
    TestContainer.getInstance().getTestContext().setPassword("admin123");
View Full Code Here

      throws Exception
  {
    final String repoId = "nexus2351disableReleaseAllowRedeployWithMavenTest";
    setWritePolicy(repoId, RepositoryWritePolicy.ALLOW_WRITE);

    Gav gav1 =
        new Gav(this.getTestId(), "release-deploy", "1.0.0", null, "jar", 0, new Date().getTime(),
            "release-deploy", false, null, false, null);

    Gav gav2 =
        new Gav(this.getTestId(), "release-deploy", "1.0.1", null, "jar", 0, new Date().getTime(),
            "release-deploy", false, null, false, null);
    File mavenProject1 = getTestFile("maven-project-1");
    File mavenProject2 = getTestFile("maven-project-2");
    this.deployWithMavenExpectSuccess(mavenProject1, repoId);
    Metadata metadata = this.downloadMetadataFromRepository(gav1, repoId);
View Full Code Here

      throws Exception
  {
    final String repoId = "nexus2351disableReleaseAllowRedeployWithUploadTest";
    setWritePolicy(repoId, RepositoryWritePolicy.ALLOW_WRITE);

    Gav gav =
        new Gav(this.getTestId(), "release-deploy", "1.0.0", null, "jar", 0, new Date().getTime(),
            "release-deploy", false, null, false, null);

    File fileToDeploy = getTestFile("artifact.jar");

    Assert.assertEquals(201, getDeployUtils().deployUsingGavWithRest(repoId, gav, fileToDeploy));
View Full Code Here

      throws Exception
  {
    String repoId = "nexus2351disableReleaseReadOnlyWithUploadTest";
    setWritePolicy(repoId, RepositoryWritePolicy.READ_ONLY);

    Gav gav =
        new Gav(this.getTestId(), "disableReleaseReadOnlyWithUploadTest", "1.0.0", null, "jar", 0,
            new Date().getTime(), "disableReleaseReadOnlyWithUploadTest", false, null, false, null);

    File fileToDeploy = getTestFile("artifact.jar");

    Assert.assertEquals(400, getDeployUtils().deployUsingGavWithRest(repoId, gav, fileToDeploy));
View Full Code Here

  {

    String repoId = "nexus2351disableReleaseNoRedeployWithUploadTest";
    setWritePolicy(repoId, RepositoryWritePolicy.ALLOW_WRITE_ONCE);

    Gav gav =
        new Gav(this.getTestId(), "disableReleaseNoRedeployTest", "1.0.0", null, "jar", 0, new Date().getTime(),
            "disableReleaseNoRedeployTest", false, null, false, null);

    File fileToDeploy = getTestFile("artifact.jar");

    Assert.assertEquals(201, getDeployUtils().deployUsingGavWithRest(repoId, gav, fileToDeploy));
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.