Package org.apache.maven.index.artifact

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


      throws Exception
  {
    TestContainer.getInstance().getTestContext().setUsername(TEST_USER_NAME);
    TestContainer.getInstance().getTestContext().setPassword(TEST_USER_PASSWORD);

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

    try {
      downloadArtifactFromGroup("g4", gav, "./target/downloaded-jars");
      Assert.fail();
    }
View Full Code Here


    final File pom = getTestFile("wagon.pom");
    final File sha1 = new File(pom.getParentFile(), "wagon.pom.sha1");
    FileUtils.write(sha1, FileTestingUtils.createSHA1FromFile(pom));

    final String repo = getRepositoryUrl(REPO_TEST_HARNESS_REPO);
    final Gav gav = GavUtil.newGav("nexus3626", "wagon", "1.0.0", "pom");
    final String path = getRelitiveArtifactPath(gav);
    getDeployUtils().deployWithWagon("http", repo, pom, path);
    getDeployUtils().deployWithWagon("http", repo, sha1, path + ".sha1");
    searchFor(pom);
  }
View Full Code Here

  @Test
  public void testGoodZip()
      throws Exception
  {
    String relativePath =
        getRelitiveArtifactPath(new Gav("nexus3709.foo.bar", "goodzip", "1.0.0", null, "zip", null, null,
            null, false, null, false, null));
    String url = this.getRepositoryUrl(this.getTestRepositoryId()) + relativePath;
    Response response = RequestFacade.sendMessage(new URL(url), Method.GET, null);

    Assert.assertEquals(200, response.getStatus().getCode());
View Full Code Here

  @Test
  public void testBadZip()
      throws Exception
  {
    String relativePath =
        getRelitiveArtifactPath(new Gav("nexus3709.foo.bar", "badzip", "1.0.0", null, "zip", null, null,
            null, false, null, false, null));
    String url = this.getRepositoryUrl(this.getTestRepositoryId()) + relativePath;
    Response response = RequestFacade.sendMessage(new URL(url), Method.GET, null);

    Assert.assertEquals(404, response.getStatus().getCode());
View Full Code Here

  @Test
  public void testGoodJar()
      throws Exception
  {
    String relativePath =
        getRelitiveArtifactPath(new Gav("nexus3709.foo.bar", "goodjar", "1.0.0", null, "jar", null, null,
            null, false, null, false, null));
    String url = this.getRepositoryUrl(this.getTestRepositoryId()) + relativePath;
    Response response = RequestFacade.sendMessage(new URL(url), Method.GET, null);

    Assert.assertEquals(200, response.getStatus().getCode());
View Full Code Here

  @Test
  public void testBadJar()
      throws Exception
  {
    String relativePath =
        getRelitiveArtifactPath(new Gav("nexus3709.foo.bar", "badjar", "1.0.0", null, "jar", null, null,
            null, false, null, false, null));
    String url = this.getRepositoryUrl(this.getTestRepositoryId()) + relativePath;
    Response response = RequestFacade.sendMessage(new URL(url), Method.GET, null);

    Assert.assertEquals(404, response.getStatus().getCode());
View Full Code Here

  @Test
  public void testGoodPom()
      throws Exception
  {
    String relativePath =
        getRelitiveArtifactPath(new Gav("nexus3709.foo.bar", "goodpom", "1.0.0", null, "pom", null, null,
            null, false, null, false, null));
    String url = this.getRepositoryUrl(this.getTestRepositoryId()) + relativePath;
    Response response = RequestFacade.sendMessage(new URL(url), Method.GET, null);

    Assert.assertEquals(200, response.getStatus().getCode());
View Full Code Here

  @Test
  public void testBadPom()
      throws Exception
  {
    String relativePath =
        getRelitiveArtifactPath(new Gav("nexus3709.foo.bar", "badpom", "1.0.0", null, "pom", null, null,
            null, false, null, false, null));
    String url = this.getRepositoryUrl(this.getTestRepositoryId()) + relativePath;
    Response response = RequestFacade.sendMessage(new URL(url), Method.GET, null);

    Assert.assertEquals(404, response.getStatus().getCode());
View Full Code Here

      extension = "jar";
    }
    String artifactFileName = model.getArtifactId() + "." + extension;
    File artifactFile = new File(project, artifactFileName);

    final Gav gav = new Gav(
        model.getGroupId(),
        model.getArtifactId(),
        model.getVersion(),
        null, // classifer
        extension,
View Full Code Here

  @Test
  @Category(SECURITY.class)
  public void downloadArtifactFromPublicGroup()
      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 = this.downloadArtifactFromGroup("public", 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

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.