@Mojo(name="announcement-mail", threadSafe=true) @Execute(goal="announcement-generate") public class AnnouncementMailMojo extends AbstractAnnouncementMojo
basedir, mavenSession, runOnlyAtExecutionRoot
Constructor and Description |
---|
AnnouncementMailMojo() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
protected MailSender |
getActualMailSender()
Returns the identify of the mail sender according to the plugin's configuration:
if the mailSender parameter is set, it is returned
if no fromDeveloperId is set, the first developer in the list is returned
if a fromDeveloperId is set, the developer with that id is returned
if the developers list is empty or if the specified id does not exist, an exception is thrown
|
List |
getBccAddresses() |
List |
getCcAddresses() |
List |
getFrom() |
String |
getFromDeveloperId() |
MailSender |
getMailSender() |
String |
getPassword() |
org.apache.maven.project.MavenProject |
getProject() |
String |
getSmtpHost() |
int |
getSmtpPort() |
String |
getSubject() |
String |
getTemplate() |
File |
getTemplateOutputDirectory() |
List |
getToAddresses() |
String |
getUsername() |
boolean |
isSslMode() |
protected FileReader |
readAnnouncement(File file)
Read the announcement generated file.
|
protected void |
sendMessage()
Send the email.
|
void |
setBccAddresses(List bccAddresses) |
void |
setCcAddresses(List ccAddresses) |
void |
setFrom(List from) |
void |
setFromDeveloperId(String fromDeveloperId) |
void |
setMailSender(MailSender mailSender) |
void |
setPassword(String password) |
void |
setProject(org.apache.maven.project.MavenProject project) |
void |
setSmtpHost(String smtpHost) |
void |
setSmtpPort(int smtpPort) |
void |
setSslMode(boolean sslMode) |
void |
setSubject(String subject) |
void |
setTemplate(String template) |
void |
setTemplateOutputDirectory(File templateOutputDirectory) |
void |
setToAddresses(List toAddresses) |
void |
setUsername(String username) |
isThisTheExecutionRoot
public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void sendMessage() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
- if the mail could not be sentprotected FileReader readAnnouncement(File file) throws org.apache.maven.plugin.MojoExecutionException
file
- the file to be readorg.apache.maven.plugin.MojoExecutionException
- if the file could not be foundprotected MailSender getActualMailSender() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
- if the mail sender could not be retrievedpublic List getBccAddresses()
public void setBccAddresses(List bccAddresses)
public List getCcAddresses()
public void setCcAddresses(List ccAddresses)
public List getFrom()
public void setFrom(List from)
public String getFromDeveloperId()
public void setFromDeveloperId(String fromDeveloperId)
public MailSender getMailSender()
public void setMailSender(MailSender mailSender)
public String getPassword()
public void setPassword(String password)
public org.apache.maven.project.MavenProject getProject()
public void setProject(org.apache.maven.project.MavenProject project)
public String getSmtpHost()
public void setSmtpHost(String smtpHost)
public int getSmtpPort()
public void setSmtpPort(int smtpPort)
public boolean isSslMode()
public void setSslMode(boolean sslMode)
public String getSubject()
public void setSubject(String subject)
public String getTemplate()
public void setTemplate(String template)
public File getTemplateOutputDirectory()
public void setTemplateOutputDirectory(File templateOutputDirectory)
public List getToAddresses()
public void setToAddresses(List toAddresses)
public String getUsername()
public void setUsername(String username)
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.