Class AbstractRewritePomsPhase
java.lang.Object
org.apache.maven.shared.release.phase.AbstractReleasePhase
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase
- All Implemented Interfaces:
ReleasePhase
,ResourceGenerator
- Direct Known Subclasses:
RewritePomsForBranchPhase
,RewritePomsForDevelopmentPhase
,RewritePomsForReleasePhase
,RewritePomVersionsPhase
public abstract class AbstractRewritePomsPhase
extends AbstractReleasePhase
implements ResourceGenerator
Base class for rewriting phases.
- Author:
- Brett Porter
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractRewritePomsPhase
(ScmRepositoryConfigurator scmRepositoryConfigurator, Map<String, ModelETLFactory> modelETLFactories, Map<String, ScmTranslator> scmTranslators) -
Method Summary
Modifier and TypeMethodDescriptionexecute
(ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, List<org.apache.maven.project.MavenProject> reactorProjects) static String
extractPropertyFromExpression
(String expression) Extracts the Maven property name from a given expression.protected abstract String
getNextVersion
(ReleaseDescriptor releaseDescriptor, String key) getNextVersion.protected String
getOriginalResolvedSnapshotVersion
(String artifactVersionlessKey, ReleaseDescriptor releaseDescriptor) getOriginalResolvedSnapshotVersion.protected abstract String
getOriginalVersion
(ReleaseDescriptor releaseDescriptor, String projectKey, boolean simulate) getOriginalVersion.protected abstract String
getPomSuffix.protected abstract String
getResolvedSnapshotVersion
(String artifactVersionlessKey, ReleaseDescriptor releaseDscriptor) getResolvedSnapshotVersion.protected final Map<String,
ScmTranslator> Getter for the fieldscmTranslators
.static boolean
isCiFriendlyVersion
(String version) protected boolean
isUpdateScm.void
setModelETL
(String modelETL) Setter for the fieldmodelETL
.void
setStartTime
(long startTime) Setter for the fieldstartTime
.simulate
(ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, List<org.apache.maven.project.MavenProject> reactorProjects) protected abstract void
transformScm
(org.apache.maven.project.MavenProject project, org.apache.maven.model.Model modelTarget, ReleaseDescriptor releaseDescriptor, String projectId, org.apache.maven.scm.repository.ScmRepository scmRepository, ReleaseResult result) transformScm.protected static String
translateUrlPath
(String trunkPath, String tagPath, String urlPath) Determines the relative path from trunk to tag, and adds this relative path to the url.Methods inherited from class org.apache.maven.shared.release.phase.AbstractReleasePhase
getLogger, getReleaseResultSuccess, logDebug, logDebug, logError, logInfo, logWarn
-
Constructor Details
-
Method Details
-
getScmTranslators
Getter for the field
scmTranslators
.- Returns:
- a
Map
object
-
setModelETL
Setter for the field
modelETL
.- Parameters:
modelETL
- aString
object
-
setStartTime
public void setStartTime(long startTime) Setter for the field
startTime
.- Parameters:
startTime
- a long
-
getPomSuffix
getPomSuffix.
- Returns:
- a
String
object
-
clean
- Specified by:
clean
in interfaceResourceGenerator
-
extractPropertyFromExpression
Extracts the Maven property name from a given expression.- Parameters:
expression
- the expression- Returns:
- either
null
if value is no expression otherwise the property referenced in the expression
-
isCiFriendlyVersion
-
isUpdateScm
protected boolean isUpdateScm()isUpdateScm.
- Returns:
true
if the SCM-section should be updated, otherwisefalse
- Since:
- 2.4
-
translateUrlPath
Determines the relative path from trunk to tag, and adds this relative path to the url.- Parameters:
trunkPath
- - The trunk urltagPath
- - The tag baseurlPath
- - scm.url or scm.connection- Returns:
- The url path for the tag.
-