@Mojo(name="send-email",
requiresOnline=true,
requiresProject=true)
public class SendEmailMojo
extends AbstractPlugin
implements PluginWithEncoding
Plugin.InitState, Plugin.Packaging| Modifier and Type | Field and Description |
|---|---|
protected boolean |
dryRun
A flag to test plugin but send nothing to redmine.
|
protected File |
emailContentFile
The Velocity template used to format the email announcement.
|
protected String |
emailTitle
The title of the email to send.
|
protected String |
encoding
The encoding used to read and write files.
|
protected List<org.apache.maven.model.Developer> |
from
Possible senders.
|
protected String |
fromDeveloperId
The id of the developer sending the announcement mail.
|
protected 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 String |
password
The password used to send the email.
|
protected org.apache.maven.project.MavenProject |
project
Dependance du projet.
|
protected boolean |
runOnce
A flag to restirct only one run in a build (for multi-module context).
|
protected boolean |
runOnlyOnRoot
A flag to restrict only to run on root module.
|
protected boolean |
skipSendEmail
A flag to skip the goal.
|
protected String |
smtpHost
Smtp Server.
|
protected int |
smtpPort
Port.
|
protected boolean |
sslMode
If the email should be sent in SSL mode.
|
protected List<String> |
toAddresses
Recipient email address.
|
protected String |
username
The username used to send the email.
|
protected boolean |
verbose
Un flag pour activer le mode verbeux.
|
| Constructor and Description |
|---|
SendEmailMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkSkip() |
protected ProjectJavamailMailSender |
createMailer() |
protected org.codehaus.plexus.mailsender.MailMessage |
createMessage(String newsContent,
MailSender mailSender) |
protected void |
doAction() |
String |
getEncoding() |
org.apache.maven.project.MavenProject |
getProject() |
protected void |
init() |
protected boolean |
isExecutionRoot() |
protected boolean |
isGoalSkip() |
boolean |
isVerbose() |
void |
setEncoding(String encoding) |
void |
setFrom(List<org.apache.maven.model.Developer> from) |
void |
setMailSender(MailSender mailSender) |
void |
setProject(org.apache.maven.project.MavenProject project) |
void |
setToAddresses(List<String> toAddresses) |
void |
setVerbose(boolean verbose) |
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkEncoding, checkPackaging, checkResource, checkRunOnceDone, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isFileNewerThanPomFile, needInvoke, needInvoke, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFilegetLog, getPluginContext, setLog, setPluginContext@Component protected org.apache.maven.project.MavenProject project
@Parameter(property="helper.verbose",
defaultValue="${maven.verbose}")
protected boolean verbose
@Parameter(property="helper.emailContentFile",
required=true)
protected File emailContentFile
@Parameter(property="helper.emailTitle",
required=true)
protected String emailTitle
@Parameter(property="helper.smtpHost",
required=true)
protected String smtpHost
@Parameter(property="helper.smtpPort",
defaultValue="25",
required=true)
protected int smtpPort
@Parameter(property="helper.username") protected String username
@Parameter(property="helper.password") protected String password
@Parameter(property="helper.sslMode",
defaultValue="false")
protected boolean sslMode
@Parameter(property="helper.fromDeveloperId") protected String fromDeveloperId
@Parameter(property="helper.mailSender") protected MailSender mailSender
@Parameter(required=true) protected List<String> toAddresses
@Parameter(property="project.developers",
required=true,
readonly=true)
protected List<org.apache.maven.model.Developer> from
@Parameter(defaultValue="text/plain",
required=true)
protected String mailContentType
@Parameter(property="helper.encoding",
defaultValue="${project.build.sourceEncoding}")
protected String encoding
@Parameter(property="helper.skipSendEmail",
defaultValue="false")
protected boolean skipSendEmail
@Parameter(property="dryRun",
defaultValue="false")
protected boolean dryRun
@Parameter(property="helper.runOnce",
defaultValue="true")
protected boolean runOnce
@Parameter(property="helper.runOnlyOnRoot",
defaultValue="true")
protected boolean runOnlyOnRoot
public org.apache.maven.project.MavenProject getProject()
getProject in interface Pluginpublic void setProject(org.apache.maven.project.MavenProject project)
setProject in interface Pluginpublic void setVerbose(boolean verbose)
setVerbose in interface Pluginprotected void init()
throws Exception
init in class AbstractPluginExceptionprotected boolean checkSkip()
checkSkip in class AbstractPluginprotected void doAction()
throws Exception
doAction in class AbstractPluginExceptionprotected boolean isGoalSkip()
protected org.codehaus.plexus.mailsender.MailMessage createMessage(String newsContent, MailSender mailSender) throws org.codehaus.plexus.mailsender.MailSenderException
org.codehaus.plexus.mailsender.MailSenderExceptionprotected ProjectJavamailMailSender createMailer()
public void setMailSender(MailSender mailSender)
public void setFrom(List<org.apache.maven.model.Developer> from)
protected boolean isExecutionRoot()
isExecutionRoot in class AbstractPluginpublic String getEncoding()
getEncoding in interface PluginWithEncodingpublic void setEncoding(String encoding)
setEncoding in interface PluginWithEncodingCopyright © 2009–2013 CodeLutin. All rights reserved.