public abstract class AbstractRewritePomsPhase extends AbstractReleasePhase implements ResourceGenerator
Modifier | Constructor and Description |
---|---|
protected |
AbstractRewritePomsPhase(ScmRepositoryConfigurator scmRepositoryConfigurator,
Map<String,ModelETLFactory> modelETLFactories,
Map<String,ScmTranslator> scmTranslators) |
Modifier and Type | Method and Description |
---|---|
ReleaseResult |
clean(List<org.apache.maven.project.MavenProject> reactorProjects) |
ReleaseResult |
execute(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()
getPomSuffix.
|
protected abstract String |
getResolvedSnapshotVersion(String artifactVersionlessKey,
ReleaseDescriptor releaseDscriptor)
getResolvedSnapshotVersion.
|
protected Map<String,ScmTranslator> |
getScmTranslators()
Getter for the field
scmTranslators . |
static boolean |
isCiFriendlyVersion(String version) |
protected boolean |
isUpdateScm()
isUpdateScm.
|
void |
setModelETL(String modelETL)
Setter for the field
modelETL . |
void |
setStartTime(long startTime)
Setter for the field
startTime . |
ReleaseResult |
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.
|
getLogger, getReleaseResultSuccess, logDebug, logDebug, logError, logInfo, logWarn
protected AbstractRewritePomsPhase(ScmRepositoryConfigurator scmRepositoryConfigurator, Map<String,ModelETLFactory> modelETLFactories, Map<String,ScmTranslator> scmTranslators)
protected final Map<String,ScmTranslator> getScmTranslators()
Getter for the field scmTranslators
.
Map
objectpublic void setModelETL(String modelETL)
Setter for the field modelETL
.
modelETL
- a String
objectpublic void setStartTime(long startTime)
Setter for the field startTime
.
startTime
- a longpublic ReleaseResult execute(ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, List<org.apache.maven.project.MavenProject> reactorProjects) throws ReleaseExecutionException, ReleaseFailureException
execute
in interface ReleasePhase
ReleaseExecutionException
ReleaseFailureException
public ReleaseResult simulate(ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, List<org.apache.maven.project.MavenProject> reactorProjects) throws ReleaseExecutionException, ReleaseFailureException
simulate
in interface ReleasePhase
ReleaseExecutionException
ReleaseFailureException
public ReleaseResult clean(List<org.apache.maven.project.MavenProject> reactorProjects)
clean
in interface ResourceGenerator
public static String extractPropertyFromExpression(String expression)
expression
- the expressionnull
if value is no expression otherwise the property referenced in the expressionpublic static boolean isCiFriendlyVersion(String version)
protected abstract String getResolvedSnapshotVersion(String artifactVersionlessKey, ReleaseDescriptor releaseDscriptor)
getResolvedSnapshotVersion.
artifactVersionlessKey
- a String
objectreleaseDscriptor
- a ReleaseDescriptor
objectString
objectprotected abstract String getOriginalVersion(ReleaseDescriptor releaseDescriptor, String projectKey, boolean simulate)
getOriginalVersion.
releaseDescriptor
- a ReleaseDescriptor
objectprojectKey
- a String
objectsimulate
- a booleanString
objectprotected abstract String getNextVersion(ReleaseDescriptor releaseDescriptor, String key)
getNextVersion.
releaseDescriptor
- a ReleaseDescriptor
objectkey
- a String
objectString
objectprotected 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) throws ReleaseExecutionException
transformScm.
project
- a MavenProject
objectmodelTarget
- a Model
objectreleaseDescriptor
- a ReleaseDescriptor
objectprojectId
- a String
objectscmRepository
- a ScmRepository
objectresult
- a ReleaseResult
objectReleaseExecutionException
- if any.protected boolean isUpdateScm()
isUpdateScm.
true
if the SCM-section should be updated, otherwise false
protected String getOriginalResolvedSnapshotVersion(String artifactVersionlessKey, ReleaseDescriptor releaseDescriptor)
getOriginalResolvedSnapshotVersion.
artifactVersionlessKey
- a String
objectreleaseDescriptor
- a ReleaseDescriptor
objectString
objectprotected static String translateUrlPath(String trunkPath, String tagPath, String urlPath)
trunkPath
- - The trunk urltagPath
- - The tag baseurlPath
- - scm.url or scm.connectionCopyright © 2002–2024 The Apache Software Foundation. All rights reserved.