org.apache.maven.announcement

Class AnnouncementMailMojo

public class AnnouncementMailMojo extends AbstractMojo

Maven Announcement mailer goal.

Author: aramirez@exist.com

UNKNOWN: announcement-mail Goal which sends the template thru email

Method Summary
voidexecute()
StringgetFile()
StringgetFirstDevEmail(List fromNames)
Retrieve the 1st email address found in the list
ListgetFrom()
MavenProjectgetProject()
StringgetSmtpHost()
intgetSmtpPort()
StringgetSubject()
ListgetToAddresses()
protected booleanisTextFileExisting(String fileName)
FileReaderreadAnnouncement(String fileName)
Read the announcement generated file
protected voidsendMessage(String recipient)
Send the email
voidsetFile(String file)
voidsetFrom(List from)
voidsetProject(MavenProject project)
voidsetSmtpHost(String smtpHost)
voidsetSmtpPort(int smtpPort)
voidsetSubject(String subject)
voidsetToAddresses(List toAddresses)

Method Detail

execute

public void execute()

getFile

public String getFile()

getFirstDevEmail

public String getFirstDevEmail(List fromNames)
Retrieve the 1st email address found in the list

Parameters: fromNames Accepts List of developers.

Returns: fromAddress Returns the 1st email address found in the list.

getFrom

public List getFrom()

getProject

public MavenProject getProject()

getSmtpHost

public String getSmtpHost()

getSmtpPort

public int getSmtpPort()

getSubject

public String getSubject()

getToAddresses

public List getToAddresses()

isTextFileExisting

protected boolean isTextFileExisting(String fileName)

readAnnouncement

public FileReader readAnnouncement(String fileName)
Read the announcement generated file

Parameters: fileName Accepts filename to be read.

Returns: fileReader Return the FileReader.

sendMessage

protected void sendMessage(String recipient)
Send the email

Parameters: recipient receiver of the email

Throws: MojoExecutionException

setFile

public void setFile(String file)

setFrom

public void setFrom(List from)

setProject

public void setProject(MavenProject project)

setSmtpHost

public void setSmtpHost(String smtpHost)

setSmtpPort

public void setSmtpPort(int smtpPort)

setSubject

public void setSubject(String subject)

setToAddresses

public void setToAddresses(List toAddresses)
Copyright © {inceptionYear}-2007 null. All Rights Reserved.