public abstract class AbstractRedmineMojo extends org.nuiton.plugin.AbstractPlugin implements RedmineServiceConfiguration
| Modifier and Type | Field and Description |
|---|---|
protected String |
apiKey
The redmine's server login apiKey.
|
protected DateFormat |
dateFormat
the date format used to write a date
|
protected String |
encoding
The encoding used to read and write files.
|
protected boolean |
initOk |
protected String |
password
The redmine's server password.
|
protected org.apache.maven.project.MavenProject |
project
Current project.
|
static String |
REDMINE_SYSTEM |
protected boolean |
safe
Flag to fail build if configuration is not ok.
|
protected RedmineService |
service
Redmine service.
|
protected boolean |
serviceInit
flag to mark if service was sucessfull init
|
protected org.apache.maven.execution.MavenSession |
session
Maven session.
|
protected URL |
url
The real basedir redmine url.
|
protected String |
username
The redmine's server login.
|
protected boolean |
verbose
Flag to activate verbose mode.
|
| Constructor and Description |
|---|
AbstractRedmineMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterExecute() |
protected boolean |
checkSkip() |
protected void |
closeService() |
protected abstract void |
doAction()
Re-expose the protected method for test purposes...
|
protected void |
failIfSafe(String message)
Convinient method to throw the given
message
if safe flag is on. |
RedmineClientAuthConfiguration |
getAuthConfiguration() |
String |
getEncoding() |
org.apache.maven.project.MavenProject |
getProject() |
URL |
getUrl() |
protected void |
init() |
boolean |
isVerbose() |
void |
setApiKey(String apiKey) |
void |
setAuthConfiguration(RedmineClientAuthConfiguration authConfiguration) |
void |
setEncoding(String encoding) |
void |
setPassword(String password) |
void |
setProject(org.apache.maven.project.MavenProject project) |
void |
setUrl(URL url) |
void |
setUsername(String username) |
void |
setVerbose(boolean verbose) |
acceptPackaging, 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, setPluginContextpublic static final String REDMINE_SYSTEM
@Parameter(property="redmine.url") protected URL url
@Parameter(property="redmine.apiKey") protected String apiKey
username + password) is mandatory if you
not use a anonymous service.@Parameter(property="redmine.username") protected String username
password) (or apiKey) is mandatory if you
not use a anonymous service.@Parameter(property="redmine.password") protected String password
username) (or apiKey) is mandatory if you
not use a anonymous service.@Parameter(property="redmine.encoding",
defaultValue="${project.build.sourceEncoding}")
protected String encoding
file.encoding.@Parameter(property="redmine.verbose",
defaultValue="${maven.verbose}")
protected boolean verbose
@Parameter(property="redmine.safe",
defaultValue="true")
protected boolean safe
@Parameter(defaultValue="${project}",
readonly=true)
protected org.apache.maven.project.MavenProject project
@Parameter(defaultValue="${session}",
readonly=true)
protected org.apache.maven.execution.MavenSession session
@Component protected RedmineService service
protected DateFormat dateFormat
protected boolean serviceInit
protected boolean initOk
public org.apache.maven.project.MavenProject getProject()
getProject in interface org.nuiton.plugin.Pluginpublic void setProject(org.apache.maven.project.MavenProject project)
setProject in interface org.nuiton.plugin.Pluginpublic boolean isVerbose()
isVerbose in interface RedmineClientConfigurationisVerbose in interface org.nuiton.plugin.Pluginpublic void setVerbose(boolean verbose)
setVerbose in interface RedmineClientConfigurationsetVerbose in interface org.nuiton.plugin.Pluginpublic String getEncoding()
getEncoding in interface RedmineClientConfigurationpublic void setEncoding(String encoding)
setEncoding in interface RedmineClientConfigurationpublic RedmineClientAuthConfiguration getAuthConfiguration()
getAuthConfiguration in interface RedmineClientConfigurationpublic void setAuthConfiguration(RedmineClientAuthConfiguration authConfiguration)
setAuthConfiguration in interface RedmineClientConfigurationpublic URL getUrl()
getUrl in interface RedmineClientConfigurationpublic void setUrl(URL url)
setUrl in interface RedmineClientConfigurationprotected void init()
throws Exception
init in class org.nuiton.plugin.AbstractPluginExceptionprotected boolean checkSkip()
checkSkip in class org.nuiton.plugin.AbstractPluginprotected void afterExecute()
afterExecute in class org.nuiton.plugin.AbstractPluginprotected abstract void doAction()
throws Exception
doAction in class org.nuiton.plugin.AbstractPluginException - if any problemspublic void setApiKey(String apiKey)
public void setUsername(String username)
public void setPassword(String password)
protected void closeService()
protected void failIfSafe(String message) throws org.apache.maven.plugin.MojoExecutionException
message
if safe flag is on.message - message to throw if safe mode is onorg.apache.maven.plugin.MojoExecutionException - the error thrown if safe flag is onCopyright © 2009–2015 CodeLutin. All rights reserved.