maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject svn commit: r1302692 - in /maven/release/trunk: maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/ maven-release-plugin/ maven-release-plugin/src/it/projects/prepare/MRELEASE-128/
Date Mon, 19 Mar 2012 22:31:57 GMT
Author: rfscholte
Date: Mon Mar 19 22:31:57 2012
New Revision: 1302692

URL: http://svn.apache.org/viewvc?rev=1302692&view=rev
Log:
Fix MRELEASE-128: SCM properties being replaced for next pom.xml

Modified:
    maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
    maven/release/trunk/maven-release-plugin/pom.xml
    maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-128/pom.xml
    maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-128/verify.groovy

Modified: maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java?rev=1302692&r1=1302691&r2=1302692&view=diff
==============================================================================
--- maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
(original)
+++ maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
Mon Mar 19 22:31:57 2012
@@ -814,17 +814,17 @@ public abstract class AbstractRewritePom
     protected Scm buildScm( MavenProject project )
     {
         IdentifiedScm scm;
-        if( project.getScm() == null )
+        if( project.getOriginalModel().getScm() == null )
         {
             scm = null;
         }
         else
         {
             scm = new IdentifiedScm();
-            scm.setConnection( project.getScm().getConnection() );
-            scm.setDeveloperConnection( project.getScm().getDeveloperConnection() );
-            scm.setTag( project.getScm().getTag() );
-            scm.setUrl( project.getScm().getUrl() );
+            scm.setConnection( project.getOriginalModel().getScm().getConnection() );
+            scm.setDeveloperConnection( project.getOriginalModel().getScm().getDeveloperConnection()
);
+            scm.setTag( project.getOriginalModel().getScm().getTag() );
+            scm.setUrl( project.getOriginalModel().getScm().getUrl() );
             scm.setId( project.getProperties().getProperty( "project.scm.id" ) );
         }
         return scm;

Modified: maven/release/trunk/maven-release-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/pom.xml?rev=1302692&r1=1302691&r2=1302692&view=diff
==============================================================================
--- maven/release/trunk/maven-release-plugin/pom.xml (original)
+++ maven/release/trunk/maven-release-plugin/pom.xml Mon Mar 19 22:31:57 2012
@@ -162,9 +162,6 @@
           <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
           <settingsFile>src/it/settings.xml</settingsFile>
           <debug>true</debug>
-          <pomExcludes>
-            <pomExclude>**/MRELEASE-128/pom.xml</pomExclude> <!-- @todo fix
-->
-          </pomExcludes>
           <properties>
             <allowReleasePluginSnapshot>true</allowReleasePluginSnapshot>
             <dryRun>true</dryRun>

Modified: maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-128/pom.xml
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-128/pom.xml?rev=1302692&r1=1302691&r2=1302692&view=diff
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-128/pom.xml
(original)
+++ maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-128/pom.xml
Mon Mar 19 22:31:57 2012
@@ -29,12 +29,13 @@
   </description>
 
   <scm>
-    <connection>scm:dummy|${scm.custom.path}/nul</connection>
-    <developerConnection>scm:dummy|${scm.custom.path}/nul</developerConnection>
+    <connection>scm:svn:http://${scm.host}/svn/${project.artifactId}/trunk/</connection>
+    <developerConnection>scm:svn:http://${scm.host}/svn/${project.artifactId}/trunk/</developerConnection>
+    <url>http://${scm.host}/viewvc/${project.artifactId}/trunk/</url>
   </scm>
   
   <properties>
-    <scm.custom.path>my/path</scm.custom.path>
+    <scm.host>scmhost.apache.org</scm.host>
   </properties>
 
   <build>
@@ -43,13 +44,6 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-release-plugin</artifactId>
         <version>@project.version@</version>
-        <dependencies>
-          <dependency>
-            <groupId>org.apache.maven.its.release</groupId>
-            <artifactId>maven-scm-provider-dummy</artifactId>
-            <version>1.0</version>
-          </dependency>
-        </dependencies>
       </plugin>
     </plugins>
   </build>

Modified: maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-128/verify.groovy
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-128/verify.groovy?rev=1302692&r1=1302691&r2=1302692&view=diff
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-128/verify.groovy
(original)
+++ maven/release/trunk/maven-release-plugin/src/it/projects/prepare/MRELEASE-128/verify.groovy
Mon Mar 19 22:31:57 2012
@@ -18,13 +18,22 @@
  * under the License.
  */
 
+File pomXml = new File( basedir, 'pom.xml' )
+assert pomXml.exists()
+assert 1 == pomXml.getText().count("<connection>scm:svn:http://\${scm.host}/svn/\${project.artifactId}/trunk/</connection>")
+assert 1 == pomXml.getText().count("<developerConnection>scm:svn:http://\${scm.host}/svn/\${project.artifactId}/trunk/</developerConnection>")
+
 File pomXmlTag = new File( basedir, 'pom.xml.tag' )
 assert pomXmlTag.exists()
-assert 1 == pomXmlTag.getText().count("<connection>scm:dummy|${scm.custom.path}/nul</connection>")
-assert 1 == pomXmlTag.getText().count("<developerConnection>scm:dummy|${scm.custom.path}/nul</developerConnection>")
-
+assert 1 == pomXmlTag.getText().count("<connection>scm:svn:http://\${scm.host}/svn/\${project.artifactId}/tags/mrelease-128-1.0</connection>")
+assert 1 == pomXmlTag.getText().count("<developerConnection>scm:svn:http://\${scm.host}/svn/\${project.artifactId}/tags/mrelease-128-1.0</developerConnection>")
 
 File pomXmlNext = new File( basedir, 'pom.xml.next' )
 assert pomXmlNext.exists()
-assert 1 == pomXmlNext.getText().count("<connection>scm:dummy|${scm.custom.path}/nul</connection>")
-assert 1 == pomXmlNext.getText().count("<developerConnection>scm:dummy|${scm.custom.path}/nul</developerConnection>")
+assert 1 == pomXmlNext.getText().count("<connection>scm:svn:http://\${scm.host}/svn/\${project.artifactId}/trunk/</connection>")
+assert 1 == pomXmlNext.getText().count("<developerConnection>scm:svn:http://\${scm.host}/svn/\${project.artifactId}/trunk/</developerConnection>")
+
+File pomXmlReleaseBackup = new File( basedir, 'pom.xml.releaseBackup' )
+assert pomXmlReleaseBackup.exists()
+assert 1 == pomXmlReleaseBackup.getText().count("<connection>scm:svn:http://\${scm.host}/svn/\${project.artifactId}/trunk/</connection>")
+assert 1 == pomXmlReleaseBackup.getText().count("<developerConnection>scm:svn:http://\${scm.host}/svn/\${project.artifactId}/trunk/</developerConnection>")
\ No newline at end of file



Mime
View raw message