in src/main/java/org/apache/maven/plugins/changes/announcement/AnnouncementMailMojo.java [221:265]
public void execute() throws MojoExecutionException {
// Run only at the execution root
if (runOnlyAtExecutionRoot && !isThisTheExecutionRoot()) {
getLog().info("Skipping the announcement mail in this project because it's not the Execution Root");
} else {
File file = new File(announcementDirectory, announcementFile);
ConsoleLogger logger = new ConsoleLogger(Logger.LEVEL_INFO, "base");
if (getLog().isDebugEnabled()) {
logger.setThreshold(Logger.LEVEL_DEBUG);
}
mailer.enableLogging(logger);
mailer.setSmtpHost(getSmtpHost());
mailer.setSmtpPort(getSmtpPort());
mailer.setSslMode(sslMode, startTls);
if (username != null) {
mailer.setUsername(username);
}
if (password != null) {
mailer.setPassword(password);
}
mailer.initialize();
if (getLog().isDebugEnabled()) {
getLog().debug("fromDeveloperId: " + getFromDeveloperId());
}
if (file.isFile()) {
getLog().info("Connecting to Host: " + getSmtpHost() + ":" + getSmtpPort());
sendMessage();
} else {
throw new MojoExecutionException("Announcement file " + file + " not found...");
}
}
}