o reformat and optimize imports

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@466529 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2006-10-21 20:32:27 +00:00
parent f73f3289c1
commit 4f99391450
1 changed files with 35 additions and 27 deletions

View File

@ -1,33 +1,41 @@
package org.apache.maven.integrationtests;
import java.io.*;
import java.util.*;
import junit.framework.*;
import junit.framework.TestCase;
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.FileUtils;
import org.apache.maven.it.util.ResourceExtractor;
import org.apache.maven.it.*;
import org.apache.maven.it.util.*;
import java.io.File;
public class MavenIT0080Test extends TestCase /*extends AbstractMavenIntegrationTest*/ {
public class MavenIT0080Test
extends TestCase /*extends AbstractMavenIntegrationTest*/
{
/** Test that depending on a WAR doesn't also get its dependencies
transitively. */
public void testit0080() throws Exception {
String basedir = System.getProperty("maven.test.tmpdir", System.getProperty("java.io.tmpdir"));
File testDir = new File(basedir, getName());
FileUtils.deleteDirectory(testDir);
System.out.println("Extracting it0080 to " + testDir.getAbsolutePath());
ResourceExtractor.extractResourcePath(getClass(), "/it0080", testDir);
Verifier verifier = new Verifier(testDir.getAbsolutePath());
verifier.executeGoal("package");
verifier.assertFilePresent("test-component-a/target/test-component-a-0.1.jar");
verifier.assertFilePresent("test-component-b/target/test-component-b-0.1.war");
verifier.assertFilePresent("test-component-b/target/test-component-b-0.1.war!/WEB-INF/lib/test-component-a-0.1.jar");
verifier.assertFilePresent("test-component-c/target/test-component-c-0.1.ear");
verifier.assertFilePresent("test-component-c/target/test-component-c-0.1.ear!/test-component-b-0.1.war");
verifier.assertFilePresent("test-component-c/target/test-component-c-0.1/test-component-b-0.1.war");
verifier.assertFileNotPresent("test-component-c/target/test-component-c-0.1/test-component-a-0.1.jar");
verifier.verifyErrorFreeLog();
verifier.resetStreams();
System.out.println("PASS");
}}
/**
* Test that depending on a WAR doesn't also get its dependencies
* transitively.
*/
public void testit0080()
throws Exception
{
String basedir = System.getProperty( "maven.test.tmpdir", System.getProperty( "java.io.tmpdir" ) );
File testDir = new File( basedir, getName() );
FileUtils.deleteDirectory( testDir );
System.out.println( "Extracting it0080 to " + testDir.getAbsolutePath() );
ResourceExtractor.extractResourcePath( getClass(), "/it0080", testDir );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.executeGoal( "package" );
verifier.assertFilePresent( "test-component-a/target/test-component-a-0.1.jar" );
verifier.assertFilePresent( "test-component-b/target/test-component-b-0.1.war" );
verifier.assertFilePresent(
"test-component-b/target/test-component-b-0.1.war!/WEB-INF/lib/test-component-a-0.1.jar" );
verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1.ear" );
verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1.ear!/test-component-b-0.1.war" );
verifier.assertFilePresent( "test-component-c/target/test-component-c-0.1/test-component-b-0.1.war" );
verifier.assertFileNotPresent( "test-component-c/target/test-component-c-0.1/test-component-a-0.1.jar" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
System.out.println( "PASS" );
}
}