public abstract class AbstractMavenReleaseMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ARTIFACT |
protected static String |
ARTIFACT_XML
String constants
|
protected static String |
ARTIFACT_XML_REGEX |
protected static String |
ARTIFACT_XML_TMP_FILE |
protected static String |
EMPTY_STRING |
protected static String |
GOAL_CHECK_IN |
protected org.apache.maven.plugin.logging.Log |
log
Logger for mojo.
|
protected static String |
MAVEN_PLUGINS_GROUP
maven scm plugin meta data
|
protected static String |
MAVEN_SCM_PLUGIN |
protected org.apache.maven.project.MavenProject |
mavenProject
The project currently being build.
|
protected org.apache.maven.execution.MavenSession |
mavenSession
The current Mjava.lang.Stringaven session.
|
protected static String |
PARAM_INCLUDES |
protected static String |
PARAM_PASSWORD |
protected static String |
PARAM_USERNAME |
protected static String |
PARAMETER_BASEDIR
maven scm plugin params
|
protected static String |
PARAMETER_MESSAGE |
protected org.apache.maven.plugin.BuildPluginManager |
pluginManager
The Maven BuildPluginManager component.
|
protected static String |
POM_XML |
protected static String |
PROJECT_PREFIX |
protected static String |
PROP_SCM_PASSWORD |
protected static String |
PROP_SCM_TAG
release plugin scm properties
|
protected static String |
PROP_SCM_USERNAME |
protected static String |
RELEASE_PROPERTIES |
protected Properties |
releaseProperties
Properties loaded from release.properties file.
|
protected static String |
SCM_PLUGIN_VERSION |
protected static String |
VERSION |
protected static String |
WSO2_RELEASE_PLUGIN_PREFIX |
| Constructor and Description |
|---|
AbstractMavenReleaseMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
protected abstract String |
getCommitMessage(Properties releaseProperties)
Method to get the customised commit message for each goal.
|
protected abstract String |
getDryRunFilePrefix()
Method to retrieve the file prefix to be used in dryRunMode of current goal.
|
protected abstract String |
getGoal()
Method to indicate current goal.
|
protected org.apache.maven.project.MavenProject |
getMavenProject(File pomFile)
Method to instantiate a Maven project model from a pom file.
|
protected abstract String |
getNewVersion(File artifactXml)
Method to get the new version for the artifacts.
|
protected org.twdata.maven.mojoexecutor.MojoExecutor.Element[] |
getScmPluginProperties(File parentProjectBaseDir)
Method to generate configuration for maven scm plugin.
|
protected boolean |
isInDryRunMode()
Method to check whether release plugin is running in dryRunMode.
|
protected void |
updateArtifactVersions(File artifactXml,
String newVersion)
Update versions in the given artifact.xml file of a ESB/DSS project.
|
protected static final String ARTIFACT_XML
protected static final String ARTIFACT_XML_REGEX
protected static final String EMPTY_STRING
protected static final String POM_XML
protected static final String PROJECT_PREFIX
protected static final String ARTIFACT_XML_TMP_FILE
protected static final String RELEASE_PROPERTIES
protected static final String WSO2_RELEASE_PLUGIN_PREFIX
protected static final String ARTIFACT
protected static final String VERSION
protected static final String MAVEN_PLUGINS_GROUP
protected static final String MAVEN_SCM_PLUGIN
protected static final String SCM_PLUGIN_VERSION
protected static final String GOAL_CHECK_IN
protected static final String PARAMETER_BASEDIR
protected static final String PARAMETER_MESSAGE
protected static final String PARAM_INCLUDES
protected static final String PARAM_USERNAME
protected static final String PARAM_PASSWORD
protected static final String PROP_SCM_TAG
protected static final String PROP_SCM_USERNAME
protected static final String PROP_SCM_PASSWORD
protected org.apache.maven.project.MavenProject mavenProject
protected org.apache.maven.execution.MavenSession mavenSession
protected org.apache.maven.plugin.BuildPluginManager pluginManager
protected Properties releaseProperties
protected final org.apache.maven.plugin.logging.Log log
protected abstract String getGoal()
protected abstract String getDryRunFilePrefix()
protected abstract String getCommitMessage(Properties releaseProperties)
releaseProperties - Properties generated by maven release plugin.protected abstract String getNewVersion(File artifactXml) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
artifactXml - artifact.xml file of the project.IOExceptionorg.codehaus.plexus.util.xml.pull.XmlPullParserExceptionpublic void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected void updateArtifactVersions(File artifactXml, String newVersion) throws Exception
artifactXml - artifact.xml file of a ESB/DSS project.newVersion - new version to which, the artifacts should be updated.Exceptionprotected boolean isInDryRunMode()
protected org.twdata.maven.mojoexecutor.MojoExecutor.Element[] getScmPluginProperties(File parentProjectBaseDir)
parentProjectBaseDir - root of the repository.protected org.apache.maven.project.MavenProject getMavenProject(File pomFile) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
pomFile - Path to pom file.IOExceptionorg.codehaus.plexus.util.xml.pull.XmlPullParserExceptionCopyright © 2020 WSO2. All rights reserved.