public abstract class AbstractAnnouncementMojo extends AbstractRedmineMojoWithProjectAndVersion implements AnnouncementGeneratorConfiguration, SkipOrRunOnlyOnceAware
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
announceParameters
Map which will be pass to the velocity context
|
protected String |
artifactId
current project artifactId.
|
protected File |
artifactsFile
Files where are stored location of artifacts to deploy by the build.
|
protected Map<File,String> |
artifactUrls |
protected String |
attachmentLinkTemplate
Template strings per system that is used to discover the URL to use to display an attchment.
|
protected Attachment[] |
attachments |
protected Map<Attachment,String> |
attachmentUrls |
protected String |
basedir
The current project base directory.
|
protected String |
deploymentUrl
Deployement url (for artifacts).
|
protected String |
developmentTeam
Name of the team that develops the artifact.
|
protected String |
finalName
The name of the artifact to be used in the announcement.
|
protected AnnouncementGenerator |
generator |
protected String |
groupId
Current maven project groupId.
|
protected String |
introduction
Short description or introduction of the released artifact.
|
protected String |
packaging
Packaging structure for the artifact.
|
protected String |
projectUrl
Distribution url of the artifact.
|
protected List<?> |
releases |
protected boolean |
runOnce
A flag to restrict only one run in a build (for multi-module context).
|
protected boolean |
runOnceDone
flag to mark if a runOnce goal was done
|
protected boolean |
runOnlyOnRoot
A flag to restrict only to run on root module.
|
protected String |
templateDirectory
Directory that contains the template.
|
protected String |
templateEncoding
The template encoding.
|
protected File |
templateOutputDirectory
Directory where the template file will be generated.
|
protected String |
urlDownload
URL where the artifact can be downloaded.
|
protected org.codehaus.plexus.velocity.VelocityComponent |
velocity
Velocity Component.
|
protected File |
xmlPath
The path of the changes.xml file.
|
releaseVersion, versionIdprojectId, releaseProject, releaseUser, usersapiKey, dateFormat, encoding, initOk, password, project, REDMINE_SYSTEM, safe, service, serviceInit, session, url, username, verbose| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAnnouncementMojo() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkRunOnceDone() |
protected void |
doAction()
Re-expose the protected method for test purposes...
|
protected abstract String |
getAnnouncementTemplate() |
Map<String,Object> |
getAnnounceParameters() |
String |
getArtifactId() |
Map<File,String> |
getArtifactUrls() |
String |
getAttachmentLinkTemplate() |
Map<Attachment,String> |
getAttachmentUrls() |
String |
getBasedir() |
String |
getDeploymentUrl() |
String |
getDevelopmentTeam() |
String |
getFinalName() |
String |
getGroupId() |
String |
getIntroduction() |
protected File |
getOutputFile() |
String |
getPackaging() |
String |
getProjectUrl() |
String |
getUrlDownload() |
protected void |
init() |
boolean |
isRunOnce() |
boolean |
isRunOnceDone() |
boolean |
isRunOnlyOnRoot() |
checkSkip, getProjectVersion, getProjectVersions, getVersionId, initReleaseVersion, setVersionIdgetProjectId, initReleaseProject, initReleaseUser, setProjectIdafterExecute, closeService, failIfSafe, getAuthConfiguration, getEncoding, getProject, getUrl, isVerbose, setApiKey, setAuthConfiguration, setEncoding, setPassword, setProject, setUrl, setUsername, setVerboseacceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, backupFile, checkEncoding, checkPackaging, checkResource, checkRunOnceDone, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, needInvoke, needInvoke, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFilegetLog, getPluginContext, setLog, setPluginContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLog, getProject, getUrl, getVersionIdgetSkipProperty, isGoalSkip@Parameter(property="redmine.templateOutputDirectory",
defaultValue="${project.build.directory}/generated-sources/announcement",
required=true)
protected File templateOutputDirectory
@Parameter(property="redmine.xmlPath",
defaultValue="${basedir}/src/changes/changes.xml",
required=true)
protected File xmlPath
@Parameter(property="redmine.templateDirectory",
defaultValue="org/nuiton/jredmine/plugin/announcement",
required=true)
protected String templateDirectory
Note: This directory must be a subdirectory of
/src/main/resources/ or current project base directory.
@Parameter(property="redmine.templateEncoding",
defaultValue="${project.build.sourceEncoding}")
protected String templateEncoding
@Parameter protected Map<String,Object> announceParameters
@Parameter(property="redmine.attachmentLinkTemplate",
defaultValue="%URL%/attachments/download/%FILE%")
protected String attachmentLinkTemplate
There are 2 template tokens you can use. %URL%: this is computed by getting the
<issueManagement>/<url> value from the POM, and removing the last '/'
and everything that comes after it. %FILE%: this is the issue number.
@Parameter(property="session.topLevelProject.groupId",
readonly=true)
protected String groupId
@Parameter(property="session.topLevelProject.artifactId",
readonly=true)
protected String artifactId
@Parameter(property="redmine.projectUrl",
defaultValue="${session.topLevelProject.url}",
required=true)
protected String projectUrl
@Parameter(property="project.packaging",
readonly=true)
protected String packaging
@Parameter(property="redmine.finalName",
defaultValue="${session.topLevelProject.build.finalName}",
required=true)
protected String finalName
@Parameter(property="basedir",
required=true)
protected String basedir
@Parameter protected String urlDownload
@Parameter(property="redmine.developmentTeam",
defaultValue="${session.topLevelProject.name} team",
required=true)
protected String developmentTeam
@Parameter(property="redmine.introduction",
defaultValue="${session.topLevelProject.description}")
protected String introduction
@Parameter(property="redmine.runOnce",
defaultValue="true")
protected boolean runOnce
@Parameter(property="redmine.runOnlyOnRoot",
defaultValue="true")
protected boolean runOnlyOnRoot
@Parameter(property="redmine.artifactsFile") protected File artifactsFile
@Parameter(property="redmine.deploymentUrl",
readonly=true)
protected String deploymentUrl
@Component(hint="jredmine-maven-plugin") protected org.codehaus.plexus.velocity.VelocityComponent velocity
protected Attachment[] attachments
protected Map<Attachment,String> attachmentUrls
protected List<?> releases
protected AnnouncementGenerator generator
protected boolean runOnceDone
protected abstract String getAnnouncementTemplate()
public String getAttachmentLinkTemplate()
getAttachmentLinkTemplate in interface AnnouncementGeneratorConfigurationpublic String getArtifactId()
getArtifactId in interface AnnouncementGeneratorConfigurationpublic Map<File,String> getArtifactUrls()
getArtifactUrls in interface AnnouncementGeneratorConfigurationpublic Map<Attachment,String> getAttachmentUrls()
getAttachmentUrls in interface AnnouncementGeneratorConfigurationpublic String getBasedir()
getBasedir in interface AnnouncementGeneratorConfigurationpublic String getDeploymentUrl()
getDeploymentUrl in interface AnnouncementGeneratorConfigurationpublic String getDevelopmentTeam()
getDevelopmentTeam in interface AnnouncementGeneratorConfigurationpublic String getFinalName()
getFinalName in interface AnnouncementGeneratorConfigurationpublic String getGroupId()
getGroupId in interface AnnouncementGeneratorConfigurationpublic String getIntroduction()
getIntroduction in interface AnnouncementGeneratorConfigurationpublic String getPackaging()
getPackaging in interface AnnouncementGeneratorConfigurationpublic String getProjectUrl()
getProjectUrl in interface AnnouncementGeneratorConfigurationpublic String getUrlDownload()
getUrlDownload in interface AnnouncementGeneratorConfigurationpublic Map<String,Object> getAnnounceParameters()
getAnnounceParameters in interface AnnouncementGeneratorConfigurationpublic boolean isRunOnce()
isRunOnce in interface SkipOrRunOnlyOnceAwarepublic boolean isRunOnlyOnRoot()
isRunOnlyOnRoot in interface SkipOrRunOnlyOnceAwarepublic boolean isRunOnceDone()
isRunOnceDone in interface SkipOrRunOnlyOnceAwarepublic boolean checkRunOnceDone()
checkRunOnceDone in interface SkipOrRunOnlyOnceAwareprotected void init()
throws Exception
init in class AbstractRedmineMojoWithProjectAndVersionExceptionprotected void doAction()
throws Exception
AbstractRedmineMojodoAction in class AbstractRedmineMojoException - if any problemsprotected File getOutputFile()
Copyright © 2009–2014 CodeLutin. All rights reserved.