org.apache.maven.plugin.announcement
Class AnnouncementMojo

java.lang.Object
  extended byorg.apache.maven.plugin.AbstractMojo
      extended byorg.apache.maven.plugin.announcement.AnnouncementMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class AnnouncementMojo
extends org.apache.maven.plugin.AbstractMojo

Goal which generate the template for an announcement.

Version:
$Id: AnnouncementMojo.html 816588 2012-05-08 12:37:27Z hboutemy $
Author:
aramirez@exist.com
Is defined by the goal name:
announcement-generate
Requires the dependencies in this specified scope:
test

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AnnouncementMojo()
           
 
Method Summary
 void doGenerate(java.util.List releases)
          Add the parameters to velocity context
protected  void doGenerate(java.util.List releases, Release release)
           
 void doJiraGenerate()
           
 void execute()
          Generate the template
 java.lang.String getArtifactId()
           
 java.lang.String getDevelopmentTeam()
           
 java.lang.String getFinalName()
           
 java.lang.String getGroupId()
           
 java.lang.String getIntroduction()
           
protected  java.util.List getJiraReleases()
           
 Release getLatestRelease(java.util.List releases)
          Get the latest release by matching the supplied releases with the version from the pom.
 java.io.File getOutputDirectory()
           
 java.lang.String getPackaging()
           
protected  Release getRelease(java.util.List releases, java.lang.String version)
           
 java.lang.String getUrl()
           
 java.lang.String getUrlDownload()
           
 org.codehaus.plexus.velocity.VelocityComponent getVelocity()
           
 java.lang.String getVersion()
           
 ChangesXML getXml()
           
 java.io.File getXmlPath()
           
protected  java.util.List mergeReleases(java.util.List changesReleases, java.util.List jiraReleases)
           
 void processTemplate(org.apache.velocity.context.Context context, java.io.File outputDirectory, java.lang.String template)
          Create the velocity template
 void setArtifactId(java.lang.String artifactId)
           
 void setDevelopmentTeam(java.lang.String developmentTeam)
           
 void setFinalName(java.lang.String finalName)
           
 void setGroupId(java.lang.String groupId)
           
 void setIntroduction(java.lang.String introduction)
           
 void setOutputDirectory(java.io.File outputDirectory)
           
 void setPackaging(java.lang.String packaging)
           
 void setUrl(java.lang.String url)
           
 void setUrlDownload(java.lang.String urlDownload)
           
 void setVelocity(org.codehaus.plexus.velocity.VelocityComponent velocity)
           
 void setVersion(java.lang.String version)
           
 void setXml(ChangesXML xml)
           
 void setXmlPath(java.io.File xmlPath)
           
 
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 org.apache.maven.plugin.MojoExecutionException
Generate the template

Throws:
org.apache.maven.plugin.MojoExecutionException

doGenerate

public void doGenerate(java.util.List releases)
                throws org.apache.maven.plugin.MojoExecutionException
Add the parameters to velocity context

Parameters:
releases - A List of Releases
Throws:
org.apache.maven.plugin.MojoExecutionException

doGenerate

protected void doGenerate(java.util.List releases,
                          Release release)
                   throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getLatestRelease

public Release getLatestRelease(java.util.List releases)
                         throws org.apache.maven.plugin.MojoExecutionException
Get the latest release by matching the supplied releases with the version from the pom.

Parameters:
releases - list of releases
Returns:
A Release that matches the next release of the current project
Throws:
org.apache.maven.plugin.MojoExecutionException

getRelease

protected Release getRelease(java.util.List releases,
                             java.lang.String version)

processTemplate

public void processTemplate(org.apache.velocity.context.Context context,
                            java.io.File outputDirectory,
                            java.lang.String template)
                     throws org.apache.velocity.exception.ResourceNotFoundException,
                            org.apache.velocity.exception.VelocityException,
                            org.apache.maven.plugin.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
Throws:
ResourceNotFoundException, - VelocityException, IOException
org.apache.velocity.exception.ResourceNotFoundException
org.apache.velocity.exception.VelocityException
org.apache.maven.plugin.MojoExecutionException

doJiraGenerate

public void doJiraGenerate()
                    throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getJiraReleases

protected java.util.List getJiraReleases()
                                  throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

mergeReleases

protected java.util.List mergeReleases(java.util.List changesReleases,
                                       java.util.List jiraReleases)

getXmlPath

public java.io.File getXmlPath()

setXmlPath

public void setXmlPath(java.io.File xmlPath)

getOutputDirectory

public java.io.File getOutputDirectory()

setOutputDirectory

public void setOutputDirectory(java.io.File outputDirectory)

getGroupId

public java.lang.String getGroupId()

setGroupId

public void setGroupId(java.lang.String groupId)

getArtifactId

public java.lang.String getArtifactId()

setArtifactId

public void setArtifactId(java.lang.String artifactId)

getVersion

public java.lang.String getVersion()

setVersion

public void setVersion(java.lang.String version)

getUrl

public java.lang.String getUrl()

setUrl

public void setUrl(java.lang.String url)

getXml

public ChangesXML getXml()

setXml

public void setXml(ChangesXML xml)

getPackaging

public java.lang.String getPackaging()

setPackaging

public void setPackaging(java.lang.String packaging)

getDevelopmentTeam

public java.lang.String getDevelopmentTeam()

setDevelopmentTeam

public void setDevelopmentTeam(java.lang.String developmentTeam)

getIntroduction

public java.lang.String getIntroduction()

setIntroduction

public void setIntroduction(java.lang.String introduction)

getVelocity

public org.codehaus.plexus.velocity.VelocityComponent getVelocity()

setVelocity

public void setVelocity(org.codehaus.plexus.velocity.VelocityComponent velocity)

getFinalName

public java.lang.String getFinalName()

setFinalName

public void setFinalName(java.lang.String finalName)

getUrlDownload

public java.lang.String getUrlDownload()

setUrlDownload

public void setUrlDownload(java.lang.String urlDownload)


Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.