|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.nuiton.plugin.AbstractPlugin
org.nuiton.helper.plugin.SendEmailMojo
public class SendEmailMojo
Send a email.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.nuiton.plugin.Plugin |
|---|
Plugin.InitState, Plugin.Packaging |
| Field Summary | |
|---|---|
protected boolean |
dryRun
A flag to test plugin but send nothing to redmine. |
protected java.io.File |
emailContentFile
The Velocity template used to format the email announcement. |
protected java.lang.String |
emailTitle
The title of the email to send. |
protected java.lang.String |
encoding
The encoding used to read and write files. |
protected java.util.List<org.apache.maven.model.Developer> |
from
Possible senders. |
protected java.lang.String |
fromDeveloperId
The id of the developer sending the announcement mail. |
protected java.lang.String |
mailContentType
Mail content type to use. |
protected MailSender |
mailSender
Defines the sender of the announcement if the list of developer is empty or if the sender is not a member of the development team. |
protected java.lang.String |
password
The password used to send the email. |
protected org.apache.maven.project.MavenProject |
project
Dependance du projet. |
protected org.apache.maven.settings.Settings |
settings
Dependance du settings. |
protected java.lang.String |
smtpHost
Smtp Server. |
protected int |
smtpPort
Port. |
protected boolean |
sslMode
If the email should be sent in SSL mode. |
protected java.util.List<java.lang.String> |
toAddresses
Recipient email address. |
protected java.lang.String |
username
The username used to send the email. |
protected boolean |
verbose
Un flag pour activer le mode verbeux. |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
SendEmailMojo()
|
|
| Method Summary | |
|---|---|
protected boolean |
checkSkip()
Checks if the mojo execution should be skipped. |
protected ProjectJavamailMailSender |
createMailer()
|
protected org.codehaus.plexus.mailsender.MailMessage |
createMessage(java.lang.String newsContent,
MailSender mailSender)
|
protected void |
doAction()
Do plugin action. |
org.apache.maven.project.MavenProject |
getProject()
|
protected void |
init()
Method to initialize the mojo before doing any concrete actions. |
protected boolean |
isExecutionRoot()
|
protected boolean |
isGoalSkip()
|
boolean |
isVerbose()
|
void |
setFrom(java.util.List<org.apache.maven.model.Developer> from)
|
void |
setMailSender(MailSender sender)
|
void |
setProject(org.apache.maven.project.MavenProject project)
|
void |
setToAddresses(java.util.List<java.lang.String> toAddresses)
|
void |
setVerbose(boolean verbose)
|
| Methods inherited from class org.apache.maven.plugin.AbstractMojo |
|---|
getLog, getPluginContext, setLog, setPluginContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.maven.plugin.Mojo |
|---|
getLog, setLog |
| Field Detail |
|---|
protected org.apache.maven.project.MavenProject project
protected org.apache.maven.settings.Settings settings
protected boolean verbose
protected java.io.File emailContentFile
protected java.lang.String emailTitle
protected java.lang.String smtpHost
protected int smtpPort
protected java.lang.String username
protected java.lang.String password
protected boolean sslMode
protected java.lang.String fromDeveloperId
protected MailSender mailSender
protected java.util.List<java.lang.String> toAddresses
protected java.util.List<org.apache.maven.model.Developer> from
protected java.lang.String mailContentType
protected java.lang.String encoding
protected boolean dryRun
| Constructor Detail |
|---|
public SendEmailMojo()
| Method Detail |
|---|
public org.apache.maven.project.MavenProject getProject()
public void setProject(org.apache.maven.project.MavenProject project)
public boolean isVerbose()
public void setVerbose(boolean verbose)
protected void init()
throws java.lang.Exception
AbstractPluginAbstractPlugin.doAction() method.
// * @return true if mojo is well initialize and something has
// * to be done in the AbstractPlugin.doAction() method, false
// * otherwise.
init in class AbstractPluginjava.lang.Exception - if anyprotected boolean checkSkip()
AbstractPlugin
checkSkip in class AbstractPluginfalse if the mojo should not be executed.
protected void doAction()
throws java.lang.Exception
AbstractPluginAbstractPlugin.execute() invoke this method only and only if :
AbstractPlugin.checkPackaging() returns true.AbstractPlugin.init() returns true.
doAction in class AbstractPluginjava.lang.Exception - if anyprotected boolean isGoalSkip()
protected org.codehaus.plexus.mailsender.MailMessage createMessage(java.lang.String newsContent,
MailSender mailSender)
throws org.codehaus.plexus.mailsender.MailSenderException
org.codehaus.plexus.mailsender.MailSenderExceptionprotected ProjectJavamailMailSender createMailer()
public void setMailSender(MailSender sender)
public void setFrom(java.util.List<org.apache.maven.model.Developer> from)
public void setToAddresses(java.util.List<java.lang.String> toAddresses)
protected boolean isExecutionRoot()
isExecutionRoot in class AbstractPlugintrue if project is the root execution project
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||