Skip to content

Commit

Permalink
o Moved some classes around a bit, tidied the package structure
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/maven/surefire/trunk@1236422 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
krosenvold committed Jan 26, 2012
1 parent 4071d48 commit 5ecdf5a
Show file tree
Hide file tree
Showing 37 changed files with 92 additions and 63 deletions.
4 changes: 2 additions & 2 deletions maven-surefire-common/pom.xml
Expand Up @@ -112,8 +112,8 @@
</artifactSet>
<relocations>
<relocation>
<pattern>org.codehaus.plexus.util</pattern>
<shadedPattern>org.apache.maven.plugin.surefire.report.plexus.util</shadedPattern>
<pattern>org.codehaus.plexus.util.xml</pattern>
<shadedPattern>org.apache.maven.plugin.surefire.report.plexus.util.xml</shadedPattern>
</relocation>
</relocations>
</configuration>
Expand Down
Expand Up @@ -57,7 +57,6 @@
import org.apache.maven.surefire.booter.ProviderConfiguration;
import org.apache.maven.surefire.booter.ProviderParameterNames;
import org.apache.maven.surefire.booter.StartupConfiguration;
import org.apache.maven.surefire.booter.StartupReportConfiguration;
import org.apache.maven.surefire.booter.SurefireBooterForkException;
import org.apache.maven.surefire.booter.SurefireExecutionException;
import org.apache.maven.surefire.report.ReporterConfiguration;
Expand Down
Expand Up @@ -22,7 +22,6 @@
import java.io.File;
import java.lang.reflect.Constructor;
import org.apache.maven.plugin.surefire.report.FileReporterFactory;
import org.apache.maven.surefire.booter.StartupReportConfiguration;
import org.apache.maven.surefire.util.ReflectionUtils;
import org.apache.maven.surefire.util.SurefireReflectionException;

Expand Down
Expand Up @@ -22,7 +22,6 @@
import org.apache.maven.surefire.booter.ProviderConfiguration;
import org.apache.maven.surefire.booter.ProviderFactory;
import org.apache.maven.surefire.booter.StartupConfiguration;
import org.apache.maven.surefire.booter.StartupReportConfiguration;
import org.apache.maven.surefire.booter.SurefireExecutionException;
import org.apache.maven.surefire.suite.RunResult;

Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.booter;
package org.apache.maven.plugin.surefire;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand All @@ -22,18 +22,18 @@
import java.io.File;
import java.io.PrintStream;
import java.util.Properties;
import org.apache.maven.plugin.surefire.report.AbstractConsoleReporter;
import org.apache.maven.plugin.surefire.report.AbstractFileReporter;
import org.apache.maven.plugin.surefire.report.BriefConsoleReporter;
import org.apache.maven.plugin.surefire.report.BriefFileReporter;
import org.apache.maven.plugin.surefire.report.ConsoleOutputDirectReporter;
import org.apache.maven.plugin.surefire.report.ConsoleOutputFileReporter;
import org.apache.maven.plugin.surefire.report.ConsoleReporter;
import org.apache.maven.plugin.surefire.report.DetailedConsoleReporter;
import org.apache.maven.plugin.surefire.report.FileReporter;
import org.apache.maven.plugin.surefire.report.Reporter;
import org.apache.maven.plugin.surefire.report.XMLReporter;
import org.apache.maven.plugin.surefire.runorder.StatisticsReporter;
import org.apache.maven.surefire.report.AbstractConsoleReporter;
import org.apache.maven.surefire.report.AbstractFileReporter;
import org.apache.maven.surefire.report.BriefConsoleReporter;
import org.apache.maven.surefire.report.BriefFileReporter;
import org.apache.maven.surefire.report.ConsoleOutputDirectReporter;
import org.apache.maven.surefire.report.ConsoleOutputFileReporter;
import org.apache.maven.surefire.report.ConsoleReporter;
import org.apache.maven.surefire.report.DetailedConsoleReporter;
import org.apache.maven.surefire.report.FileReporter;
import org.apache.maven.surefire.report.Reporter;
import org.apache.maven.surefire.report.XMLReporter2;

/**
* All the parameters used to construct reporters
Expand Down Expand Up @@ -135,11 +135,11 @@ public File getReportsDirectory()
return reportsDirectory;
}

public XMLReporter2 instantiateXmlReporter()
public XMLReporter instantiateXmlReporter()
{
if ( !isDisableXmlReport() )
{
return new XMLReporter2( trimStackTrace, reportsDirectory, reportNameSuffix );
return new XMLReporter( trimStackTrace, reportsDirectory, reportNameSuffix );
}
return null;
}
Expand Down
Expand Up @@ -30,11 +30,11 @@
import java.util.jar.JarEntry;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
import org.apache.maven.plugin.surefire.util.Relocator;
import org.apache.maven.surefire.booter.ClassLoaderConfiguration;
import org.apache.maven.surefire.booter.Classpath;
import org.apache.maven.surefire.booter.ForkedBooter;
import org.apache.maven.surefire.booter.SurefireBooterForkException;
import org.apache.maven.surefire.util.Relocator;
import org.apache.maven.surefire.util.UrlUtils;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.cli.Commandline;
Expand Down
Expand Up @@ -32,6 +32,7 @@
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import org.apache.maven.plugin.surefire.CommonReflector;
import org.apache.maven.plugin.surefire.StartupReportConfiguration;
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.FileReporterFactory;
Expand All @@ -40,7 +41,6 @@
import org.apache.maven.surefire.booter.ProviderConfiguration;
import org.apache.maven.surefire.booter.ProviderFactory;
import org.apache.maven.surefire.booter.StartupConfiguration;
import org.apache.maven.surefire.booter.StartupReportConfiguration;
import org.apache.maven.surefire.booter.SurefireBooterForkException;
import org.apache.maven.surefire.booter.SurefireExecutionException;
import org.apache.maven.surefire.booter.SystemPropertyManager;
Expand Down
Expand Up @@ -19,8 +19,8 @@
* under the License.
*/

import org.apache.maven.surefire.util.internal.BlockingQueue;
import org.apache.maven.surefire.util.internal.Java15BlockingQueue;
import org.apache.maven.plugin.surefire.util.internal.BlockingQueue;
import org.apache.maven.plugin.surefire.util.internal.Java15BlockingQueue;
import org.codehaus.plexus.util.cli.StreamConsumer;

/**
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand All @@ -23,6 +23,8 @@
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.PrintWriter;
import org.apache.maven.surefire.report.ReportEntry;
import org.apache.maven.surefire.report.ReporterException;

/**
* Base class for console reporters.
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand All @@ -23,6 +23,8 @@
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import org.apache.maven.surefire.report.ReportEntry;
import org.apache.maven.surefire.report.ReporterException;

/**
* Base class for file reporters.
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand All @@ -22,6 +22,9 @@
import java.io.File;
import java.text.NumberFormat;
import java.util.Locale;
import org.apache.maven.surefire.report.ReportEntry;
import org.apache.maven.surefire.report.ReporterException;
import org.apache.maven.surefire.report.StackTraceWriter;

/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand All @@ -22,6 +22,8 @@
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import org.apache.maven.surefire.report.ReportEntry;
import org.apache.maven.surefire.report.ReporterException;

/**
* Text based reporter.
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand All @@ -20,6 +20,7 @@
*/

import java.io.PrintStream;
import org.apache.maven.surefire.report.ReportEntry;

/**
* Outputs test system out/system err directly to the console
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand All @@ -25,6 +25,8 @@
import java.io.IOException;
import java.io.PrintWriter;

import org.apache.maven.surefire.report.ReportEntry;
import org.apache.maven.surefire.report.ReporterException;
import org.apache.maven.surefire.util.NestedRuntimeException;

/**
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand Down
Expand Up @@ -19,23 +19,19 @@
* under the License.
*/

import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import org.apache.maven.plugin.surefire.StartupReportConfiguration;
import org.apache.maven.plugin.surefire.runorder.StatisticsReporter;
import org.apache.maven.surefire.booter.StartupReportConfiguration;
import org.apache.maven.surefire.report.ConsoleLogger;
import org.apache.maven.surefire.report.DefaultDirectConsoleReporter;
import org.apache.maven.surefire.report.MulticastingReporter;
import org.apache.maven.surefire.report.Reporter;
import org.apache.maven.surefire.report.ReporterConfiguration;
import org.apache.maven.surefire.report.ReporterFactory;
import org.apache.maven.surefire.report.RunListener;
import org.apache.maven.surefire.report.RunStatistics;
import org.apache.maven.surefire.report.TestSetRunListener;
import org.apache.maven.surefire.suite.RunResult;

import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;

/**
* Provides RunListener implementations to the providers.
* <p/>
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand All @@ -20,6 +20,8 @@
*/

import java.util.List;
import org.apache.maven.surefire.report.CategorizedReportEntry;
import org.apache.maven.surefire.report.ReportEntry;

/**
* A reporter that broadcasts to other reporters
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand All @@ -19,6 +19,9 @@
* under the License.
*/

import org.apache.maven.surefire.report.ReportEntry;
import org.apache.maven.surefire.report.ReporterException;

/**
* Persists reports somewhere
* <p/>
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand All @@ -20,6 +20,12 @@
*/

import org.apache.maven.plugin.surefire.runorder.StatisticsReporter;
import org.apache.maven.surefire.report.ConsoleLogger;
import org.apache.maven.surefire.report.ConsoleOutputReceiver;
import org.apache.maven.surefire.report.ReportEntry;
import org.apache.maven.surefire.report.RunListener;
import org.apache.maven.surefire.report.RunStatistics;
import org.apache.maven.surefire.report.TestSetStatistics;
import org.apache.maven.surefire.util.internal.ByteBuffer;

import java.util.ArrayList;
Expand All @@ -46,7 +52,7 @@ public class TestSetRunListener


public TestSetRunListener( AbstractConsoleReporter consoleReporter, AbstractFileReporter fileReporter,
XMLReporter2 xmlReporter, Reporter reporter, StatisticsReporter statisticsReporter,
XMLReporter xmlReporter, Reporter reporter, StatisticsReporter statisticsReporter,
RunStatistics globalStats )
{

Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.report;
package org.apache.maven.plugin.surefire.report;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -33,6 +33,8 @@
import java.util.List;
import java.util.Properties;
import java.util.StringTokenizer;
import org.apache.maven.surefire.report.ReportEntry;
import org.apache.maven.surefire.report.ReporterException;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import org.codehaus.plexus.util.xml.Xpp3DomWriter;
Expand Down Expand Up @@ -70,7 +72,7 @@
* @see <a href="http://wiki.apache.org/ant/Proposals/EnhancedTestReports">Ant's format enhancement proposal</a>
* (not yet implemented by Ant 1.8.2)
*/
public class XMLReporter2
public class XMLReporter
extends AbstractReporter
{
private static final String LS = System.getProperty( "line.separator" );
Expand All @@ -85,12 +87,12 @@ public class XMLReporter2

private int elapsed = 0;

public XMLReporter2( boolean trimStackTrace, File reportsDirectory )
public XMLReporter( boolean trimStackTrace, File reportsDirectory )
{
this( trimStackTrace, reportsDirectory, null );
}

public XMLReporter2( boolean trimStackTrace, File reportsDirectory, String reportNameSuffix )
public XMLReporter( boolean trimStackTrace, File reportsDirectory, String reportNameSuffix )
{
super( trimStackTrace );
this.reportsDirectory = reportsDirectory;
Expand Down
Expand Up @@ -21,8 +21,8 @@

import java.io.File;
import java.io.FileNotFoundException;
import org.apache.maven.plugin.surefire.report.Reporter;
import org.apache.maven.surefire.report.ReportEntry;
import org.apache.maven.surefire.report.Reporter;
import org.apache.maven.surefire.util.NestedRuntimeException;

/**
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.util;
package org.apache.maven.plugin.surefire.util;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand Down
@@ -1,4 +1,4 @@
package org.apache.maven.surefire.util.internal;
package org.apache.maven.plugin.surefire.util.internal;

/*
* Licensed to the Apache Software Foundation (ASF) under one
Expand Down

0 comments on commit 5ecdf5a

Please sign in to comment.