You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2009/03/06 10:41:48 UTC

svn commit: r750820 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-2865/central/ resources/mng-2865/external/ resources/mng-2865/file/ resources/mng-2865/localhost/ resources/mng-2865/test-1/s...

Author: bentmann
Date: Fri Mar  6 09:41:45 2009
New Revision: 750820

URL: http://svn.apache.org/viewvc?rev=750820&view=rev
Log:
o Moved repository declarations to settings

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/central/
      - copied from r750816, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/test-4/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/external/
      - copied from r750813, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/test-1/sub-c/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/external/settings-template.xml   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/file/
      - copied from r750813, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/test-1/sub-a/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/file/settings-template.xml   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/localhost/
      - copied from r750813, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/test-1/sub-b/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/localhost/settings-template.xml   (with props)
Removed:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/test-1/sub-a/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/test-1/sub-b/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/test-1/sub-c/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/test-4/
Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2865MirrorWildcardTest.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/external/pom.xml
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/file/pom.xml
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/localhost/pom.xml

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2865MirrorWildcardTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2865MirrorWildcardTest.java?rev=750820&r1=750819&r2=750820&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2865MirrorWildcardTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2865MirrorWildcardTest.java Fri Mar  6 09:41:45 2009
@@ -41,27 +41,30 @@
     }
 
     /**
-     * Test that the mirror wildcard * matches any repo, in particular local/file repos.
+     * Test that the mirror wildcard * matches any repo, in particular file:// repos.
      */
-    public void testitUserRepos()
+    public void testitFileRepo()
         throws Exception
     {
-        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2865/test-1" );
+        testit( "file" );
+    }
 
-        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.setAutoclean( false );
-        verifier.deleteArtifacts( "org.apache.maven.its.mng2865" );
-        Properties filterProps = verifier.newDefaultFilterProperties();
-        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", filterProps );
-        verifier.getCliOptions().add( "--settings" );
-        verifier.getCliOptions().add( "settings.xml" );
-        verifier.executeGoal( "validate" );
-        verifier.verifyErrorFreeLog();
-        verifier.resetStreams();
+    /**
+     * Test that the mirror wildcard * matches any repo, in particular http://localhost repos.
+     */
+    public void testitLocalhostRepo()
+        throws Exception
+    {
+        testit( "localhost" );
+    }
 
-        verifier.assertArtifactPresent( "org.apache.maven.its.mng2865", "a", "0.1", "jar" );
-        verifier.assertArtifactPresent( "org.apache.maven.its.mng2865", "b", "0.1", "jar" );
-        verifier.assertArtifactPresent( "org.apache.maven.its.mng2865", "c", "0.1", "jar" );
+    /**
+     * Test that the mirror wildcard * matches any repo, in particular external repos.
+     */
+    public void testitExternalRepo()
+        throws Exception
+    {
+        testit( "external" );
     }
 
     /**
@@ -70,9 +73,15 @@
     public void testitCentralRepo()
         throws Exception
     {
-        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2865/test-4" );
+        testit( "central" );
+    }
+
+    private void testit( String project )
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2865" );
 
-        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        Verifier verifier = new Verifier( new File( testDir, project ).getAbsolutePath() );
         verifier.setAutoclean( false );
         verifier.deleteArtifacts( "org.apache.maven.its.mng2865" );
         Properties filterProps = verifier.newDefaultFilterProperties();

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/external/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/external/pom.xml?rev=750820&r1=750813&r2=750820&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/external/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/external/pom.xml Fri Mar  6 09:41:45 2009
@@ -34,24 +34,11 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.maven.its.mng2865</groupId>
-      <artifactId>c</artifactId>
+      <artifactId>a</artifactId>
       <version>0.1</version>
     </dependency>
   </dependencies>
 
-  <repositories>
-    <repository>
-      <id>maven-core-it-ext</id>
-      <url>http://maven.apache.org/null</url>
-      <releases>
-        <checksumPolicy>ignore</checksumPolicy>
-      </releases>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-
   <build>
     <plugins>
       <plugin>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/external/settings-template.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/external/settings-template.xml?rev=750820&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/external/settings-template.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/external/settings-template.xml Fri Mar  6 09:41:45 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>
+  <profiles>
+    <profile>
+      <id>maven-core-it-repo</id>
+      <repositories>
+        <repository>
+          <id>maven-core-it-ext</id>
+          <url>http://maven.apache.org/null</url>
+          <releases>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+    </profile>
+  </profiles>
+  <activeProfiles>
+    <activeProfile>maven-core-it-repo</activeProfile>
+  </activeProfiles>
+
+  <mirrors>
+    <!--
+    NOTE: The tests are designed to detect mirror failures by artifact resolution failures. Since each project knows
+    central via the super POM, we need to make sure the test-mirror does not match central so that fallback lookups
+    from central fail, too.
+    -->
+    <mirror>
+      <id>central-mirror</id>
+      <url>@baseurl@/null</url>
+      <mirrorOf>central</mirrorOf>
+    </mirror>
+    <mirror>
+      <id>test-mirror</id>
+      <url>@baseurl@/../repo</url>
+      <mirrorOf>*</mirrorOf>
+    </mirror>
+  </mirrors>
+</settings>

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

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

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/file/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/file/pom.xml?rev=750820&r1=750813&r2=750820&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/file/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/file/pom.xml Fri Mar  6 09:41:45 2009
@@ -39,19 +39,6 @@
     </dependency>
   </dependencies>
 
-  <repositories>
-    <repository>
-      <id>maven-core-it-file</id>
-      <url>file:///null</url>
-      <releases>
-        <checksumPolicy>ignore</checksumPolicy>
-      </releases>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-
   <build>
     <plugins>
       <plugin>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/file/settings-template.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/file/settings-template.xml?rev=750820&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/file/settings-template.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/file/settings-template.xml Fri Mar  6 09:41:45 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>
+  <profiles>
+    <profile>
+      <id>maven-core-it-repo</id>
+      <repositories>
+        <repository>
+          <id>maven-core-it-file</id>
+          <url>file:///null</url>
+          <releases>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+    </profile>
+  </profiles>
+  <activeProfiles>
+    <activeProfile>maven-core-it-repo</activeProfile>
+  </activeProfiles>
+
+  <mirrors>
+    <!--
+    NOTE: The tests are designed to detect mirror failures by artifact resolution failures. Since each project knows
+    central via the super POM, we need to make sure the test-mirror does not match central so that fallback lookups
+    from central fail, too.
+    -->
+    <mirror>
+      <id>central-mirror</id>
+      <url>@baseurl@/null</url>
+      <mirrorOf>central</mirrorOf>
+    </mirror>
+    <mirror>
+      <id>test-mirror</id>
+      <url>@baseurl@/../repo</url>
+      <mirrorOf>*</mirrorOf>
+    </mirror>
+  </mirrors>
+</settings>

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

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

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/localhost/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/localhost/pom.xml?rev=750820&r1=750813&r2=750820&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/localhost/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/localhost/pom.xml Fri Mar  6 09:41:45 2009
@@ -34,24 +34,11 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.maven.its.mng2865</groupId>
-      <artifactId>b</artifactId>
+      <artifactId>a</artifactId>
       <version>0.1</version>
     </dependency>
   </dependencies>
 
-  <repositories>
-    <repository>
-      <id>maven-core-it-localhost</id>
-      <url>http://localhost/null</url>
-      <releases>
-        <checksumPolicy>ignore</checksumPolicy>
-      </releases>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-
   <build>
     <plugins>
       <plugin>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/localhost/settings-template.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/localhost/settings-template.xml?rev=750820&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/localhost/settings-template.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2865/localhost/settings-template.xml Fri Mar  6 09:41:45 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>
+  <profiles>
+    <profile>
+      <id>maven-core-it-repo</id>
+      <repositories>
+        <repository>
+          <id>maven-core-it-localhost</id>
+          <url>http://localhost/null</url>
+          <releases>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+    </profile>
+  </profiles>
+  <activeProfiles>
+    <activeProfile>maven-core-it-repo</activeProfile>
+  </activeProfiles>
+
+  <mirrors>
+    <!--
+    NOTE: The tests are designed to detect mirror failures by artifact resolution failures. Since each project knows
+    central via the super POM, we need to make sure the test-mirror does not match central so that fallback lookups
+    from central fail, too.
+    -->
+    <mirror>
+      <id>central-mirror</id>
+      <url>@baseurl@/null</url>
+      <mirrorOf>central</mirrorOf>
+    </mirror>
+    <mirror>
+      <id>test-mirror</id>
+      <url>@baseurl@/../repo</url>
+      <mirrorOf>*</mirrorOf>
+    </mirror>
+  </mirrors>
+</settings>

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

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