MNG-2861: IT

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@635763 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brian E Fox 2008-03-11 00:05:34 +00:00
parent 3316de4c7c
commit 9b786fe7ef
45 changed files with 474 additions and 0 deletions

View File

@ -182,6 +182,7 @@ public class IntegrationTestSuite
suite.addTestSuite( MavenITmng2234ActiveProfilesFromSettingsTest.class );
suite.addTestSuite( MavenITmng3341MetadataUpdatedFromDeploymentRepositoryTest.class );
suite.addTestSuite( MavenITmng3394POMPluginVersionDominanceTest.class );
suite.addTestSuite( MavenITmng2861RelocationsAndRanges.class );
// ----------------------------------------------------------------------------------------------------
// Tests that need to be fixed.

View File

@ -0,0 +1,46 @@
package org.apache.maven.integrationtests;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
public class MavenITmng2861RelocationsAndRanges
extends AbstractMavenIntegrationTestCase
{
public void testitMNG2123 ()
throws Exception
{
// The testdir is computed from the location of this
// file.
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2861relocationsAndRanges/MNG-2861" );
Verifier verifier;
/*
* We must first make sure that any artifact created
* by this test has been removed from the local
* repository. Failing to do this could cause
* unstable test results. Fortunately, the verifier
* makes it easy to do this.
*/
verifier = new Verifier( testDir.getAbsolutePath() );
verifier.deleteArtifact( "org.apache.maven.its.mng2123", "MNG-2861", "1.0-SNAPSHOT", "pom" );
verifier.deleteArtifact( "org.apache.maven.its.mng2123", "A", "1.0-SNAPSHOT", "jar" );
verifier.deleteArtifact( "org.apache.maven.its.mng2123", "B", "1.0-SNAPSHOT", "jar" );
verifier.deleteArtifact( "org.apache.maven.its.mng2123", "C", "1.0-SNAPSHOT", "jar" );
List cliOptions = new ArrayList();
cliOptions.add( "-N" );
verifier.executeGoal( "install" );
verifier.verifyErrorFreeLog();
}
}

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?><project>
<parent>
<artifactId>MNG-2861</artifactId>
<groupId>org.apache.maven.its.mng2861</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>A</artifactId>
<name>A</name>
<version>1.0-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.apache.maven.its.mng2861</groupId>
<artifactId>B</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>test</groupId>
<artifactId>C</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>id</id>
<url>file:///${basedir}/../../repository</url>
<releases><enabled>true</enabled></releases>
</repository>
</repositories>
</project>

View File

@ -0,0 +1,13 @@
package test;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}

View File

@ -0,0 +1,38 @@
package test;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?><project>
<parent>
<artifactId>MNG-2861</artifactId>
<groupId>org.apache.maven.its.mng2861</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>B</artifactId>
<name>B</name>
<version>1.0-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>oldgroupId</groupId>
<artifactId>project</artifactId>
<version>[1.2,)</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>id</id>
<url>file:///${basedir}/../../repository</url>
<releases><enabled>true</enabled></releases>
</repository>
</repositories>
</project>

View File

@ -0,0 +1,13 @@
package test;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}

View File

@ -0,0 +1,38 @@
package test;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?><project>
<parent>
<artifactId>MNG-2861</artifactId>
<groupId>org.apache.maven.its.mng2861</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>C</artifactId>
<name>C</name>
<version>1.0-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>newgroupId</groupId>
<artifactId>project</artifactId>
<version>[2.0,3.0)</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>id</id>
<url>file:///${basedir}/../../repository</url>
<releases><enabled>true</enabled></releases>
</repository>
</repositories>
</project>

View File

@ -0,0 +1,13 @@
package test;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}

View File

@ -0,0 +1,38 @@
package test;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<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.mng2861</groupId>
<artifactId>MNG-2861</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>MNG-2861</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<modules>
<module>A</module>
<module>B</module>
<module>C</module>
</modules>
</project>

View File

@ -0,0 +1,24 @@
<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>newgroupId</groupId>
<artifactId>project</artifactId>
<packaging>jar</packaging>
<version>1.2</version>
<name>project</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>id</id>
<url>file://localhost/${basedir}/../repository</url>
</repository>
</distributionManagement>
</project>

View File

@ -0,0 +1,24 @@
<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>newgroupId</groupId>
<artifactId>project</artifactId>
<packaging>jar</packaging>
<version>2.0</version>
<name>project</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>id</id>
<url>file://localhost/${basedir}/../repository</url>
</repository>
</distributionManagement>
</project>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>newgroupId</groupId>
<artifactId>project</artifactId>
<version>1.2</version>
<versioning>
<versions>
<version>1.2</version>
<version>2.0</version>
</versions>
<lastUpdated>20070821062219</lastUpdated>
</versioning>
</metadata>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?><project>
<modelVersion>4.0.0</modelVersion>
<groupId>oldgroupId</groupId>
<artifactId>project</artifactId>
<name>project</name>
<version>1.0</version>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>id</id>
<url>file://localhost/${basedir}/../repository</url>
</repository>
</distributionManagement>
</project>

View File

@ -0,0 +1,24 @@
<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>oldgroupId</groupId>
<artifactId>project</artifactId>
<packaging>jar</packaging>
<version>1.1</version>
<name>project</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>id</id>
<url>file://localhost/${basedir}/../repository</url>
</repository>
</distributionManagement>
</project>

View File

@ -0,0 +1,27 @@
<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>oldgroupId</groupId>
<artifactId>project</artifactId>
<packaging>jar</packaging>
<version>1.2</version>
<name>project12</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>id</id>
<url>file://localhost/${basedir}/../repository</url>
</repository>
<relocation>
<groupId>newgroupId</groupId>
</relocation>
</distributionManagement>
</project>

View File

@ -0,0 +1 @@
MD5 (project-1.2.pom) = 5eb6d8e0d2e97515f072e3844d767c82

View File

@ -0,0 +1 @@
b8bcd7b551babda9b1c5e73db4c92246bb41be3aSHA1(project-1.2.pom)= 4d453b0c3fe9970a2124d3abc2bd2260c9ec9bba

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>oldgroupId</groupId>
<artifactId>project</artifactId>
<version>1.1</version>
<versioning>
<versions>
<version>1.1</version>
<version>1.2</version>
<version>1.0</version>
</versions>
<lastUpdated>20070821062402</lastUpdated>
</versioning>
</metadata>