/** * Send a "message logged" project level event * to the build listeners for this project. * * @param project The project generating the event. * Should not be <code>null</code>. * @param message The message to send. Should not be <code>null</code>. * @param throwable The exception that caused this message. May be <code>null</code>. * @param priority The priority of the message. * @since 1.7 */ protected void fireMessageLogged(final Project project, final String message, final Throwable throwable, final int priority) { final BuildEvent event = new BuildEvent(project); event.setException(throwable); fireMessageLoggedEvent(event, message, priority); }
/** * Send a "message logged" task level event * to the build listeners for this project. * * @param task The task generating the event. * Must not be <code>null</code>. * @param message The message to send. Should not be <code>null</code>. * @param throwable The exception that caused this message. May be <code>null</code>. * @param priority The priority of the message. * @since 1.7 */ protected void fireMessageLogged(final Task task, final String message, final Throwable throwable, final int priority) { final BuildEvent event = new BuildEvent(task); event.setException(throwable); fireMessageLoggedEvent(event, message, priority); }
/** * Send a "task finished" event to the build listeners for this * project. * * @param task The task which has finished executing. * Must not be <code>null</code>. * @param exception an exception indicating a reason for a build * failure. May be <code>null</code>, indicating * a successful build. */ protected void fireTaskFinished(final Task task, final Throwable exception) { registerThreadTask(Thread.currentThread(), null); System.out.flush(); System.err.flush(); final BuildEvent event = new BuildEvent(task); event.setException(exception); for (BuildListener currListener : listeners) { currListener.taskFinished(event); } }
/** * Send a "subbuild finished" event to the build listeners for * this project. * @param exception an exception indicating a reason for a build * failure. May be <code>null</code>, indicating * a successful build. * * @since Ant 1.6.2 */ public void fireSubBuildFinished(final Throwable exception) { final BuildEvent event = new BuildEvent(this); event.setException(exception); for (BuildListener currListener : listeners) { if (currListener instanceof SubBuildListener) { ((SubBuildListener) currListener).subBuildFinished(event); } } }
/** * Send a "target finished" event to the build listeners * for this project. * * @param target The target which has finished building. * Must not be <code>null</code>. * @param exception an exception indicating a reason for a build * failure. May be <code>null</code>, indicating * a successful build. */ protected void fireTargetFinished(final Target target, final Throwable exception) { final BuildEvent event = new BuildEvent(target); event.setException(exception); for (BuildListener currListener : listeners) { currListener.targetFinished(event); } }
/** * Send a "message logged" target level event * to the build listeners for this project. * * @param target The target generating the event. * Must not be <code>null</code>. * @param message The message to send. Should not be <code>null</code>. * @param throwable The exception that caused this message. May be <code>null</code>. * @param priority The priority of the message. * @since 1.7 */ protected void fireMessageLogged(final Target target, final String message, final Throwable throwable, final int priority) { final BuildEvent event = new BuildEvent(target); event.setException(throwable); fireMessageLoggedEvent(event, message, priority); }
/** * Send a "build finished" event to the build listeners * for this project. * @param exception an exception indicating a reason for a build * failure. May be <code>null</code>, indicating * a successful build. */ public void fireBuildFinished(final Throwable exception) { final BuildEvent event = new BuildEvent(this); event.setException(exception); for (BuildListener currListener : listeners) { currListener.buildFinished(event); } // Inform IH to clear the cache IntrospectionHelper.clearCache(); }