public boolean end(MavenBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { if(perModuleEmail) { LOGGER.log(Level.FINE, "for {0} potentially mailing to {1} plus {2}", new Object[] {build, recipients, mavenRecipients}); if (sendToIndividuals) { LOGGER.log(Level.FINE, "would also include {0}", build.getCulprits()); } final String evaluatedRecipients = new VariableExpander(build, listener).expand(getAllRecipients()); new MailSender(evaluatedRecipients,dontNotifyEveryUnstableBuild,sendToIndividuals).execute(build,listener); } return true; }
@Override public void cleanUp(BuildListener listener) throws Exception { MavenMailer mailer = project.getReporters().get(MavenMailer.class); if (mailer != null) { final String evaluatedRecipients = new VariableExpander(getBuild(), listener).expand(mailer.getAllRecipients()); new MailSender(evaluatedRecipients, mailer.dontNotifyEveryUnstableBuild, mailer.sendToIndividuals).execute(MavenModuleSetBuild.this, listener); } // too late to set the build result at this point. so ignore failures. performAllBuildSteps(listener, project.getPublishers(), false); performAllBuildSteps(listener, project.getProperties(), false); super.cleanUp(listener); }