Author: krosenvold Date: Sun May 8 19:04:50 2011 New Revision: 1100793 URL: http://svn.apache.org/viewvc?rev=1100793&view=rev Log: o Renamed a couple of files
Added: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterFactory.java (contents, props changed) - copied, changed from r1099923, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/plugin/surefire/report/ReporterManagerFactory.java maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleLogger.java (contents, props changed) - copied, changed from r1099923, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DirectConsoleReporter.java Removed: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/plugin/surefire/report/ReporterManagerFactory.java maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DirectConsoleReporter.java Modified: maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/MockReporter.java maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/TestSetMockReporterFactory.java maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ForkClient.java maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingRunListenerTest.java maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingReporterFactory.java maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AsynchRunListener.java maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultConsoleReporter.java maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultDirectConsoleReporter.java maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetRunListener.java maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/MockReporter.java maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/TestConsoleOutputRunListenerTest.java maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java Modified: maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java (original) +++ maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java Sun May 8 19:04:50 2011 @@ -87,7 +87,6 @@ public abstract class AbstractSurefireMo public void execute() throws MojoExecutionException, MojoFailureException { - if ( verifyParameters() && !hasExecutedBefore() ) { logReportsDirectory(); Modified: maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java (original) +++ maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java Sun May 8 19:04:50 2011 @@ -25,7 +25,7 @@ import java.util.Iterator; import java.util.Properties; import org.apache.maven.plugin.surefire.booterclient.output.ForkClient; import org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer; -import org.apache.maven.plugin.surefire.report.ReporterManagerFactory; +import org.apache.maven.plugin.surefire.report.FileReporterFactory; import org.apache.maven.surefire.booter.Classpath; import org.apache.maven.surefire.booter.ProviderConfiguration; import org.apache.maven.surefire.booter.ProviderFactory; @@ -107,8 +107,8 @@ public class ForkStarter private RunResult runSuitesForkOnce() throws SurefireBooterForkException { - final ReporterManagerFactory testSetReporterFactory = - new ReporterManagerFactory( startupReportConfiguration ); + final FileReporterFactory testSetReporterFactory = + new FileReporterFactory( startupReportConfiguration ); try { return fork( null, providerConfiguration.getProviderProperties(), testSetReporterFactory ); @@ -142,8 +142,8 @@ public class ForkStarter Properties properties = new Properties(); - final ReporterManagerFactory testSetReporterFactory = - new ReporterManagerFactory( startupReportConfiguration ); + final FileReporterFactory testSetReporterFactory = + new FileReporterFactory( startupReportConfiguration ); try { while ( suites.hasNext() ) Modified: maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/MockReporter.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/MockReporter.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/MockReporter.java (original) +++ maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/MockReporter.java Sun May 8 19:04:50 2011 @@ -23,7 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import org.apache.maven.surefire.report.ConsoleOutputReceiver; -import org.apache.maven.surefire.report.DirectConsoleReporter; +import org.apache.maven.surefire.report.ConsoleLogger; import org.apache.maven.surefire.report.ReportEntry; import org.apache.maven.surefire.report.RunListener; @@ -31,7 +31,7 @@ import org.apache.maven.surefire.report. * Internal use only */ public class MockReporter - implements RunListener, DirectConsoleReporter, ConsoleOutputReceiver + implements RunListener, ConsoleLogger, ConsoleOutputReceiver { private final List events = new ArrayList(); @@ -146,7 +146,7 @@ public class MockReporter } - public void writeMessage( String message ) + public void info( String message ) { events.add( CONSOLE_OUTPUT ); data.add( message ); Modified: maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/TestSetMockReporterFactory.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/TestSetMockReporterFactory.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/TestSetMockReporterFactory.java (original) +++ maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/TestSetMockReporterFactory.java Sun May 8 19:04:50 2011 @@ -19,24 +19,24 @@ package org.apache.maven.plugin.surefire * under the License. */ -import org.apache.maven.plugin.surefire.report.ReporterManagerFactory; +import org.apache.maven.plugin.surefire.report.FileReporterFactory; import org.apache.maven.surefire.booter.StartupReportConfiguration; import org.apache.maven.surefire.report.DefaultConsoleReporter; -import org.apache.maven.surefire.report.DirectConsoleReporter; +import org.apache.maven.surefire.report.ConsoleLogger; import org.apache.maven.surefire.report.RunListener; /** * @author Kristian Rosenvold */ public class TestSetMockReporterFactory - extends ReporterManagerFactory + extends FileReporterFactory { public TestSetMockReporterFactory() { super( StartupReportConfiguration.defaultValue() ); } - public DirectConsoleReporter createConsoleReporter() + public ConsoleLogger createConsoleLogger() { return new DefaultConsoleReporter( System.out ); } Modified: maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ForkClient.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ForkClient.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ForkClient.java (original) +++ maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ForkClient.java Sun May 8 19:04:50 2011 @@ -31,7 +31,7 @@ import java.util.StringTokenizer; import org.apache.maven.surefire.booter.ForkingRunListener; import org.apache.maven.surefire.report.CategorizedReportEntry; import org.apache.maven.surefire.report.ConsoleOutputReceiver; -import org.apache.maven.surefire.report.DirectConsoleReporter; +import org.apache.maven.surefire.report.ConsoleLogger; import org.apache.maven.surefire.report.ReportEntry; import org.apache.maven.surefire.report.ReporterException; import org.apache.maven.surefire.report.ReporterFactory; @@ -138,7 +138,7 @@ public class ForkClient ( (ConsoleOutputReceiver) reporter ).writeTestOutput( bytes, 0, len, false ); break; case ForkingRunListener.BOOTERCODE_CONSOLE: - ( (DirectConsoleReporter) reporter ).writeMessage( createConsoleMessage( remaining ) ); + ( (ConsoleLogger) reporter ).info( createConsoleMessage( remaining ) ); break; default: System.out.println( ">" + s ); Modified: maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingRunListenerTest.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingRunListenerTest.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingRunListenerTest.java (original) +++ maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingRunListenerTest.java Sun May 8 19:04:50 2011 @@ -28,7 +28,7 @@ import org.apache.maven.plugin.surefire. import org.apache.maven.surefire.booter.ForkingRunListener; import org.apache.maven.surefire.report.CategorizedReportEntry; import org.apache.maven.surefire.report.ConsoleOutputReceiver; -import org.apache.maven.surefire.report.DirectConsoleReporter; +import org.apache.maven.surefire.report.ConsoleLogger; import org.apache.maven.surefire.report.PojoStackTraceWriter; import org.apache.maven.surefire.report.ReportEntry; import org.apache.maven.surefire.report.ReporterException; @@ -175,8 +175,8 @@ public class ForkingRunListenerTest throws ReporterException, IOException { final StandardTestRun standardTestRun = new StandardTestRun(); - DirectConsoleReporter directConsoleReporter = (DirectConsoleReporter) standardTestRun.run(); - directConsoleReporter.writeMessage( "HeyYou" ); + ConsoleLogger directConsoleReporter = (ConsoleLogger) standardTestRun.run(); + directConsoleReporter.info( "HeyYou" ); standardTestRun.assertExpected( MockReporter.CONSOLE_OUTPUT, "HeyYou" ); } Copied: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterFactory.java (from r1099923, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/plugin/surefire/report/ReporterManagerFactory.java) URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterFactory.java?p2=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterFactory.java&p1=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/plugin/surefire/report/ReporterManagerFactory.java&r1=1099923&r2=1100793&rev=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/plugin/surefire/report/ReporterManagerFactory.java (original) +++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterFactory.java Sun May 8 19:04:50 2011 @@ -26,7 +26,7 @@ import org.apache.maven.surefire.booter. import org.apache.maven.surefire.report.AbstractConsoleReporter; import org.apache.maven.surefire.report.AbstractFileReporter; import org.apache.maven.surefire.report.DefaultDirectConsoleReporter; -import org.apache.maven.surefire.report.DirectConsoleReporter; +import org.apache.maven.surefire.report.ConsoleLogger; import org.apache.maven.surefire.report.MulticastingReporter; import org.apache.maven.surefire.report.Reporter; import org.apache.maven.surefire.report.ReporterConfiguration; @@ -44,7 +44,7 @@ import org.apache.maven.surefire.suite.R * * @author Kristian Rosenvold */ -public class ReporterManagerFactory +public class FileReporterFactory implements ReporterFactory { @@ -56,7 +56,7 @@ public class ReporterManagerFactory private final StartupReportConfiguration reportConfiguration; - public ReporterManagerFactory( StartupReportConfiguration reportConfiguration ) + public FileReporterFactory( StartupReportConfiguration reportConfiguration ) { this.reportConfiguration = reportConfiguration; this.reporterConfiguration = getReporterConfiguration( ); @@ -117,46 +117,46 @@ public class ReporterManagerFactory return globalStats.getRunResult(); } - public DirectConsoleReporter createConsoleReporter() + public ConsoleLogger createConsoleLogger() { return new DefaultDirectConsoleReporter( reporterConfiguration.getOriginalSystemOut() ); } public void runStarting() { - final DirectConsoleReporter consoleReporter = createConsoleReporter(); - consoleReporter.writeMessage( "" ); - consoleReporter.writeMessage( "-------------------------------------------------------" ); - consoleReporter.writeMessage( " T E S T S" ); - consoleReporter.writeMessage( "-------------------------------------------------------" ); + final ConsoleLogger consoleReporter = createConsoleLogger(); + consoleReporter.info( "" ); + consoleReporter.info( "-------------------------------------------------------" ); + consoleReporter.info( " T E S T S" ); + consoleReporter.info( "-------------------------------------------------------" ); } private void runCompleted() { - final DirectConsoleReporter consoleReporter = createConsoleReporter(); - consoleReporter.writeMessage( "" ); - consoleReporter.writeMessage( "Results :" ); - consoleReporter.writeMessage( "" ); + final ConsoleLogger consoleReporter = createConsoleLogger(); + consoleReporter.info( "" ); + consoleReporter.info( "Results :" ); + consoleReporter.info( "" ); if ( globalStats.hadFailures() ) { multicastingReporter.writeMessage( "Failed tests: " ); for ( Iterator iterator = this.globalStats.getFailureSources().iterator(); iterator.hasNext(); ) { - consoleReporter.writeMessage( " " + iterator.next() ); + consoleReporter.info( " " + iterator.next() ); } - consoleReporter.writeMessage( "" ); + consoleReporter.info( "" ); } if ( globalStats.hadErrors() ) { - consoleReporter.writeMessage( "Tests in error: " ); + consoleReporter.info( "Tests in error: " ); for ( Iterator iterator = this.globalStats.getErrorSources().iterator(); iterator.hasNext(); ) { - consoleReporter.writeMessage( " " + iterator.next() ); + consoleReporter.info( " " + iterator.next() ); } - consoleReporter.writeMessage( "" ); + consoleReporter.info( "" ); } - consoleReporter.writeMessage( globalStats.getSummary() ); - consoleReporter.writeMessage( "" ); + consoleReporter.info( globalStats.getSummary() ); + consoleReporter.info( "" ); } public RunStatistics getGlobalRunStatistics() Propchange: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/plugin/surefire/report/FileReporterFactory.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingReporterFactory.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingReporterFactory.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingReporterFactory.java (original) +++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingReporterFactory.java Sun May 8 19:04:50 2011 @@ -20,7 +20,7 @@ package org.apache.maven.surefire.booter */ import java.io.PrintStream; -import org.apache.maven.surefire.report.DirectConsoleReporter; +import org.apache.maven.surefire.report.ConsoleLogger; import org.apache.maven.surefire.report.ReporterFactory; import org.apache.maven.surefire.report.RunListener; import org.apache.maven.surefire.report.RunStatistics; @@ -67,7 +67,7 @@ public class ForkingReporterFactory return new RunStatistics(); } - public DirectConsoleReporter createConsoleReporter() + public ConsoleLogger createConsoleLogger() { return new ForkingRunListener( originalSystemOut, ROOT_CHANNEl.intValue(), isTrimstackTrace.booleanValue() ); } Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java (original) +++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ForkingRunListener.java Sun May 8 19:04:50 2011 @@ -19,8 +19,11 @@ package org.apache.maven.surefire.booter * under the License. */ +import java.io.PrintStream; +import java.util.Enumeration; +import java.util.Properties; +import org.apache.maven.surefire.report.ConsoleLogger; import org.apache.maven.surefire.report.ConsoleOutputReceiver; -import org.apache.maven.surefire.report.DirectConsoleReporter; import org.apache.maven.surefire.report.ReportEntry; import org.apache.maven.surefire.report.RunListener; import org.apache.maven.surefire.report.StackTraceWriter; @@ -28,17 +31,13 @@ import org.apache.maven.surefire.util.in import org.apache.maven.surefire.util.internal.StreamUtils; import org.apache.maven.surefire.util.internal.StringUtils; -import java.io.PrintStream; -import java.util.Enumeration; -import java.util.Properties; - /** * Encodes the full output of the test run to the stdout stream * * @author Kristian Rosenvold */ public class ForkingRunListener - implements RunListener, DirectConsoleReporter, ConsoleOutputReceiver + implements RunListener, ConsoleLogger, ConsoleOutputReceiver { public static final byte BOOTERCODE_TESTSET_STARTING = (byte) '1'; @@ -199,7 +198,7 @@ public class ForkingRunListener 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' }; - public void writeMessage( String message ) + public void info( String message ) { byte[] buf = message.getBytes(); ByteBuffer byteBuffer = new ByteBuffer( buf.length * 6 ); Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java (original) +++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java Sun May 8 19:04:50 2011 @@ -26,7 +26,7 @@ import java.lang.reflect.InvocationHandl import java.lang.reflect.Method; import java.util.List; import java.util.Properties; -import org.apache.maven.plugin.surefire.report.ReporterManagerFactory; +import org.apache.maven.plugin.surefire.report.FileReporterFactory; import org.apache.maven.surefire.providerapi.ProviderParameters; import org.apache.maven.surefire.report.ReporterConfiguration; import org.apache.maven.surefire.report.ReporterFactory; @@ -227,7 +227,7 @@ public class SurefireReflector new Class[]{ this.startupReportConfiguration }; Object src = createStartupReportConfiguration( startupReportConfiguration ); Object[] params = new Object[]{ src }; - return ReflectionUtils.instantiateObject( ReporterManagerFactory.class.getName(), args, params, + return ReflectionUtils.instantiateObject( FileReporterFactory.class.getName(), args, params, surefireClassLoader ); } Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AsynchRunListener.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AsynchRunListener.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AsynchRunListener.java (original) +++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AsynchRunListener.java Sun May 8 19:04:50 2011 @@ -29,7 +29,7 @@ import org.apache.maven.surefire.util.in * <p/> */ public class AsynchRunListener - implements RunListener, ConsoleOutputReceiver, DirectConsoleReporter + implements RunListener, ConsoleOutputReceiver, ConsoleLogger { private final LinkedBlockingQueue blockingQueue = new LinkedBlockingQueue(); @@ -216,13 +216,13 @@ public class AsynchRunListener blockingQueue.add( new JoinableTestOutput( buf, off, len, stdout, consoleOutputReceiver ) ); } - public void writeMessage( final String message ) + public void info( final String message ) { blockingQueue.add( new Runnable() { public void run() { - ( (DirectConsoleReporter) consoleOutputReceiver ).writeMessage( message ); + ( (ConsoleLogger) consoleOutputReceiver ).info( message ); } } ); } Copied: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleLogger.java (from r1099923, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DirectConsoleReporter.java) URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleLogger.java?p2=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleLogger.java&p1=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DirectConsoleReporter.java&r1=1099923&r2=1100793&rev=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DirectConsoleReporter.java (original) +++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleLogger.java Sun May 8 19:04:50 2011 @@ -21,13 +21,13 @@ package org.apache.maven.surefire.report /** * Allows providers to write console messages on the running maven process. - * + * <p/> * This output is associated with the entire test run and not a specific - * test, which means it just goes straight to the console immediately. - * - s* <p/> + * test, which means it just goes "straight" to the console "immediately". + * <p/> + * s* <p/> */ -public interface DirectConsoleReporter +public interface ConsoleLogger { - public void writeMessage( String message ); + public void info( String message ); } Propchange: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleLogger.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultConsoleReporter.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultConsoleReporter.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultConsoleReporter.java (original) +++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultConsoleReporter.java Sun May 8 19:04:50 2011 @@ -25,7 +25,7 @@ import java.io.PrintStream; * @author <a href="mailto:krist...@zenior.no">Kristian Rosenvold</a> */ public class DefaultConsoleReporter - implements DirectConsoleReporter + implements ConsoleLogger { private final PrintStream systemOut; @@ -34,7 +34,7 @@ public class DefaultConsoleReporter this.systemOut = systemOut; } - public void writeMessage( String message ) + public void info( String message ) { systemOut.println( message ); } Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultDirectConsoleReporter.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultDirectConsoleReporter.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultDirectConsoleReporter.java (original) +++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultDirectConsoleReporter.java Sun May 8 19:04:50 2011 @@ -6,7 +6,7 @@ import java.io.PrintStream; * @author <a href="mailto:krist...@zenior.no">Kristian Rosenvold</a> */ public class DefaultDirectConsoleReporter - implements DirectConsoleReporter + implements ConsoleLogger { private final PrintStream systemOut; @@ -14,7 +14,7 @@ public class DefaultDirectConsoleReporte this.systemOut = systemOut; } - public void writeMessage(String message) { + public void info( String message ) { systemOut.println(message); } } Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java (original) +++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java Sun May 8 19:04:50 2011 @@ -35,12 +35,12 @@ public interface ReporterFactory RunListener createReporter(); /** - * Creates a ConsoleReporter, that allows providers to write messages to the running maven console. + * Creates a ConsoleLogger, that allows providers to write messages to the running maven console. * This output is not associated with any thread/test and appears immediately. * * @return a ConsoleReporter */ - DirectConsoleReporter createConsoleReporter(); + ConsoleLogger createConsoleLogger(); /** * Closes the factory, freeing resources allocated in the factory. Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetRunListener.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetRunListener.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetRunListener.java (original) +++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetRunListener.java Sun May 8 19:04:50 2011 @@ -31,7 +31,7 @@ import org.apache.maven.surefire.util.in */ public class TestSetRunListener implements RunListener, Reporter, ConsoleOutputReceiver, - DirectConsoleReporter // todo: Does this have to be a reporter ? + ConsoleLogger // todo: Does this have to be a reporter ? { private final TestSetStatistics testSetStatistics; @@ -70,11 +70,15 @@ public class TestSetRunListener this.globalStatistics = globalStats; } - public void writeMessage( String message ) + public void info( String message ) { multicastingReporter.writeMessage( message ); } + public void writeMessage( String message ) + { + info( message ); + } public void writeMessage( byte[] b, int off, int len ) { Modified: maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/MockReporter.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/MockReporter.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/MockReporter.java (original) +++ maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/MockReporter.java Sun May 8 19:04:50 2011 @@ -27,7 +27,7 @@ import java.util.concurrent.atomic.Atomi * Internal use only */ public class MockReporter - implements RunListener, DirectConsoleReporter + implements RunListener, ConsoleLogger { private final List events = new ArrayList(); @@ -159,7 +159,7 @@ public class MockReporter //To change body of implemented methods use File | Settings | File Templates. } - public void writeMessage( String message ) + public void info( String message ) { events.add( CONSOLE_OUTPUT ); data.add( message ); Modified: maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/TestConsoleOutputRunListenerTest.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/TestConsoleOutputRunListenerTest.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/TestConsoleOutputRunListenerTest.java (original) +++ maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/TestConsoleOutputRunListenerTest.java Sun May 8 19:04:50 2011 @@ -20,7 +20,7 @@ package org.apache.maven.surefire.report */ import java.io.File; -import org.apache.maven.plugin.surefire.report.ReporterManagerFactory; +import org.apache.maven.plugin.surefire.report.FileReporterFactory; import org.apache.maven.surefire.booter.StartupReportConfiguration; import junit.framework.TestCase; @@ -50,7 +50,7 @@ public class TestConsoleOutputRunListene private ReporterFactory createReporterFactory() { - return new ReporterManagerFactory( StartupReportConfiguration.defaultValue() ); + return new FileReporterFactory( StartupReportConfiguration.defaultValue() ); } public static ReporterConfiguration getTestReporterConfiguration() Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java (original) +++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java Sun May 8 19:04:50 2011 @@ -170,7 +170,7 @@ public abstract class ConcurrentReporter else { // No test running, just dump the message "somewhere" - reporterFactory.createConsoleReporter().writeMessage( new String( buf, off, len ) ); + reporterFactory.createConsoleLogger().info( new String( buf, off, len ) ); } } Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java (original) +++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java Sun May 8 19:04:50 2011 @@ -29,7 +29,6 @@ import org.apache.maven.surefire.provide import org.apache.maven.surefire.providerapi.ProviderParameters; import org.apache.maven.surefire.report.ConsoleOutputCapture; import org.apache.maven.surefire.report.ConsoleOutputReceiver; -import org.apache.maven.surefire.report.ReporterConfiguration; import org.apache.maven.surefire.report.ReporterException; import org.apache.maven.surefire.report.ReporterFactory; import org.apache.maven.surefire.report.RunListener; @@ -60,12 +59,9 @@ public class JUnitCoreProvider private TestsToRun testsToRun; - private final ReporterConfiguration reporterConfiguration; - public JUnitCoreProvider( ProviderParameters booterParameters ) { this.providerParameters = booterParameters; - reporterConfiguration = booterParameters.getReporterConfiguration(); this.testClassLoader = booterParameters.getTestClassLoader(); this.directoryScanner = booterParameters.getDirectoryScanner(); this.jUnitCoreParameters = new JUnitCoreParameters( booterParameters.getProviderProperties() ); @@ -92,7 +88,7 @@ public class JUnitCoreProvider final String message = "Concurrency config is " + jUnitCoreParameters.toString() + "\n"; final ReporterFactory reporterFactory = providerParameters.getReporterFactory(); - reporterFactory.createConsoleReporter().writeMessage( message ); + reporterFactory.createConsoleLogger().info( message ); if ( testsToRun == null ) { Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java (original) +++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java Sun May 8 19:04:50 2011 @@ -25,7 +25,7 @@ import java.io.File; import java.io.PrintStream; import java.util.HashMap; import java.util.Map; -import org.apache.maven.plugin.surefire.report.ReporterManagerFactory; +import org.apache.maven.plugin.surefire.report.FileReporterFactory; import org.apache.maven.surefire.booter.StartupReportConfiguration; import org.apache.maven.surefire.report.ReporterConfiguration; import org.apache.maven.surefire.report.ReporterFactory; @@ -396,7 +396,7 @@ public class ConcurrentReporterManagerTe private ReporterFactory createReporterFactory() { - return new ReporterManagerFactory( StartupReportConfiguration.defaultNoXml() ); + return new FileReporterFactory( StartupReportConfiguration.defaultNoXml() ); } public static ReporterConfiguration getTestReporterConfiguration() Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java?rev=1100793&r1=1100792&r2=1100793&view=diff ============================================================================== --- maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java (original) +++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java Sun May 8 19:04:50 2011 @@ -18,7 +18,7 @@ package org.apache.maven.surefire.junitc import java.io.File; import java.util.HashMap; -import org.apache.maven.plugin.surefire.report.ReporterManagerFactory; +import org.apache.maven.plugin.surefire.report.FileReporterFactory; import org.apache.maven.surefire.booter.StartupReportConfiguration; import org.apache.maven.surefire.report.ReporterConfiguration; import org.apache.maven.surefire.report.ReporterFactory; @@ -118,7 +118,7 @@ public class MavenSurefireJUnit47RunnerT throws Exception { ReporterFactory reporterManagerFactory = - new ReporterManagerFactory( StartupReportConfiguration.defaultNoXml() ); + new FileReporterFactory( StartupReportConfiguration.defaultNoXml() ); final HashMap<String, TestSet> classMethodCounts = new HashMap<String, TestSet>(); RunListener reporter = ConcurrentReporterManager.createInstance( classMethodCounts, reporterManagerFactory,