Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

MRELEASE-699 release:update-versions should support -DreleaseVersion too #2

Open
wants to merge 1 commit into from

1 participant

@ge0ffrey

MRELEASE-699 release:update-versions should support -DreleaseVersion too (not only -DdevelopmentVersion), so it also supports not suffixing the version with -SNAPSHOT

http://jira.codehaus.org/browse/MRELEASE-699

@ge0ffrey ge0ffrey MRELEASE-699 release:update-versions should support -DreleaseVersion …
…too (not only -DdevelopmentVersion), so it also supports not suffixing the version with -SNAPSHOT
7e9f222
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 3, 2011
  1. @ge0ffrey

    MRELEASE-699 release:update-versions should support -DreleaseVersion …

    ge0ffrey authored
    …too (not only -DdevelopmentVersion), so it also supports not suffixing the version with -SNAPSHOT
This page is out of date. Refresh to see the latest.
View
1  maven-release-manager/src/main/components-fragment.xml
@@ -84,6 +84,7 @@
<updateVersionsPhases>
<phase>check-poms</phase>
<phase>create-backup-poms</phase>
+ <phase>map-release-versions</phase>
<phase>map-development-versions</phase>
<phase>rewrite-pom-versions</phase>
</updateVersionsPhases>
View
8 ...-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomVersionsPhase.java
@@ -50,12 +50,16 @@ protected void transformScm( MavenProject project, Element rootElement, Namespac
protected Map getOriginalVersionMap( ReleaseDescriptor releaseDescriptor, List<MavenProject> reactorProjects,
boolean simulate )
{
- return releaseDescriptor.getReleaseVersions();
+ return releaseDescriptor.getOriginalVersions( reactorProjects );
}
protected Map getNextVersionMap( ReleaseDescriptor releaseDescriptor )
{
- return releaseDescriptor.getDevelopmentVersions();
+ if (releaseDescriptor.getDefaultReleaseVersion() != null) {
+ return releaseDescriptor.getReleaseVersions();
+ } else {
+ return releaseDescriptor.getDevelopmentVersions();
+ }
}
protected String getResolvedSnapshotVersion( String artifactVersionlessKey, Map resolvedSnapshotsMap )
View
9 maven-release-plugin/src/main/java/org/apache/maven/plugins/release/UpdateVersionsMojo.java
@@ -72,6 +72,14 @@
private String developmentVersion;
/**
+ * Default version to use when preparing a release or a branch.
+ *
+ * @parameter expression="${releaseVersion}"
+ * @since 2.0-beta-8
+ */
+ private String releaseVersion;
+
+ /**
* @parameter expression="${session}"
* @readonly
* @required
@@ -91,6 +99,7 @@ public void execute()
config.setAddSchema( addSchema );
config.setAutoVersionSubmodules( autoVersionSubmodules );
config.setDefaultDevelopmentVersion( developmentVersion );
+ config.setDefaultReleaseVersion( releaseVersion );
Map originalScmInfo = new HashMap();
originalScmInfo.put( ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() ), project.getScm() );
Something went wrong with that request. Please try again.