Class AnnouncementMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.changes.AbstractChangesMojo
org.apache.maven.plugins.changes.announcement.AbstractAnnouncementMojo
org.apache.maven.plugins.changes.announcement.AnnouncementMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="announcement-generate",
threadSafe=true)
public class AnnouncementMojo
extends AbstractAnnouncementMojo
Goal which generates an announcement from the announcement template.
- Since:
- 2.0-beta-2
- Version:
- $Id$
- Author:
- aramirez@exist.com
-
Field Summary
Fields inherited from class org.apache.maven.plugins.changes.announcement.AbstractAnnouncementMojo
runOnlyAtExecutionRoot
Fields inherited from class org.apache.maven.plugins.changes.AbstractChangesMojo
basedir, mavenSession
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
ConstructorDescriptionAnnouncementMojo
(org.codehaus.plexus.velocity.VelocityComponent velocity, org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter) -
Method Summary
Modifier and TypeMethodDescriptionvoid
doGenerate
(List<Release> releases) Add the parameters to velocity contextprotected void
doGenerate
(List<Release> releases, Release release) void
execute()
Generate the templategetUrl()
getXml()
void
processTemplate
(org.apache.velocity.context.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
void
setUrlDownload
(String urlDownload) void
setVersion
(String version) void
setXml
(ChangesXML xml) void
setXmlPath
(File xmlPath) Methods inherited from class org.apache.maven.plugins.changes.AbstractChangesMojo
isThisTheExecutionRoot
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
AnnouncementMojo
@Inject public AnnouncementMojo(org.codehaus.plexus.velocity.VelocityComponent velocity, org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter)
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionExceptionGenerate the template- Throws:
org.apache.maven.plugin.MojoExecutionException
- in case of errors
-
doGenerate
public void doGenerate(List<Release> releases) throws org.apache.maven.plugin.MojoExecutionException Add the parameters to velocity context- Parameters:
releases
- AList
ofRelease
s- Throws:
org.apache.maven.plugin.MojoExecutionException
- in case of errors
-
doGenerate
protected void doGenerate(List<Release> releases, Release release) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
processTemplate
public void processTemplate(org.apache.velocity.context.Context context, File outputDirectory, String template, String announcementFile) throws 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 mergedannouncementFile
- the file name of the generated announcement- Throws:
org.apache.velocity.exception.VelocityException
- in case of error processing the Velocty templateorg.apache.maven.plugin.MojoExecutionException
- in case of errors
-
getJiraReleases
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getTracReleases
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getGitHubReleases
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getArtifactId
-
setArtifactId
-
getDevelopmentTeam
-
setDevelopmentTeam
-
getFinalName
-
setFinalName
-
getGroupId
-
setGroupId
-
getIntroduction
-
setIntroduction
-
setIssueTypes
-
getIssueTypes
-
getAnnouncementDirectory
-
setAnnouncementDirectory
-
getPackaging
-
setPackaging
-
getUrl
-
setUrl
-
getUrlDownload
-
setUrlDownload
-
getVersion
-
setVersion
-
getXml
-
setXml
-
getXmlPath
-
setXmlPath
-