o Removed superfluos files (cycles were and won't be supported, the non-cyclic case is already covered by the IT for MNG-3220)

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@810014 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-09-01 13:08:05 +00:00
parent 79dcdf27c8
commit bb5c5e4555
13 changed files with 0 additions and 366 deletions

View File

@ -74,7 +74,6 @@ public class IntegrationTestSuite
// suite.addTestSuite( MavenITmng4048VersionRangeReactorResolutionTest.class );
// suite.addTestSuite( MavenITmng3890TransitiveDependencyScopeUpdateTest.class );
// suite.addTestSuite( MavenITmng3645POMSyntaxErrorTest.class );
// suite.addTestSuite( MavenITmng3391ImportScopeErrorScenariosTest.class );
// suite.addTestSuite( MavenITmng3038TransitiveDepManVersionTest.class );
// suite.addTestSuite( MavenITmng2994SnapshotRangeRepositoryTest.class );
// suite.addTestSuite( MavenITmng2771PomExtensionComponentOverrideTest.class );

View File

@ -1,102 +0,0 @@
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;
public class MavenITmng3391ImportScopeErrorScenariosTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng3391ImportScopeErrorScenariosTest()
{
super( "(2.0.8,)" ); // only test in 2.0.9+
}
public void testitMNG3391a()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/mng-3391/depMgmt-importPom-noParentCycle" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.setLogFileName( "log-a.txt" );
verifier.deleteArtifact( "org.apache.maven.its.mng3391.2", "dm-pom", "1", "pom" );
verifier.executeGoal( "install" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
}
public void testitMNG3391b()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/mng-3391/depMgmt-importPom-noParentCycle" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.deleteArtifact( "org.apache.maven.its.mng3391.2", "dm-pom", "1", "pom" );
Verifier v2 = new Verifier( new File( testDir, "dm-pom" ).getAbsolutePath() );
v2.executeGoal( "install" );
v2.verifyErrorFreeLog();
v2.resetStreams();
verifier.executeGoal( "install" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
}
public void testitMNG3391c()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/mng-3391/depMgmt-importPom-parentCycle" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.deleteArtifact( "org.apache.maven.its.mng3391.1", "dm-pom", "1", "pom" );
verifier.executeGoal( "install" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
}
public void testitMNG3391d()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/mng-3391/depMgmt-importPom-parentCycle" );
Verifier verifier = new Verifier( new File( testDir, "dm-pom" ).getAbsolutePath() );
verifier.executeGoal( "install" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
}
}

View File

@ -1,26 +0,0 @@
<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>
<!--
<parent>
<groupId>org.apache.maven.its.mng3391.2</groupId>
<version>1</version>
<artifactId>parent</artifactId>
</parent>
-->
<groupId>org.apache.maven.its.mng3391.2</groupId>
<version>1</version>
<artifactId>dm-pom</artifactId>
<packaging>pom</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -1,25 +0,0 @@
<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.mng3391.2</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>
<version>1</version>
<modules>
<module>dm-pom</module>
<module>project</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven.its.mng3391.2</groupId>
<artifactId>dm-pom</artifactId>
<version>1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -1,20 +0,0 @@
<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>
<parent>
<groupId>org.apache.maven.its.mng3391.2</groupId>
<version>1</version>
<artifactId>parent</artifactId>
</parent>
<artifactId>project</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

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

View File

@ -1,38 +0,0 @@
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

@ -1,24 +0,0 @@
<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>
<parent>
<groupId>org.apache.maven.its.mng3391.1</groupId>
<version>1</version>
<artifactId>parent</artifactId>
</parent>
<groupId>org.apache.maven.its.mng3391.1</groupId>
<version>1</version>
<artifactId>dm-pom</artifactId>
<packaging>pom</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -1,25 +0,0 @@
<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.mng3391.1</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>
<version>1</version>
<modules>
<module>dm-pom</module>
<module>project</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven.its.mng3391.1</groupId>
<artifactId>dm-pom</artifactId>
<version>1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -1,20 +0,0 @@
<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>
<parent>
<groupId>org.apache.maven.its.mng3391.1</groupId>
<version>1</version>
<artifactId>parent</artifactId>
</parent>
<artifactId>project</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

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

View File

@ -1,38 +0,0 @@
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

@ -1,21 +0,0 @@
In some scenarios, usage of the import scope can result in a StackOverflowException or OutOfMemoryException. The tests in this group are designed to define the edges of this problem.
The first build, depMgmt-importPom-noParentCycle, has a module POM that is also referenced from the top level as a dependencyManagement entry with type == pom and scope == import. The dm-pom project (the module in question) DOES NOT specify the top-level POM as its parent. This build should fail on the first execution, but succeed as soon as the dm-pom POM is installed into the local repository. To execute:
1. mvn install
2. Observe the ArtifactNotFoundException listing org.apache.maven.its.mng3391.2:dm-pom:pom:1 as missing. This is because the dm-pom module hasn't been loaded at the time that the dm-pom is required for merging dependencyManagement.
3. cd dm-pom
4. mvn install
5. mvn install (from the top level again)
6. Observe that the build succeeds this time.
The second build, depMgmt-importPom-parentCycle, is designed to show the two error conditions that result from the the dm-pom POM listing the top-level POM as its parent, while the top-level POM simultaneously lists the dm-pom as a module AND as a dependencyManagement entry with scope == import and type == pom. This build will fail with an ArtifactNotFoundException on the first run. On the second run, the dm-pom is first installed manually into the local repository, and will result in either a StackOverflowException or an OutOfMemoryException.
1. mvn install
2. Observe the ArtifactNotFoundException listing org.apache.maven.its.mng3391.2:dm-pom:pom:1 as missing. This is because the dm-pom module hasn't been loaded at the time that the dm-pom is required for merging dependencyManagement.
3. cd dm-pom
4. copy pom.xml to <local-repository>/org/apache/maven/its/mng3391/1/dm-pom/1/dm-pom-1.pom
5. mvn install (from the top level again)
6. Observe that this build brings Maven to its knees.
NOTE: We can't really run this last build (yet) because it will wreck the entire IT run.