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/01/03 15:59:47 UTC

svn commit: r731002 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/it0113/ resources/it0113/maven-it0113-plugin/ resources/it0113/test-project/

Author: bentmann
Date: Sat Jan  3 06:59:47 2009
New Revision: 731002

URL: http://svn.apache.org/viewvc?rev=731002&view=rev
Log:
o Migrated it0113 to use ready-made IT support plugin

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/pom.xml
      - copied, changed from r730978, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/test-project/pom.xml
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/settings.xml
      - copied, changed from r730437, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/test-project/settings.xml
Removed:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/maven-it0113-plugin/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/test-project/
Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest.java

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest.java?rev=731002&r1=731001&r2=731002&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest.java Sat Jan  3 06:59:47 2009
@@ -25,35 +25,35 @@
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Properties;
 
 public class MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest
     extends AbstractMavenIntegrationTestCase
 {
+
+    /**
+     * Test that the auth infos given in the settings.xml are pushed into the wagon manager and are available
+     * to other components/plugins.
+     */
     public void testit0113()
         throws Exception
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0113" );
 
-        Verifier verifier;
-
-        // Install the plugin to test for Authz info in the WagonManager
-        verifier = new Verifier( new File( testDir, "maven-it0113-plugin" ).getAbsolutePath() );
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
         verifier.setAutoclean( false );
-        verifier.deleteArtifacts( "org.apache.maven.its.it0113" );
         verifier.deleteDirectory( "target" );
-        verifier.executeGoal( "install" );
-        verifier.verifyErrorFreeLog();
-        verifier.resetStreams();
-
-        // Build the test project that uses the plugin.
-        verifier = new Verifier( new File( testDir, "test-project" ).getAbsolutePath() );
-        verifier.setAutoclean( false );
         List cliOptions = new ArrayList();
         cliOptions.add( "--settings" );
         cliOptions.add( "settings.xml" );
         verifier.setCliOptions( cliOptions );
-        verifier.executeGoal( "initialize" );
+        verifier.executeGoal( "validate" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
+
+        Properties props = verifier.loadProperties( "target/auth.properties" );
+        assertEquals( "testuser", props.getProperty( "test.username" ) );
+        assertEquals( "testtest", props.getProperty( "test.password" ) );
     }
+
 }

Copied: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/pom.xml (from r730978, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/test-project/pom.xml)
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/pom.xml?p2=maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/pom.xml&p1=maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/test-project/pom.xml&r1=730978&r2=731002&rev=731002&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/test-project/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/pom.xml Sat Jan  3 06:59:47 2009
@@ -1,26 +1,58 @@
+<?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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <groupId>org.apache.maven.its.it0113</groupId>
-  <artifactId>test-project</artifactId>
+  <artifactId>test</artifactId>
   <version>1.0-SNAPSHOT</version>
   <packaging>jar</packaging>
 
-  <name>test-project</name>
-  <url>http://maven.apache.org</url>
+  <name>test</name>
+  <description>
+    Test that the auth infos given in the settings.xml are pushed into the wagon manager and are available
+    to other components/plugins.
+  </description>
 
   <build>
     <plugins>
       <plugin>
-        <groupId>org.apache.maven.its.it0113</groupId>
-        <artifactId>maven-it0113-plugin</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-uses-wagon</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <configuration>
+          <propertiesFile>target/auth.properties</propertiesFile>
+          <serverIds>
+            <serverId>test</serverId>
+          </serverIds>
+        </configuration>
         <executions>
           <execution>
             <id>test</id>
-            <phase>initialize</phase>
-            <goals><goal>test</goal></goals>
+            <phase>validate</phase>
+            <goals>
+              <goal>dump-auth</goal>
+           </goals>
           </execution>
         </executions>
       </plugin>

Copied: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/settings.xml (from r730437, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/test-project/settings.xml)
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/settings.xml?p2=maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/settings.xml&p1=maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/test-project/settings.xml&r1=730437&r2=731002&rev=731002&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/test-project/settings.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0113/settings.xml Sat Jan  3 06:59:47 2009
@@ -1,3 +1,24 @@
+<?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>
   <servers>
     <server>