Author: bentmann Date: Sat Jun 20 21:02:57 2009 New Revision: 786908 URL: http://svn.apache.org/viewvc?rev=786908&view=rev Log: [MNG-4214] [regression] Parent POMs cannot be resolved from mirrored repos
o Added IT Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4214MirroredParentSearchReposTest.java (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/pom.xml (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/mng4214/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/mng4214/parent/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/mng4214/parent/0.1/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/mng4214/parent/0.1/parent-0.1.pom maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/mng4214/parent/maven-metadata.xml (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/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=786908&r1=786907&r2=786908&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 Sat Jun 20 21:02:57 2009 @@ -91,6 +91,7 @@ // suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class ); // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137 + suite.addTestSuite( MavenITmng4214MirroredParentSearchReposTest.class ); suite.addTestSuite( MavenITmng4208InterpolationPrefersCliOverProjectPropsTest.class ); suite.addTestSuite( MavenITmng4207PluginWithLog4JTest.class ); suite.addTestSuite( MavenITmng4203TransitiveDependencyExclusionTest.class ); Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4214MirroredParentSearchReposTest.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4214MirroredParentSearchReposTest.java?rev=786908&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4214MirroredParentSearchReposTest.java (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4214MirroredParentSearchReposTest.java Sat Jun 20 21:02:57 2009 @@ -0,0 +1,68 @@ +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; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4214">MNG-4214</a>. + * + * @author Benjamin Bentmann + */ +public class MavenITmng4214MirroredParentSearchReposTest + extends AbstractMavenIntegrationTestCase +{ + + public MavenITmng4214MirroredParentSearchReposTest() + { + super( "[2.0.5,)" ); + } + + /** + * Test parent POMs can be resolved from repos with different enabled policies that are matched by a single mirror. + * In other words, check that the one mirror is properly configured with a merged view of the potentially different + * policies from the original repos. + */ + public void testit() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4214" ); + + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); + verifier.deleteArtifacts( "org.apache.maven.its.mng4214" ); + 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.assertArtifactPresent( "org.apache.maven.its.mng4214", "parent", "0.1", "pom" ); + } + +} Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4214MirroredParentSearchReposTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4214MirroredParentSearchReposTest.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/pom.xml?rev=786908&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/pom.xml Sat Jun 20 21:02:57 2009 @@ -0,0 +1,39 @@ +<?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.mng4214</groupId> + <artifactId>parent</artifactId> + <version>0.1</version> + </parent> + + <artifactId>child</artifactId> + + <name>Maven Integration Test :: MNG-4214</name> + <description> + Test parent POMs can be resolved from repos with different enabled policies that are matched by a single mirror. + In other words, check that the one mirror is properly configured with a merged view of the potentially different + policies from the original repos. + </description> +</project> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/pom.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/mng4214/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-4214/repo/org/apache/maven/its/mng4214/parent/0.1/parent-0.1.pom?rev=786908&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/mng4214/parent/0.1/parent-0.1.pom (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/mng4214/parent/0.1/parent-0.1.pom Sat Jun 20 21:02:57 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.mng4214</groupId> + <artifactId>parent</artifactId> + <version>0.1</version> + <packaging>pom</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-4214/repo/org/apache/maven/its/mng4214/parent/maven-metadata.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/mng4214/parent/maven-metadata.xml?rev=786908&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/mng4214/parent/maven-metadata.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/mng4214/parent/maven-metadata.xml Sat Jun 20 21:02:57 2009 @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<metadata xsi:schemaLocation="http://maven.apache.org/METADATA/1.0.0 http://maven.apache.org/xsd/metadata-1.0.0.xsd" xmlns="http://maven.apache.org/METADATA/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <groupId>org.apache.maven.its.mng4214</groupId> + <artifactId>parent</artifactId> + <version>0.1</version> + <versioning> + <versions> + <version>0.1</version> + </versions> + <lastUpdated>20090620203032</lastUpdated> + </versioning> +</metadata> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/mng4214/parent/maven-metadata.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/repo/org/apache/maven/its/mng4214/parent/maven-metadata.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/settings-template.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/settings-template.xml?rev=786908&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/settings-template.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/settings-template.xml Sat Jun 20 21:02:57 2009 @@ -0,0 +1,75 @@ +<?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> + <!-- one mirror that matches all of the three repos below --> + <id>maven-mirror</id> + <url>@baseurl@/repo</url> + <mirrorOf>*</mirrorOf> + </mirror> + </mirrors> + <profiles> + <profile> + <id>maven-core-it-repos</id> + <repositories> + <!-- + NOTE: It's essential part of the test design that the first and last repos have releases disabled, releases + can only be resolved from the middle repo. + --> + <repository> + <id>repo-1</id> + <url>@baseurl@/null-1</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + <repository> + <id>repo-2</id> + <url>@baseurl@/null-2</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>repo-3</id> + <url>@baseurl@/null-3</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + </profile> + </profiles> + <activeProfiles> + <activeProfile>maven-core-it-repos</activeProfile> + </activeProfiles> +</settings> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/settings-template.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4214/settings-template.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision