org.apache.maven.plugin.announcement
Class AnnouncementMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.changes.AbstractChangesMojo
          extended by org.apache.maven.plugin.announcement.AbstractAnnouncementMojo
              extended by org.apache.maven.plugin.announcement.AnnouncementMojo
All Implemented Interfaces:
ContextEnabled, Mojo

@Mojo(name="announcement-generate",
      requiresDependencyResolution=TEST,
      threadSafe=true)
public class AnnouncementMojo
extends AbstractAnnouncementMojo

Goal which generate an announcement from the announcement template.

Since:
2.0-beta-2
Version:
$Id: AnnouncementMojo.java 1626681 2014-09-22 07:34:09Z mfriedenhagen $
Author:
aramirez@exist.com

Field Summary
 
Fields inherited from class org.apache.maven.plugin.announcement.AbstractAnnouncementMojo
runOnlyAtExecutionRoot
 
Fields inherited from class org.apache.maven.plugin.changes.AbstractChangesMojo
basedir, mavenSession
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AnnouncementMojo()
           
 
Method Summary
 void doGenerate(List<Release> releases)
          Add the parameters to velocity context
protected  void doGenerate(List<Release> releases, Release release)
           
 void execute()
          Generate the template
 File getAnnouncementDirectory()
           
 String getArtifactId()
           
 String getDevelopmentTeam()
           
 String getFinalName()
           
protected  List<Release> getGitHubReleases()
           
 String getGroupId()
           
 String getIntroduction()
           
 Map<String,String> getIssueTypes()
           
protected  List<Release> getJiraReleases()
           
 String getPackaging()
           
protected  List<Release> getTracReleases()
           
 String getUrl()
           
 String getUrlDownload()
           
 VelocityComponent getVelocity()
           
 String getVersion()
           
 ChangesXML getXml()
           
 File getXmlPath()
           
 void processTemplate(Context context, File outputDirectory, String template, String announcementFile)
          Create the velocity template
 void setAnnouncementDirectory(File announcementDirectory)
           
 void setArtifactId(String artifactId)
           
 void setDevelopmentTeam(String developmentTeam)
           
 void setFinalName(String finalName)
           
 void setGroupId(String groupId)
           
 void setIntroduction(String introduction)
           
 void setIssueTypes(Map<String,String> issueTypes)
           
 void setPackaging(String packaging)
           
 void setUrl(String url)
           
 void setUrlDownload(String urlDownload)
           
 void setVelocity(VelocityComponent velocity)
           
 void setVersion(String version)
           
 void setXml(ChangesXML xml)
           
 void setXmlPath(File xmlPath)
           
 
Methods inherited from class org.apache.maven.plugin.changes.AbstractChangesMojo
isThisTheExecutionRoot
 
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
 

Constructor Detail

AnnouncementMojo

public AnnouncementMojo()
Method Detail

execute

public void execute()
             throws MojoExecutionException
Generate the template

Throws:
MojoExecutionException

doGenerate

public void doGenerate(List<Release> releases)
                throws MojoExecutionException
Add the parameters to velocity context

Parameters:
releases - A List of Releases
Throws:
MojoExecutionException

doGenerate

protected void doGenerate(List<Release> releases,
                          Release release)
                   throws MojoExecutionException
Throws:
MojoExecutionException

processTemplate

public void processTemplate(Context context,
                            File outputDirectory,
                            String template,
                            String announcementFile)
                     throws VelocityException,
                            MojoExecutionException
Create the velocity template

Parameters:
context - velocity context that has the parameter values
outputDirectory - directory where the file will be generated
template - velocity template which will the context be merged
announcementFile - The file name of the generated announcement
Throws:
ResourceNotFoundException, - VelocityException, IOException
VelocityException
MojoExecutionException

getJiraReleases

protected List<Release> getJiraReleases()
                                 throws MojoExecutionException
Throws:
MojoExecutionException

getTracReleases

protected List<Release> getTracReleases()
                                 throws MojoExecutionException
Throws:
MojoExecutionException

getGitHubReleases

protected List<Release> getGitHubReleases()
                                   throws MojoExecutionException
Throws:
MojoExecutionException

getArtifactId

public String getArtifactId()

setArtifactId

public void setArtifactId(String artifactId)

getDevelopmentTeam

public String getDevelopmentTeam()

setDevelopmentTeam

public void setDevelopmentTeam(String developmentTeam)

getFinalName

public String getFinalName()

setFinalName

public void setFinalName(String finalName)

getGroupId

public String getGroupId()

setGroupId

public void setGroupId(String groupId)

getIntroduction

public String getIntroduction()

setIntroduction

public void setIntroduction(String introduction)

setIssueTypes

public void setIssueTypes(Map<String,String> issueTypes)

getIssueTypes

public Map<String,String> getIssueTypes()

getAnnouncementDirectory

public File getAnnouncementDirectory()

setAnnouncementDirectory

public void setAnnouncementDirectory(File announcementDirectory)

getPackaging

public String getPackaging()

setPackaging

public void setPackaging(String packaging)

getUrl

public String getUrl()

setUrl

public void setUrl(String url)

getUrlDownload

public String getUrlDownload()

setUrlDownload

public void setUrlDownload(String urlDownload)

getVelocity

public VelocityComponent getVelocity()

setVelocity

public void setVelocity(VelocityComponent velocity)

getVersion

public String getVersion()

setVersion

public void setVersion(String version)

getXml

public ChangesXML getXml()

setXml

public void setXml(ChangesXML xml)

getXmlPath

public File getXmlPath()

setXmlPath

public void setXmlPath(File xmlPath)


Copyright © 2002–2014 The Apache Software Foundation. All rights reserved.