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/13 14:06:06 UTC

svn commit: r734120 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-3970/test-3/ resources/mng-3970/test-3/repo/ resources/mng-3970/test-3/repo/org/ resources/mng-3970/test-3/repo/org/apache/ r...

Author: bentmann
Date: Tue Jan 13 05:05:39 2009
New Revision: 734120

URL: http://svn.apache.org/viewvc?rev=734120&view=rev
Log:
o Extended IT to check profiles from settings as well

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/pom.xml   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.jar   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.pom
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/maven-metadata.xml   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/settings.xml   (with props)
Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3970DepResolutionFromProfileReposTest.java

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3970DepResolutionFromProfileReposTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3970DepResolutionFromProfileReposTest.java?rev=734120&r1=734119&r2=734120&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3970DepResolutionFromProfileReposTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3970DepResolutionFromProfileReposTest.java Tue Jan 13 05:05:39 2009
@@ -77,4 +77,25 @@
         verifier.assertArtifactPresent( "org.apache.maven.its.mng3970", "a", "0.1", "jar" );
     }
 
+    /**
+     * Test that dependencies can be resolved from remote repositories defined by (active) profiles in settings.xml.
+     */
+    public void testitFromSettings()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3970/test-3" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.deleteArtifacts( "org.apache.maven.its.mng3970" );
+        verifier.filterFile( "settings.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() );
+        verifier.getCliOptions().add( "--settings" );
+        verifier.getCliOptions().add( "settings.xml" );
+        verifier.executeGoal( "validate" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        verifier.assertArtifactPresent( "org.apache.maven.its.mng3970", "a", "0.1", "jar" );
+    }
+
 }

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/pom.xml?rev=734120&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/pom.xml Tue Jan 13 05:05:39 2009
@@ -0,0 +1,60 @@
+<?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.mng3970</groupId>
+  <artifactId>test</artifactId>
+  <version>0.3</version>
+
+  <name>Maven Integration Test :: MNG-3970</name> 
+  <description>
+    Test that dependencies can be resolved from remote repositories defined by (active) profiles in settings.xml.
+  </description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.its.mng3970</groupId>
+      <artifactId>a</artifactId>
+      <version>0.1</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>compile</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

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

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

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.jar
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.jar?rev=734120&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.pom
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.pom?rev=734120&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.pom (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/0.1/a-0.1.pom Tue Jan 13 05:05:39 2009
@@ -0,0 +1,36 @@
+<?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.mng3970</groupId>
+  <artifactId>a</artifactId>
+  <version>0.1</version>
+  <packaging>jar</packaging>
+
+  <distributionManagement>
+    <repository>
+      <id>maven-core-it</id>
+      <url>file:///${basedir}/repo</url>
+    </repository>
+  </distributionManagement>
+</project>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/maven-metadata.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/maven-metadata.xml?rev=734120&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/maven-metadata.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/maven-metadata.xml Tue Jan 13 05:05:39 2009
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+  <groupId>org.apache.maven.its.mng3970</groupId>
+  <artifactId>a</artifactId>
+  <version>0.1</version>
+  <versioning>
+    <release>0.1</release>
+    <versions>
+      <version>0.1</version>
+    </versions>
+    <lastUpdated>20090106134643</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/repo/org/apache/maven/its/mng3970/a/maven-metadata.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/settings.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/settings.xml?rev=734120&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/settings.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3970/test-3/settings.xml Tue Jan 13 05:05:39 2009
@@ -0,0 +1,43 @@
+<?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>
+  <activeProfiles>
+    <activeProfile>mng-3970</activeProfile>
+  </activeProfiles>
+  <profiles>
+    <profile>
+      <id>mng-3970</id>
+      <repositories>
+        <repository>
+          <id>maven-core-it</id>
+          <url>@baseurl@/repo</url>
+          <releases>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <checksumPolicy>ignore</checksumPolicy>
+          </snapshots>
+        </repository>
+      </repositories>
+    </profile>
+  </profiles>
+</settings>

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

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