[MNG-4048] Allow to resolve dependencies using version range from reactor

o Added (inactive) IT

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@746525 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-02-21 15:12:40 +00:00
parent 69a3c04a7e
commit 6617f59bc6
5 changed files with 232 additions and 1 deletions

View File

@ -74,8 +74,10 @@ public class IntegrationTestSuite
// ------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------
// Tests that currently don't pass for any Maven version, i.e. the corresponding issue hasn't been resolved yet // Tests that currently don't pass for any Maven version, i.e. the corresponding issue hasn't been resolved yet
// ------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenITmng4048VersionRangeReactorResolutionTest.class );
// suite.addTestSuite( MavenITmng3890TransitiveDependencyScopeUpdateTest.class ); // suite.addTestSuite( MavenITmng3890TransitiveDependencyScopeUpdateTest.class );
// suite.addTestSuite( MavenITmng3814BogusProjectCycleTest.class ); // suite.addTestSuite( MavenITmng3814BogusProjectCycleTest.class );
// suite.addTestSuite( MavenITmng3714ToolchainsCliOptionTest.class );
// suite.addTestSuite( MavenITmng3645POMSyntaxErrorTest.class ); // suite.addTestSuite( MavenITmng3645POMSyntaxErrorTest.class );
// suite.addTestSuite( MavenITmng3391ImportScopeErrorScenariosTest.class ); // suite.addTestSuite( MavenITmng3391ImportScopeErrorScenariosTest.class );
// suite.addTestSuite( MavenITmng3139UseCachedMetadataOfBlacklistedRepoTest.class ); // suite.addTestSuite( MavenITmng3139UseCachedMetadataOfBlacklistedRepoTest.class );
@ -83,7 +85,6 @@ public class IntegrationTestSuite
// suite.addTestSuite( MavenITmng2994SnapshotRangeRepositoryTest.class ); // suite.addTestSuite( MavenITmng2994SnapshotRangeRepositoryTest.class );
// suite.addTestSuite( MavenITmng2771PomExtensionComponentOverrideTest.class ); // suite.addTestSuite( MavenITmng2771PomExtensionComponentOverrideTest.class );
// suite.addTestSuite( MavenITmng0612NewestConflictResolverTest.class ); // suite.addTestSuite( MavenITmng0612NewestConflictResolverTest.class );
// suite.addTestSuite( MavenITmng3714ToolchainsCliOptionTest.class );
// ------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------
// Tests that don't run stable and need to be fixed // Tests that don't run stable and need to be fixed

View File

@ -0,0 +1,61 @@
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.List;
/**
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4048">MNG-4048</a>.
*
* @author Benjamin Bentmann
*/
public class MavenITmng4048VersionRangeReactorResolutionTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng4048VersionRangeReactorResolutionTest()
{
super( "[4.0,)" );
}
/**
* Verify that dependencies using version ranges can be resolved from the reactor.
*/
public void testit()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4048" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.setAutoclean( false );
verifier.deleteDirectory( "sub-2/target" );
verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
List artifacts = verifier.loadLines( "sub-2/target/compile.txt", "UTF-8" );
assertTrue( artifacts.toString(), artifacts.contains( "org.apache.maven.its.mng4048:sub-1:jar:1.1-SNAPSHOT" ) );
}
}

View File

@ -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>
<groupId>org.apache.maven.its.mng4048</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Maven Integration Test :: MNG-4048</name>
<description>
Verify that dependencies using version ranges can be resolved from the reactor.
</description>
<modules>
<module>sub-1</module>
<module>sub-2</module>
</modules>
</project>

View File

@ -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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.its.mng4048</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.its.mng4048</groupId>
<artifactId>sub-1</artifactId>
<version>1.1-SNAPSHOT</version>
<name>Maven Integration Test :: MNG-4048</name>
<description>
Verify that dependencies using version ranges can be resolved from the reactor.
</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-artifact</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<id>package</id>
<phase>validate</phase>
<configuration>
<mainFile>pom.xml</mainFile>
</configuration>
<goals>
<goal>set</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,69 @@
<?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.mng4048</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.its.mng4048</groupId>
<artifactId>sub-2</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Maven Integration Test :: MNG-4048</name>
<description>
Verify that dependencies using version ranges can be resolved from the reactor.
</description>
<dependencies>
<dependency>
<groupId>org.apache.maven.its.mng4048</groupId>
<artifactId>sub-1</artifactId>
<version>[1.0,)</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>package</id>
<phase>validate</phase>
<configuration>
<compileArtifacts>target/compile.txt</compileArtifacts>
</configuration>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>