o Tweaked logging

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@711243 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2008-11-04 12:31:49 +00:00
parent c5eaa8b515
commit f28cc7efdb
1 changed files with 8 additions and 3 deletions

View File

@ -80,6 +80,7 @@ public class MavenITmng2883LegacyRepoOfflineTest
// execute once just to make sure this test works at all! // execute once just to make sure this test works at all!
try try
{ {
verifier.setLogFileName( "log-parent-a.txt" );
// this will ensure that all relevant plugins are present. // this will ensure that all relevant plugins are present.
verifier.executeGoal( "initialize" ); verifier.executeGoal( "initialize" );
} }
@ -99,6 +100,7 @@ public class MavenITmng2883LegacyRepoOfflineTest
try try
{ {
verifier.setLogFileName( "log-parent-b.txt" );
verifier.executeGoal( "initialize" ); verifier.executeGoal( "initialize" );
fail( "Build should fail with unresolvable parent POM." ); fail( "Build should fail with unresolvable parent POM." );
@ -111,7 +113,7 @@ public class MavenITmng2883LegacyRepoOfflineTest
missingMessages.add( "System is offline." ); missingMessages.add( "System is offline." );
missingMessages.add( "org.apache.maven.its.mng2883:parent:pom:1.0-SNAPSHOT" ); missingMessages.add( "org.apache.maven.its.mng2883:parent:pom:1.0-SNAPSHOT" );
List lines = verifier.loadFile( new File( testDir, "log.txt" ), false ); List lines = verifier.loadFile( new File( testDir, verifier.getLogFileName() ), false );
for ( Iterator it = lines.iterator(); it.hasNext(); ) for ( Iterator it = lines.iterator(); it.hasNext(); )
{ {
@ -172,6 +174,7 @@ public class MavenITmng2883LegacyRepoOfflineTest
// execute once just to make sure this test works at all! // execute once just to make sure this test works at all!
try try
{ {
verifier.setLogFileName( "log-dep-a.txt" );
// this will ensure that all relevant plugins are present. // this will ensure that all relevant plugins are present.
verifier.executeGoal( "compile" ); verifier.executeGoal( "compile" );
} }
@ -191,6 +194,7 @@ public class MavenITmng2883LegacyRepoOfflineTest
try try
{ {
verifier.setLogFileName( "log-dep-b.txt" );
verifier.executeGoal( "compile" ); verifier.executeGoal( "compile" );
fail( "Build should fail with unresolvable dependency artifact." ); fail( "Build should fail with unresolvable dependency artifact." );
@ -205,7 +209,7 @@ public class MavenITmng2883LegacyRepoOfflineTest
missingMessages.add( "offline mode." ); missingMessages.add( "offline mode." );
missingMessages.add( "org.apache.maven.its.mng2883:dep:jar:1.0-SNAPSHOT" ); missingMessages.add( "org.apache.maven.its.mng2883:dep:jar:1.0-SNAPSHOT" );
List lines = verifier.loadFile( new File( testDir, "log.txt" ), false ); List lines = verifier.loadFile( new File( testDir, verifier.getLogFileName() ), false );
for ( Iterator it = lines.iterator(); it.hasNext(); ) for ( Iterator it = lines.iterator(); it.hasNext(); )
{ {
@ -272,6 +276,7 @@ public class MavenITmng2883LegacyRepoOfflineTest
try try
{ {
verifier.setLogFileName( "log-plugin-a.txt" );
verifier.executeGoal( "org.apache.maven.its.mng2883:plugin:1.0-SNAPSHOT:run" ); verifier.executeGoal( "org.apache.maven.its.mng2883:plugin:1.0-SNAPSHOT:run" );
fail( "Build should fail with unresolvable plugin artifact." ); fail( "Build should fail with unresolvable plugin artifact." );
@ -284,7 +289,7 @@ public class MavenITmng2883LegacyRepoOfflineTest
missingMessages.add( "System is offline." ); missingMessages.add( "System is offline." );
missingMessages.add( "org.apache.maven.its.mng2883:plugin:pom:1.0-SNAPSHOT" ); missingMessages.add( "org.apache.maven.its.mng2883:plugin:pom:1.0-SNAPSHOT" );
List lines = verifier.loadFile( new File( testDir, "log.txt" ), false ); List lines = verifier.loadFile( new File( testDir, verifier.getLogFileName() ), false );
for ( Iterator it = lines.iterator(); it.hasNext(); ) for ( Iterator it = lines.iterator(); it.hasNext(); )
{ {