Author: bentmann
Date: Fri Oct 23 18:04:43 2009
New Revision: 829154

URL: http://svn.apache.org/viewvc?rev=829154&view=rev
Log:
[MNG-4401] [regression] central repository is tried before explicitly declared 
repositories during parent POM resolution

o Added IT

Added:
    
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4401RepositoryOrderForParentPomTest.java
   (with props)
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/pom.xml
   (with props)
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-1/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-1/org/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-1/org/apache/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-1/org/apache/maven/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-1/org/apache/maven/its/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-1/org/apache/maven/its/mng4401/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-1/org/apache/maven/its/mng4401/parent/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-1/org/apache/maven/its/mng4401/parent/0.1/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-1/org/apache/maven/its/mng4401/parent/0.1/parent-0.1.pom
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-2/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-2/org/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-2/org/apache/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-2/org/apache/maven/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-2/org/apache/maven/its/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-2/org/apache/maven/its/mng4401/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-2/org/apache/maven/its/mng4401/parent/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-2/org/apache/maven/its/mng4401/parent/0.1/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-2/org/apache/maven/its/mng4401/parent/0.1/parent-0.1.pom
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/settings-template.xml
   (with props)
Modified:
    
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java

Modified: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java?rev=829154&r1=829153&r2=829154&view=diff
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
 Fri Oct 23 18:04:43 2009
@@ -85,6 +85,7 @@
         // suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
         // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- 
MNG-3137
 
+        suite.addTestSuite( 
MavenITmng4401RepositoryOrderForParentPomTest.class );
         suite.addTestSuite( MavenITmng4400RepositoryOrderTest.class );
         suite.addTestSuite( MavenITmng4396AntBasedMojoSupportTest.class );
         suite.addTestSuite( 
MavenITmng4393ParseExternalParenPomLenientTest.class );

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4401RepositoryOrderForParentPomTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4401RepositoryOrderForParentPomTest.java?rev=829154&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4401RepositoryOrderForParentPomTest.java
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4401RepositoryOrderForParentPomTest.java
 Fri Oct 23 18:04:43 2009
@@ -0,0 +1,65 @@
+package org.apache.maven.it;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * This is a test set for <a 
href="http://jira.codehaus.org/browse/MNG-4401";>MNG-4401</a>.
+ * 
+ * @author Benjamin Bentmann
+ */
+public class MavenITmng4401RepositoryOrderForParentPomTest
+    extends AbstractMavenIntegrationTestCase
+{
+
+    public MavenITmng4401RepositoryOrderForParentPomTest()
+    {
+        super( ALL_MAVEN_VERSIONS );
+    }
+
+    /**
+     * Verify that the implicit default repo (central) is tried after 
explicitly declared repos during parent POM
+     * resolution.
+     */
+    public void testit()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), 
"/mng-4401" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "target" );
+        verifier.deleteArtifacts( "org.apache.maven.its.mng4401" );
+        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", 
verifier.newDefaultFilterProperties() );
+        verifier.getCliOptions().add( "-s" );
+        verifier.getCliOptions().add( "settings.xml" );
+        verifier.executeGoal( "validate" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        verifier.assertFilePresent( "target/passed.txt" );
+        verifier.assertFileNotPresent( "target/failed.txt" );
+    }
+
+}

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4401RepositoryOrderForParentPomTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4401RepositoryOrderForParentPomTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/pom.xml?rev=829154&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/pom.xml
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/pom.xml
 Fri Oct 23 18:04:43 2009
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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>org.apache.maven.its.mng4401</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.1</version>
+  </parent>
+
+  <groupId>org.apache.maven.its.mng4401</groupId>
+  <artifactId>test</artifactId>
+  <version>0.1</version>
+  <packaging>jar</packaging>
+
+  <name>Maven Integration Test :: MNG-4401</name>
+  <description>
+    Verify that the implicit default repo (central) is tried after explicitly 
declared repos during parent POM
+    resolution.
+  </description>
+</project>

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-1/org/apache/maven/its/mng4401/parent/0.1/parent-0.1.pom
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-1/org/apache/maven/its/mng4401/parent/0.1/parent-0.1.pom?rev=829154&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-1/org/apache/maven/its/mng4401/parent/0.1/parent-0.1.pom
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-1/org/apache/maven/its/mng4401/parent/0.1/parent-0.1.pom
 Fri Oct 23 18:04:43 2009
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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>org.apache.maven.its.mng4401</groupId>
+  <artifactId>parent</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-4401</name>
+  <description>
+    Verify that the implicit default repo (central) is tried after explicitly 
declared repos during parent POM
+    resolution.
+  </description>
+
+  <distributionManagement>
+    <repository>
+      <id>maven-core-it</id>
+      <url>file:///${basedir}/repo</url>
+    </repository>
+  </distributionManagement>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-log-file</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <configuration>
+          <logFile>target/passed.txt</logFile>
+        </configuration>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>reset</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-2/org/apache/maven/its/mng4401/parent/0.1/parent-0.1.pom
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-2/org/apache/maven/its/mng4401/parent/0.1/parent-0.1.pom?rev=829154&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-2/org/apache/maven/its/mng4401/parent/0.1/parent-0.1.pom
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/repo-2/org/apache/maven/its/mng4401/parent/0.1/parent-0.1.pom
 Fri Oct 23 18:04:43 2009
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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>org.apache.maven.its.mng4401</groupId>
+  <artifactId>parent</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-4401</name>
+  <description>
+    Verify that the implicit default repo (central) is tried after explicitly 
declared repos during parent POM
+    resolution.
+  </description>
+
+  <distributionManagement>
+    <repository>
+      <id>maven-core-it</id>
+      <url>file:///${basedir}/repo</url>
+    </repository>
+  </distributionManagement>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-log-file</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <configuration>
+          <logFile>target/failed.txt</logFile>
+        </configuration>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>reset</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/settings-template.xml
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/settings-template.xml?rev=829154&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/settings-template.xml
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/settings-template.xml
 Fri Oct 23 18:04:43 2009
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+
+<settings>
+  <mirrors>
+    <mirror>
+      <id>central-mirror</id>
+      <mirrorOf>central</mirrorOf>
+      <url>@baseurl@/repo-2</url>
+    </mirror>
+  </mirrors>
+  <profiles>
+    <profile>
+      <id>maven-core-it-repo</id>
+      <repositories>
+        <!-- repo-1 has the right parent POM, repo-2 the unwanted one -->
+        <repository>
+          <id>maven-core-it-1</id>
+          <url>@baseurl@/repo-1</url>
+          <releases>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </repository>
+        <repository>
+          <id>maven-core-it-2</id>
+          <url>@baseurl@/repo-2</url>
+          <releases>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+    </profile>
+  </profiles>
+  <activeProfiles>
+    <activeProfile>maven-core-it-repo</activeProfile>
+  </activeProfiles>
+</settings>

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/settings-template.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4401/settings-template.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision


Reply via email to