コード例 #1
0
ファイル: GitHubEventSpy.java プロジェクト: bas/m2github
 private String generateMojoName(ExecutionEvent executionEvent) {
   return String.format(
       "%s/%s/%s/%s",
       executionEvent.getProject().getName(),
       executionEvent.getMojoExecution().getGroupId(),
       executionEvent.getMojoExecution().getArtifactId(),
       executionEvent.getMojoExecution().getGoal());
 }
コード例 #2
0
  @Override
  public void forkedProjectStarted(ExecutionEvent event) {
    if (logger.isInfoEnabled() && event.getMojoExecution().getForkedExecutions().size() > 1) {
      logger.info(chars(' ', LINE_LENGTH));
      logger.info(chars('>', LINE_LENGTH));

      logger.info(
          "Forking " + event.getProject().getName() + " " + event.getProject().getVersion());

      logger.info(chars('>', LINE_LENGTH));
    }
  }
コード例 #3
0
  @Override
  public void projectStarted(ExecutionEvent event) {
    if (logger.isInfoEnabled()) {
      logger.info(chars(' ', LINE_LENGTH));
      logger.info(chars('-', LINE_LENGTH));

      logger.info(
          "Building " + event.getProject().getName() + " " + event.getProject().getVersion());

      logger.info(chars('-', LINE_LENGTH));
    }
  }
コード例 #4
0
  @Override
  public void sessionStarted(ExecutionEvent event) {
    if (logger.isInfoEnabled() && event.getSession().getProjects().size() > 1) {
      logger.info(chars('-', LINE_LENGTH));

      logger.info("Reactor Build Order:");

      logger.info("");

      for (MavenProject project : event.getSession().getProjects()) {
        logger.info(project.getName());
      }
    }
  }
コード例 #5
0
  @Override
  public void forkSucceeded(ExecutionEvent event) {
    if (logger.isInfoEnabled()) {
      StringBuilder buffer = new StringBuilder(128);

      buffer.append("<<< ");
      append(buffer, event.getMojoExecution());
      append(buffer, event.getProject());
      buffer.append(" <<<");

      logger.info("");
      logger.info(buffer.toString());
    }
  }
コード例 #6
0
  @Override
  public void sessionEnded(ExecutionEvent event) {
    if (logger.isInfoEnabled()) {
      if (event.getSession().getProjects().size() > 1) {
        logReactorSummary(event.getSession());
      }

      logResult(event.getSession());

      logStats(event.getSession());

      logger.info(chars('-', LINE_LENGTH));
    }
  }
コード例 #7
0
 @Override
 public void mojoSkipped(ExecutionEvent event) {
   if (logger.isWarnEnabled()) {
     logger.warn(
         "Goal "
             + event.getMojoExecution().getGoal()
             + " requires online mode for execution but Maven is currently offline, skipping");
   }
 }
コード例 #8
0
  @Override
  public void projectSkipped(ExecutionEvent event) {
    if (logger.isInfoEnabled()) {
      logger.info(chars(' ', LINE_LENGTH));
      logger.info(chars('-', LINE_LENGTH));

      logger.info("Skipping " + event.getProject().getName());
      logger.info("This project has been banned from the build due to previous failures.");

      logger.info(chars('-', LINE_LENGTH));
    }
  }
コード例 #9
0
ファイル: GitHubEventSpy.java プロジェクト: bas/m2github
 protected void processExecutionEvent(ExecutionEvent executionEvent) {
   switch (executionEvent.getType()) {
     case MojoStarted:
       sendStatus(generateMojoName(executionEvent), GitHubStatus.Pending);
       break;
     case MojoSucceeded:
       sendStatus(generateMojoName(executionEvent), GitHubStatus.Success);
       break;
     case MojoFailed:
       sendStatus(generateMojoName(executionEvent), GitHubStatus.Failure);
       break;
     case ProjectStarted:
       sendStatus(generateProjectName(executionEvent), GitHubStatus.Pending);
       break;
     case ProjectSucceeded:
       sendStatus(generateProjectName(executionEvent), GitHubStatus.Success);
       break;
     case ProjectFailed:
       sendStatus(generateProjectName(executionEvent), GitHubStatus.Failure);
       break;
     default:
       break;
   }
 }
コード例 #10
0
ファイル: GitHubEventSpy.java プロジェクト: bas/m2github
 private String generateProjectName(ExecutionEvent executionEvent) {
   return executionEvent.getProject().getName();
 }