Package org.apache.maven.index.artifact

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


  {

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

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

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

    File mavenProject1 = getTestFile("maven-project-1");
    File mavenProject2 = getTestFile("maven-project-2");
View Full Code Here


  @Test
  public void plusSign()
      throws Exception
  {
    Gav gav = new Gav("nexus2302", "artifact", "1.0", "c++", "jar", null, null, null, false, null, false, null);
    testIt(gav);
  }
View Full Code Here

  @Test
  public void version()
      throws Exception
  {
    Gav gav = new Gav("nexus2302", "artifact", "1++0", null, "jar", null, null, null, false, null, false, null);
    testIt(gav);
  }
View Full Code Here

  @Test
  public void dolarSign()
      throws Exception
  {
    Gav gav =
        new Gav("nexus2302", "artifact", "$dolar", "void", "jar", null, null, null, false, null, false, null);
    testIt(gav);
  }
View Full Code Here

  @Before
  public void deployArtifact()
      throws Exception
  {
    Gav gav =
        new Gav(this.getTestId(), "artifact", "1.0.0", null, "xml", 0, new Date().getTime(), "", false,
            null, false, null);

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

    // URLConnection.set

    // use the test-user
    // this.giveUserPrivilege( "test-user", "T3" ); // the Wagon does a PUT not a POST, so this is correct
View Full Code Here

  @Test
  public void deleteTest()
      throws Exception
  {
    Gav gav =
        new Gav(this.getTestId(), "artifact", "1.0.0", null, "xml", 0, new Date().getTime(), "", false,
            null, false, null);

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

  public void readTest()
      throws IOException, URISyntaxException, Exception
  {
    this.overwriteUserRole("test-user", "read-test-role", "1");

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

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

  @Test
  public void deployAndRunReleaseTests()
      throws Exception
  {
    // deploy releases
    Gav simpleJarGav =
        new Gav("nexus3615", "simpleJar", "1.0.1", null, "jar", null, null, null, false, null, false, null);
    deployGav(simpleJarGav, getTestRepositoryId());
    downloadAndVerify(simpleJarGav, getTestRepositoryId());

    Gav withClassifierGav =
        new Gav("nexus3615", "simpleJar", "1.0.1", "classifier", "jar", null, null, null, false, null, false, null);
    deployGav(withClassifierGav, getTestRepositoryId());
    downloadAndVerify(withClassifierGav, getTestRepositoryId());

    Gav withExtentionGav =
        new Gav("nexus3615", "simpleJar", "1.0.1", null, "extention", null, null, null, false, null, false, null);
    deployGav(withExtentionGav, getTestRepositoryId());
    downloadAndVerify(withExtentionGav, getTestRepositoryId());

    Gav withClassifierAndExtentionGav =
        new Gav("nexus3615", "simpleJar", "1.0.1", "classifier", "extention", null, null, null, false, null,
            false, null);
    deployGav(withClassifierAndExtentionGav, getTestRepositoryId());
    downloadAndVerify(withClassifierAndExtentionGav, getTestRepositoryId());
  }
View Full Code Here

  @Test
  public void deployAndRunSnapshotTests()
      throws Exception
  {
    // deploy releases
    Gav simpleJarGav =
        new Gav("nexus3615", "simpleJar", "1.0.1-SNAPSHOT", null, "jar", 1, System.currentTimeMillis(), null,
            false, null, false, null);
    deployGav(simpleJarGav, REPO_TEST_HARNESS_SNAPSHOT_REPO);
    downloadAndVerify(simpleJarGav, REPO_TEST_HARNESS_SNAPSHOT_REPO);

    Gav withClassifierGav =
        new Gav("nexus3615", "simpleJar", "1.0.1-SNAPSHOT", "classifier", "jar", 2, System.currentTimeMillis(),
            null, false, null, false, null);
    deployGav(withClassifierGav, REPO_TEST_HARNESS_SNAPSHOT_REPO);
    downloadAndVerify(withClassifierGav, REPO_TEST_HARNESS_SNAPSHOT_REPO);

    Gav withExtentionGav =
        new Gav("nexus3615", "simpleJar", "1.0.1-SNAPSHOT", null, "extention", 3, System.currentTimeMillis(),
            null, false, null, false, null);
    deployGav(withExtentionGav, REPO_TEST_HARNESS_SNAPSHOT_REPO);
    downloadAndVerify(withExtentionGav, REPO_TEST_HARNESS_SNAPSHOT_REPO);

    Gav withClassifierAndExtentionGav =
        new Gav("nexus3615", "simpleJar", "1.0.1-SNAPSHOT", "classifier", "extention", 4,
            System.currentTimeMillis(), null, false, null, false, null);
    deployGav(withClassifierAndExtentionGav, REPO_TEST_HARNESS_SNAPSHOT_REPO);
    downloadAndVerify(withClassifierAndExtentionGav, REPO_TEST_HARNESS_SNAPSHOT_REPO);
  }
View Full Code Here

  @Test
  public void notFoundTest()
      throws Exception
  {
    Gav releaseNotFoundGav =
        new Gav("nexus3615", "notFound", "1.0.1", null, "jar", null, null, null, false, null, false, null);
    RequestFacade.doGetForStatus(getServiceUriPart(releaseNotFoundGav, "maven2", getTestRepositoryId()),
        hasStatusCode(404));

    Gav snapshotNotFoundGav =
        new Gav("nexus3615", "notFound", "1.0.1-SNAPSHOT", null, "jar", 1, System.currentTimeMillis(), null,
            false, null, false, null);
    RequestFacade.doGetForStatus(getServiceUriPart(snapshotNotFoundGav, "maven2", getTestRepositoryId()),
        hasStatusCode(404));
  }
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.