org.apache.maven.plugin.announcement
Class AnnouncementMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.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
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
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 |
AnnouncementMojo
public AnnouncementMojo()
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 Release
s
- 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 valuesoutputDirectory
- directory where the file will be generatedtemplate
- 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.