You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2006/04/28 04:56:28 UTC

svn commit: r397745 - in /maven/plugins/trunk/maven-release-plugin/src: main/java/org/apache/maven/plugins/release/phase/ test/java/org/apache/maven/plugins/release/phase/ test/resources/projects/rewrite-for-release/internal-differing-snapshot-extensio...

Author: brett
Date: Thu Apr 27 19:56:26 2006
New Revision: 397745

URL: http://svn.apache.org/viewcvs?rev=397745&view=rev
Log:
[MRELEASE-98] extension rewriting

Added:
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/pom.xml   (with props)
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject1/
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject1/pom.xml   (with props)
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject2/
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject2/pom.xml   (with props)
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/expected-pom.xml   (with props)
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/pom.xml   (with props)
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/expected-pom.xml   (with props)
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/pom.xml   (with props)
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/expected-pom.xml   (with props)
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/pom.xml   (with props)
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/expected-pom.xml   (with props)
    maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/pom.xml   (with props)
Modified:
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java
    maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhaseTest.java

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java?rev=397745&r1=397744&r2=397745&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java Thu Apr 27 19:56:26 2006
@@ -18,6 +18,7 @@
 
 import org.apache.maven.artifact.ArtifactUtils;
 import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Extension;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.ReportPlugin;
 import org.apache.maven.plugins.release.ReleaseExecutionException;
@@ -215,7 +216,7 @@
                     }
                 }
             }
-            // TODO: rewrite extensions
+            rewriteExtensions( project.getBuildExtensions(), pluginsRoot, mappedVersions, originalVersions );
         }
 
         if ( project.getReporting() != null )
@@ -232,28 +233,6 @@
 /*
         ProjectScmRewriter scmRewriter = getScmRewriter();
         scmRewriter.rewriteScmInfo( model, projectId, getTagLabel() );
-
-        ProjectVersionResolver versionResolver = getVersionResolver();
-        Build build = model.getBuild();
-
-        if ( build != null )
-        {
-            //Rewrite extensions section
-            List extensions = build.getExtensions();
-
-            for ( Iterator i = extensions.iterator(); i.hasNext(); )
-            {
-                Extension ext = (Extension) i.next();
-
-                String resolvedVersion = versionResolver
-                    .getResolvedVersion( ext.getGroupId(), ext.getArtifactId() );
-
-                if ( resolvedVersion != null )
-                {
-                    ext.setVersion( resolvedVersion );
-                }
-            }
-        }
 */
 
     }
@@ -342,13 +321,12 @@
                         }
                         catch ( JDOMException e )
                         {
-                            throw new ReleaseExecutionException( "Unable to locate plugin to process in document",
-                                                                 e );
+                            throw new ReleaseExecutionException( "Unable to locate plugin to process in document", e );
                         }
                     }
                     else
                     {
-                        // We can ignore dependencies we don't know of, unless they are snapshots
+                        // We can ignore plugins we don't know of, unless they are snapshots
                         if ( ArtifactUtils.isSnapshot( plugin.getVersion() ) )
                         {
                             throw new ReleaseExecutionException(
@@ -360,6 +338,50 @@
         }
     }
 
+    private void rewriteExtensions( List extensions, Element pluginRoot, Map mappedVersions, Map originalVersions )
+        throws ReleaseExecutionException
+    {
+        if ( extensions != null )
+        {
+            for ( Iterator i = extensions.iterator(); i.hasNext(); )
+            {
+                Extension extension = (Extension) i.next();
+
+                String key = ArtifactUtils.versionlessKey( extension.getGroupId(), extension.getArtifactId() );
+                String version = (String) mappedVersions.get( key );
+
+                if ( version != null && extension.getVersion().equals( originalVersions.get( key ) ) )
+                {
+                    getLogger().debug( "Updating " + extension.getArtifactId() + " to " + version );
+
+                    try
+                    {
+                        XPath xpath = XPath.newInstance( "./extensions/extension[groupId='" + extension.getGroupId() +
+                            "' and artifactId='" + extension.getArtifactId() + "']" );
+
+                        Element dependency = (Element) xpath.selectSingleNode( pluginRoot );
+                        Element versionElement = dependency.getChild( "version" );
+
+                        versionElement.setText( version );
+                    }
+                    catch ( JDOMException e )
+                    {
+                        throw new ReleaseExecutionException( "Unable to locate extension to process in document", e );
+                    }
+                }
+                else
+                {
+                    // We can ignore extensions we don't know of, unless they are snapshots
+                    if ( ArtifactUtils.isSnapshot( extension.getVersion() ) )
+                    {
+                        throw new ReleaseExecutionException(
+                            "Version '" + extension.getVersion() + "' for extension '" + key + "' was not mapped" );
+                    }
+                }
+            }
+        }
+    }
+
     private void rewriteReportPlugins( List plugins, Element pluginRoot, Map mappedVersions, Map originalVersions )
         throws ReleaseExecutionException
     {
@@ -395,17 +417,17 @@
                         }
                         catch ( JDOMException e )
                         {
-                            throw new ReleaseExecutionException( "Unable to locate report plugin to process in document",
-                                                                 e );
+                            throw new ReleaseExecutionException(
+                                "Unable to locate report plugin to process in document", e );
                         }
                     }
                     else
                     {
-                        // We can ignore dependencies we don't know of, unless they are snapshots
+                        // We can ignore plugins we don't know of, unless they are snapshots
                         if ( ArtifactUtils.isSnapshot( plugin.getVersion() ) )
                         {
-                            throw new ReleaseExecutionException(
-                                "Version '" + plugin.getVersion() + "' for report plugin '" + key + "' was not mapped" );
+                            throw new ReleaseExecutionException( "Version '" + plugin.getVersion() +
+                                "' for report plugin '" + key + "' was not mapped" );
                         }
                     }
                 }

Modified: maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhaseTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhaseTest.java?rev=397745&r1=397744&r2=397745&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhaseTest.java (original)
+++ maven/plugins/trunk/maven-release-plugin/src/test/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhaseTest.java Thu Apr 27 19:56:26 2006
@@ -421,6 +421,68 @@
         }
     }
 
+    public void testRewritePomExtension()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromProjects( "internal-snapshot-extension" );
+
+        config.mapReleaseVersion( "groupId:subproject1", "1.0" );
+        config.mapReleaseVersion( "groupId:subproject2", "1.0" );
+        config.mapReleaseVersion( "groupId:subproject3", "1.0" );
+        config.mapReleaseVersion( "groupId:subproject4", "1.0" );
+        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
+
+        phase.execute( config );
+
+        assertTrue( compareFiles( config.getReactorProjects() ) );
+    }
+
+    public void testRewritePomUnmappedExtension()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromProjects( "internal-snapshot-extension" );
+
+        MavenProject project =
+            (MavenProject) getProjectsAsMap( config.getReactorProjects() ).get( "groupId:subproject2" );
+        config.setReactorProjects( Collections.singletonList( project ) );
+
+        config.mapReleaseVersion( "groupId:subproject2", "1.0" );
+        config.mapReleaseVersion( "groupId:subproject3", "1.0" );
+        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseExecutionException e )
+        {
+            assertNull( "Check no cause", e.getCause() );
+        }
+    }
+
+    public void testRewritePomExtensionDifferentVersion()
+        throws Exception
+    {
+        ReleaseConfiguration config = createConfigurationFromProjects( "internal-differing-snapshot-extension" );
+
+        config.mapReleaseVersion( "groupId:subproject1", "1.0" );
+        config.mapReleaseVersion( "groupId:subproject2", "1.0" );
+        config.mapReleaseVersion( "groupId:artifactId", "1.0" );
+
+        try
+        {
+            phase.execute( config );
+
+            fail( "Should have thrown an exception" );
+        }
+        catch ( ReleaseExecutionException e )
+        {
+            assertNull( "Check no cause", e.getCause() );
+        }
+    }
+
     public void testRewriteBasicPomWithEditMode()
         throws Exception
     {

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/pom.xml?rev=397745&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/pom.xml Thu Apr 27 19:56:26 2006
@@ -0,0 +1,28 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>groupId</groupId>
+  <artifactId>artifactId</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>subproject1</module>
+    <module>subproject2</module>
+  </modules>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject1/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject1/pom.xml?rev=397745&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject1/pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject1/pom.xml Thu Apr 27 19:56:26 2006
@@ -0,0 +1,26 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>subproject1</artifactId>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject1/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject1/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject2/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject2/pom.xml?rev=397745&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject2/pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject2/pom.xml Thu Apr 27 19:56:26 2006
@@ -0,0 +1,37 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>subproject2</artifactId>
+
+  <build>
+    <extensions>
+      <extension>
+        <groupId>groupId</groupId>
+        <artifactId>subproject1</artifactId>
+        <version>0.5-SNAPSHOT</version>
+      </extension>
+    </extensions>
+  </build>
+
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject2/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-differing-snapshot-extension/subproject2/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/expected-pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/expected-pom.xml?rev=397745&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/expected-pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/expected-pom.xml Thu Apr 27 19:56:26 2006
@@ -0,0 +1,29 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>groupId</groupId>
+  <artifactId>artifactId</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>subproject1</module>
+    <module>subproject2</module>
+    <module>subproject3</module>
+  </modules>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/expected-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/expected-pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/pom.xml?rev=397745&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/pom.xml Thu Apr 27 19:56:26 2006
@@ -0,0 +1,29 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>groupId</groupId>
+  <artifactId>artifactId</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>subproject1</module>
+    <module>subproject2</module>
+    <module>subproject3</module>
+  </modules>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/expected-pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/expected-pom.xml?rev=397745&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/expected-pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/expected-pom.xml Thu Apr 27 19:56:26 2006
@@ -0,0 +1,35 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.0</version>
+  </parent>
+
+  <artifactId>subproject1</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/expected-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/expected-pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/pom.xml?rev=397745&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/pom.xml Thu Apr 27 19:56:26 2006
@@ -0,0 +1,35 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>subproject1</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject1/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/expected-pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/expected-pom.xml?rev=397745&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/expected-pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/expected-pom.xml Thu Apr 27 19:56:26 2006
@@ -0,0 +1,36 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.0</version>
+  </parent>
+
+  <artifactId>subproject2</artifactId>
+
+  <build>
+    <extensions>
+      <extension>
+        <groupId>groupId</groupId>
+        <artifactId>subproject1</artifactId>
+        <version>1.0</version>
+      </extension>
+    </extensions>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/expected-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/expected-pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/pom.xml?rev=397745&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/pom.xml Thu Apr 27 19:56:26 2006
@@ -0,0 +1,36 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>subproject2</artifactId>
+
+  <build>
+    <extensions>
+      <extension>
+        <groupId>groupId</groupId>
+        <artifactId>subproject1</artifactId>
+        <version>1.0-SNAPSHOT</version>
+      </extension>
+    </extensions>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject2/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/expected-pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/expected-pom.xml?rev=397745&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/expected-pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/expected-pom.xml Thu Apr 27 19:56:26 2006
@@ -0,0 +1,42 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.0</version>
+  </parent>
+
+  <artifactId>subproject3</artifactId>
+
+  <build>
+    <extensions>
+      <!-- Test different release version remains the same -->
+      <extension>
+        <groupId>groupId</groupId>
+        <artifactId>subproject1</artifactId>
+        <version>0.5</version>
+      </extension>
+      <extension>
+        <groupId>groupId</groupId>
+        <artifactId>subproject2</artifactId>
+        <version>1.0</version>
+      </extension>
+    </extensions>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/expected-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/expected-pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/pom.xml?rev=397745&view=auto
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/pom.xml (added)
+++ maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/pom.xml Thu Apr 27 19:56:26 2006
@@ -0,0 +1,42 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>groupId</groupId>
+    <artifactId>artifactId</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>subproject3</artifactId>
+
+  <build>
+    <extensions>
+      <!-- Test different release version remains the same -->
+      <extension>
+        <groupId>groupId</groupId>
+        <artifactId>subproject1</artifactId>
+        <version>0.5</version>
+      </extension>
+      <extension>
+        <groupId>groupId</groupId>
+        <artifactId>subproject2</artifactId>
+        <version>1.0-SNAPSHOT</version>
+      </extension>
+    </extensions>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-release-plugin/src/test/resources/projects/rewrite-for-release/internal-snapshot-extension/subproject3/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision