improved verbose IT
git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@1478533 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/it/verbose/expected-default.txt b/src/it/verbose/expected-default.txt
new file mode 100644
index 0000000..5718bb1
--- /dev/null
+++ b/src/it/verbose/expected-default.txt
@@ -0,0 +1,28 @@
+org.apache.maven.its.dependency-tree:verbose:jar:1.0-SNAPSHOT
++- org.apache.maven:maven-project:jar:2.0.6:compile
+| +- org.apache.maven:maven-settings:jar:2.0.6:compile
+| +- org.apache.maven:maven-artifact-manager:jar:2.0.6:compile
+| | +- org.apache.maven:maven-repository-metadata:jar:2.0.6:compile
+| | \- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
+| +- org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
+| +- org.codehaus.plexus:plexus-utils:jar:1.4.1:compile
+| \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
+| +- junit:junit:jar:3.8.1:compile
+| \- classworlds:classworlds:jar:1.1-alpha-2:compile
++- org.apache.maven:maven-profile:jar:2.0.4:test (scope not updated to compile)
++- org.apache.maven:maven-model:jar:2.0.7:runtime
+\- org.apache.xmlgraphics:batik-bridge:jar:1.7:compile
+ +- org.apache.xmlgraphics:batik-anim:jar:1.7:compile
+ +- org.apache.xmlgraphics:batik-awt-util:jar:1.7:compile
+ +- org.apache.xmlgraphics:batik-css:jar:1.7:compile
+ +- org.apache.xmlgraphics:batik-dom:jar:1.7:compile
+ +- org.apache.xmlgraphics:batik-ext:jar:1.7:compile
+ +- org.apache.xmlgraphics:batik-gvt:jar:1.7:compile
+ +- org.apache.xmlgraphics:batik-parser:jar:1.7:compile
+ +- org.apache.xmlgraphics:batik-script:jar:1.7:compile
+ +- org.apache.xmlgraphics:batik-svg-dom:jar:1.7:compile
+ +- org.apache.xmlgraphics:batik-util:jar:1.7:compile
+ +- org.apache.xmlgraphics:batik-xml:jar:1.7:compile
+ +- xalan:xalan:jar:2.6.0:compile
+ +- xml-apis:xml-apis:jar:1.3.04:compile
+ \- xml-apis:xml-apis-ext:jar:1.3.04:compile
diff --git a/src/it/verbose/expected.txt b/src/it/verbose/expected-verbose.txt
similarity index 100%
rename from src/it/verbose/expected.txt
rename to src/it/verbose/expected-verbose.txt
diff --git a/src/it/verbose/invoker.properties b/src/it/verbose/invoker.properties
index 2200036..2bdc012 100644
--- a/src/it/verbose/invoker.properties
+++ b/src/it/verbose/invoker.properties
@@ -1 +1 @@
-invoker.goals = clean dependency:tree
+invoker.goals = clean validate
diff --git a/src/it/verbose/pom.xml b/src/it/verbose/pom.xml
index 109f15f..e3b11bc 100644
--- a/src/it/verbose/pom.xml
+++ b/src/it/verbose/pom.xml
@@ -79,25 +79,42 @@
</dependencies>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <outputFile>target/tree.txt</outputFile>
- <verbose>true</verbose>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>@project.groupId@</groupId>
- <artifactId>@project.artifactId@</artifactId>
- <version>@project.version@</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.4</version>
+ <dependencies>
+ <dependency>
+ <groupId>@project.groupId@</groupId>
+ <artifactId>@project.artifactId@</artifactId>
+ <version>@project.version@</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>verbose</id>
+ <phase>validate</phase>
+ <configuration>
+ <outputFile>target/tree-verbose.txt</outputFile>
+ <verbose>true</verbose>
+ </configuration>
+ <goals>
+ <goal>tree</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default</id>
+ <phase>validate</phase>
+ <configuration>
+ <outputFile>target/tree-default.txt</outputFile>
+ </configuration>
+ <goals>
+ <goal>tree</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
</project>
diff --git a/src/it/verbose/verify.bsh b/src/it/verbose/verify.bsh
index 8bad5d4..af1bd73 100644
--- a/src/it/verbose/verify.bsh
+++ b/src/it/verbose/verify.bsh
@@ -2,17 +2,30 @@
import org.codehaus.plexus.util.*;
-String actual = FileUtils.fileRead( new File( basedir, "target/tree.txt" ) );
-String expected = FileUtils.fileRead( new File( basedir, "expected.txt" ) );
+String actual = FileUtils.fileRead( new File( basedir, "target/tree-verbose.txt" ) );
+String expected = FileUtils.fileRead( new File( basedir, "expected-verbose.txt" ) );
actual = actual.replaceAll( "[\n\r]+", "\n" );
expected = expected.replaceAll( "[\n\r]+", "\n" );
-System.out.println( "Checking dependency tree..." );
+System.out.println( "Checking verbose dependency tree..." );
if ( !actual.equals( expected ) )
{
- throw new Exception( "Unexpected dependency tree" );
+ throw new Exception( "Unexpected verbose dependency tree" );
+}
+
+actual = FileUtils.fileRead( new File( basedir, "target/tree-default.txt" ) );
+expected = FileUtils.fileRead( new File( basedir, "expected-default.txt" ) );
+
+actual = actual.replaceAll( "[\n\r]+", "\n" );
+expected = expected.replaceAll( "[\n\r]+", "\n" );
+
+System.out.println( "Checking default dependency tree..." );
+
+if ( !actual.equals( expected ) )
+{
+ throw new Exception( "Unexpected default dependency tree" );
}
return true;