Package org.apache.maven.it

Examples of org.apache.maven.it.Verifier.verifyErrorFreeLog()


      }

      verifier.setLogFileName(getTestId() + "-maven-output.log");
      verifier.addCliOption("-X");
      verifier.executeGoals(Arrays.asList("verify"));
      verifier.verifyErrorFreeLog();
      verifier.resetStreams();

      FileUtils.deleteDirectory(testDir);
    }
    finally {
View Full Code Here


    try {
      verifierAnon = mavenVerifierHelper.createMavenVerifier(mavenProjectAnon, settingsAnon, getTestId());

      verifierAnon.executeGoal("deploy");

      verifierAnon.verifyErrorFreeLog();

      Assert.fail("Should return 401 error");
    }
    catch (VerificationException e) {
      // test pass
View Full Code Here

    final File settings = getTestFile("repositories.xml");
    {
      final Verifier verifier = mavenVerifierHelper.createMavenVerifier(mavenProject, settings, getTestId());
      try {
        verifier.executeGoal("dependency:resolve");
        verifier.verifyErrorFreeLog();
      }
      catch (VerificationException e) {
        mavenVerifierHelper.failTest(verifier);
      }
    }
View Full Code Here

      // Disable anonymous
      disableUser("anonymous");

      try {
        verifier.executeGoal("dependency:resolve");
        verifier.verifyErrorFreeLog();
        mavenVerifierHelper.failTest(verifier);
      }
      catch (VerificationException e) {
        // Expected exception
      }
View Full Code Here

      File mavenProjectWithauth = getTestFile("maven-project");
      File settingsWithAuth = getTestFile("repositoriesWithAuthentication.xml");

      Verifier verifier = mavenVerifierHelper.createMavenVerifier(mavenProjectWithauth, settingsWithAuth, getTestId());
      verifier.executeGoal("dependency:resolve");
      verifier.verifyErrorFreeLog();
    }
  }

  private UserResource disableUser(String userId)
      throws IOException
View Full Code Here

    try {
      verifier1 = mavenVerifierHelper.createMavenVerifier(mavenProject1, settings1, getTestId());

      verifier1.executeGoal("deploy");

      verifier1.verifyErrorFreeLog();
    }

    catch (VerificationException e) {
      mavenVerifierHelper.failTest(verifier1);
    }
View Full Code Here

    }

    try {
      verifier1.executeGoal("deploy");

      verifier1.verifyErrorFreeLog();

      Assert.fail("Should return 401 error");
    }
    catch (VerificationException e) {
      // 401 error
View Full Code Here

    try {
      verifier = mavenVerifierHelper.createMavenVerifier(mavenProject, settings, getTestId());

      verifier.executeGoal("deploy");

      verifier.verifyErrorFreeLog();
    }

    catch (VerificationException e) {
      mavenVerifierHelper.failTest(verifier);
    }
View Full Code Here

    try {
      verifier2 = mavenVerifierHelper.createMavenVerifier(mavenProject2, settings2, getTestId());

      verifier2.executeGoal("deploy");

      verifier2.verifyErrorFreeLog();
    }
    catch (VerificationException e) {
      mavenVerifierHelper.failTest(verifier2);
    }
  }
View Full Code Here

    verifier.setCliOptions(Arrays.asList("-s " + mavenSettingsTarget.getAbsolutePath()));

    verifier.resetStreams();

    verifier.executeGoal("deploy");
    verifier.verifyErrorFreeLog();

    testIndex().recordLink("maven.log", new File(projectToBuildTarget, "maven.log"));
  }

  protected String repositoryIdForTest() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.