[MNG-3379] Parallel resolution of artifacts

o Added basic IT

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@742096 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-02-08 14:05:18 +00:00
parent b502319841
commit b21221220d
51 changed files with 667 additions and 0 deletions

View File

@ -193,6 +193,7 @@ public class IntegrationTestSuite
suite.addTestSuite( MavenITmng3396DependencyManagementForOverConstrainedRangesTest.class ); suite.addTestSuite( MavenITmng3396DependencyManagementForOverConstrainedRangesTest.class );
suite.addTestSuite( MavenITmng3394POMPluginVersionDominanceTest.class ); suite.addTestSuite( MavenITmng3394POMPluginVersionDominanceTest.class );
suite.addTestSuite( MavenITmng3380ManagedRelocatedTransdepsTest.class ); suite.addTestSuite( MavenITmng3380ManagedRelocatedTransdepsTest.class );
suite.addTestSuite( MavenITmng3379ParallelArtifactDownloadsTest.class );
suite.addTestSuite( MavenITmng3372DirectInvocationOfPluginsTest.class ); suite.addTestSuite( MavenITmng3372DirectInvocationOfPluginsTest.class );
suite.addTestSuite( MavenITmng3355TranslatedPathInterpolationTest.class ); suite.addTestSuite( MavenITmng3355TranslatedPathInterpolationTest.class );
suite.addTestSuite( MavenITmng3331ModulePathNormalizationTest.class ); suite.addTestSuite( MavenITmng3331ModulePathNormalizationTest.class );

View File

@ -0,0 +1,103 @@
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 java.io.File;
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
/**
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-3379">MNG-3379</a>.
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class MavenITmng3379ParallelArtifactDownloadsTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng3379ParallelArtifactDownloadsTest()
{
super();
}
/**
* Tests that parallel downloads of artifacts from both the same and from different group ids don't corrupt
* the local repo.
*/
public void testitMNG3379()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3379" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.setAutoclean( false );
verifier.deleteArtifacts( "org.apache.maven.its.mng3379.a" );
verifier.deleteArtifacts( "org.apache.maven.its.mng3379.b" );
verifier.deleteArtifacts( "org.apache.maven.its.mng3379.c" );
verifier.deleteArtifacts( "org.apache.maven.its.mng3379.c" );
verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.a", "x", "0.1", "", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.a", "x", "0.1", "", "pom" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.a", "x", "0.1", "tests", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.a", "x", "0.1", "sources", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.a", "x", "0.1", "test-javadoc", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.b", "x", "0.1", "", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.b", "x", "0.1", "", "pom" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.b", "x", "0.1", "tests", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.b", "x", "0.1", "sources", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.b", "x", "0.1", "test-javadoc", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.c", "x", "0.1", "", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.c", "x", "0.1", "", "pom" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.c", "x", "0.1", "tests", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.c", "x", "0.1", "sources", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.c", "x", "0.1", "test-javadoc", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.d", "x", "0.1", "", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.d", "x", "0.1", "", "pom" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.d", "x", "0.1", "tests", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.d", "x", "0.1", "sources", "jar" );
assertArtifactPresent( verifier, "org.apache.maven.its.mng3379.d", "x", "0.1", "test-javadoc", "jar" );
}
private void assertArtifactPresent( Verifier verifier, String gid, String aid, String ver, String cls, String ext )
{
StringBuffer buffer = new StringBuffer( 256 );
buffer.append( verifier.localRepo );
buffer.append( '/' ).append( gid.replace( '.', '/' ) );
buffer.append( '/' ).append( aid );
buffer.append( '/' ).append( ver );
buffer.append( '/' ).append( aid ).append( '-' ).append( ver );
if ( cls != null && cls.length() > 0 )
{
buffer.append( '-' ).append( cls );
}
buffer.append( '.' ).append( ext );
File file = new File( buffer.toString() );
assertTrue( file.getAbsolutePath(), file.isFile() );
}
}

View File

@ -0,0 +1,167 @@
<?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.mng3379</groupId>
<artifactId>test</artifactId>
<packaging>jar</packaging>
<version>1</version>
<name>Maven Integration Test :: MNG-3379</name>
<description>
Tests that parallel downloads of artifacts from both the same and from different group ids don't corrupt
the local repo.
</description>
<dependencies>
<!-- group A -->
<dependency>
<groupId>org.apache.maven.its.mng3379.a</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.its.mng3379.a</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.apache.maven.its.mng3379.a</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.apache.maven.its.mng3379.a</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<classifier>test-javadoc</classifier>
</dependency>
<!-- group B -->
<dependency>
<groupId>org.apache.maven.its.mng3379.b</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.its.mng3379.b</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.apache.maven.its.mng3379.b</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.apache.maven.its.mng3379.b</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<classifier>test-javadoc</classifier>
</dependency>
<!-- group C -->
<dependency>
<groupId>org.apache.maven.its.mng3379.c</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.its.mng3379.c</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.apache.maven.its.mng3379.c</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.apache.maven.its.mng3379.c</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<classifier>test-javadoc</classifier>
</dependency>
<!-- group D -->
<dependency>
<groupId>org.apache.maven.its.mng3379.d</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.its.mng3379.d</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.apache.maven.its.mng3379.d</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.apache.maven.its.mng3379.d</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<classifier>test-javadoc</classifier>
</dependency>
</dependencies>
<repositories>
<repository>
<id>maven-core-it</id>
<url>file://${basedir}/repo</url>
<releases>
<!-- NOTE: Be sure the verify the integrity -->
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<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>

View File

@ -0,0 +1 @@
eb6f88879780e05b80766d0eff83e930f2b86601

View File

@ -0,0 +1 @@
fd805d41bd0ccd03e85c990298a0210eecfcc3a0

View File

@ -0,0 +1 @@
70bab2c72a200ed93aea963ffb0cdfe238ac6ba6

View File

@ -0,0 +1 @@
b71e548e0427e3a92b1c130d27be6fa52d84c576

View File

@ -0,0 +1,81 @@
<?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.mng3379.a</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<properties>
<updateReleaseInfo>true</updateReleaseInfo>
</properties>
<distributionManagement>
<repository>
<id>maven-core-it</id>
<url>file:///${basedir}/repo</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>tests</id>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.0.4</version>
<executions>
<execution>
<id>sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>apidocs</id>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1 @@
5904b07e6c250f792643b8ca9d8237bdbacd5acf

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.apache.maven.its.mng3379.a</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<versioning>
<release>0.1</release>
<versions>
<version>0.1</version>
</versions>
<lastUpdated>20090208133354</lastUpdated>
</versioning>
</metadata>

View File

@ -0,0 +1 @@
4398fbb8bb8bba7064c300326fb20aa5ad28611b

View File

@ -0,0 +1 @@
1a0c93a349a53312dc3ee58343f8393a88e78482

View File

@ -0,0 +1 @@
0523c551c85a92127b9c18bb2795d5728d5174f3

View File

@ -0,0 +1 @@
5b5a09051f138d407d2600c0f016f48179a6be75

View File

@ -0,0 +1 @@
e5cf583eab02c011806a2fba761915a8cfa7d77a

View File

@ -0,0 +1,81 @@
<?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.mng3379.b</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<properties>
<updateReleaseInfo>true</updateReleaseInfo>
</properties>
<distributionManagement>
<repository>
<id>maven-core-it</id>
<url>file:///${basedir}/repo</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>tests</id>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.0.4</version>
<executions>
<execution>
<id>sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>apidocs</id>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1 @@
6840d0bf1653fc445d4486c4a5e280813087a1a5

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.apache.maven.its.mng3379.b</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<versioning>
<release>0.1</release>
<versions>
<version>0.1</version>
</versions>
<lastUpdated>20090208133454</lastUpdated>
</versioning>
</metadata>

View File

@ -0,0 +1 @@
a24c3b15d87466e4b9ed731895e6047e9b529f6c

View File

@ -0,0 +1 @@
16ba8eb2c5586bc40092d6e74a10d558ad420c11

View File

@ -0,0 +1 @@
46f9b349dba7b94e0ea103f265e71881c41755e0

View File

@ -0,0 +1 @@
ca12b841a47fb2eeb5ff7f90db342b91401a2b2e

View File

@ -0,0 +1 @@
267b6326ac40acae70084d39f8d6653109195ce2

View File

@ -0,0 +1,81 @@
<?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.mng3379.c</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<properties>
<updateReleaseInfo>true</updateReleaseInfo>
</properties>
<distributionManagement>
<repository>
<id>maven-core-it</id>
<url>file:///${basedir}/repo</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>tests</id>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.0.4</version>
<executions>
<execution>
<id>sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>apidocs</id>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1 @@
eae1c10beecc02eb0e4edd5a25e1cb964057b3e5

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.apache.maven.its.mng3379.c</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<versioning>
<release>0.1</release>
<versions>
<version>0.1</version>
</versions>
<lastUpdated>20090208133508</lastUpdated>
</versioning>
</metadata>

View File

@ -0,0 +1 @@
22a882ba475e2c2eda7a7db17bd3d7ff753e7b5c

View File

@ -0,0 +1 @@
573b4260baec255421e1bb7ffded4569d91e1867

View File

@ -0,0 +1 @@
4bea5c6f80eab61b814b5ab005476a79dd05ada5

View File

@ -0,0 +1 @@
beb42cc5880099fb3df64bffb4b18afdb49dcf6a

View File

@ -0,0 +1 @@
4f0d975441aea90243d1b89183512aac7420b757

View File

@ -0,0 +1,81 @@
<?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.mng3379.d</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<properties>
<updateReleaseInfo>true</updateReleaseInfo>
</properties>
<distributionManagement>
<repository>
<id>maven-core-it</id>
<url>file:///${basedir}/repo</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>tests</id>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.0.4</version>
<executions>
<execution>
<id>sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>apidocs</id>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1 @@
dc011fe3156096fddc8368528b3443c162f33983

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.apache.maven.its.mng3379.d</groupId>
<artifactId>x</artifactId>
<version>0.1</version>
<versioning>
<release>0.1</release>
<versions>
<version>0.1</version>
</versions>
<lastUpdated>20090208133536</lastUpdated>
</versioning>
</metadata>

View File

@ -0,0 +1 @@
e5dc27ae9e5680b70cee0c767bfe78362a134aff