| import java.io.*; |
| |
| import org.codehaus.plexus.util.*; |
| |
| 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 verbose dependency tree..." ); |
| |
| if ( !actual.equals( expected ) ) |
| { |
| 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; |