[jboss-svn-commits] JBL Code SVN: r15767 - in labs/jbossbuild/maven-surefire-jboss/trunk: maven-surefire-plugin and 180 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Oct 11 12:47:01 EDT 2007


Author: pgier
Date: 2007-10-11 12:47:00 -0400 (Thu, 11 Oct 2007)
New Revision: 15767

Added:
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test1/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test1/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test1/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test1/src/test/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test1/src/test/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test1/src/test/java/SurefireTest1.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test2/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test2/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test2/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test2/src/test/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test2/src/test/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test2/src/test/java/SurefireTest2.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test3/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test3/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test3/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test3/src/test/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test3/src/test/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test3/src/test/java/SurefireTest3.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/src/test-data/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/src/test-data/testng.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/src/test/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/src/test/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/src/test/java/TestNGSuiteTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test5/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test5/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test5/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test5/src/test/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test5/src/test/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test5/src/test/java/TestNGJavadocTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test6/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test6/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test6/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test6/src/test/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test6/src/test/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test6/src/test/java/TestNGTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/src/test/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/src/test/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/src/test/java/JunitTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/src/test/java/TestNGJunitTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test8/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test8/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test8/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test8/src/test/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test8/src/test/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test8/src/test/java/TestNGTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/testArgLine/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/testArgLine/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/testArgLine/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/testArgLine/src/test/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/testArgLine/src/test/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/testArgLine/src/test/java/SurefireTest1.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/apache/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/test/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/class-loading.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/forking.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/single-test.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/skipping-test.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/system-properties.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/testng.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/index.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/introduction.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/testng.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/usage.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/fml/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/fml/faq.fml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/site.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestCase.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestSuite.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportOnlyMojo.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/resources/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/resources/META-INF/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/resources/META-INF/maven/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/resources/META-INF/maven/lifecycle.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/resources/surefire-report.properties
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/changing-report-name.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/cross-referencing.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/report-custom-location.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/show-failures.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/index.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/usage.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/fml/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/fml/faq.fml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/images/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/images/failure-details.PNG
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/images/surefire-sample1.PNG
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/images/surefire-sample2.PNG
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/images/xref.PNG
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/site.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/ReportTestCaseTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/ReportTestSuiteTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportParserTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-NoPackageTest.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-NoTimeTestCaseTest.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-com.shape.CircleTest.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-com.shape.PointTest.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/com.shape.CircleTest.txt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/com.shapeclone.CircleTest.txt
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/plugin-config.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/surefire-reports/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/surefire-reports/TEST-com.shape.CircleTest.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/plugin-config.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/surefire-reports/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/surefire-reports/TEST-com.shape.CircleTest.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/plugin-config.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/surefire-reports/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/surefire-reports/TEST-com.shape.CircleTest.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/plugin-config.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/surefire-reports/
   labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/surefire-reports/TEST-com.shape.CircleTest.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/src/site/
   labs/jbossbuild/maven-surefire-jboss/trunk/src/site/apt/
   labs/jbossbuild/maven-surefire-jboss/trunk/src/site/apt/maven-surefire-plugin/
   labs/jbossbuild/maven-surefire-jboss/trunk/src/site/apt/maven-surefire-plugin/index.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/src/site/apt/maven-surefire-report-plugin/
   labs/jbossbuild/maven-surefire-jboss/trunk/src/site/apt/maven-surefire-report-plugin/index.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/src/site/site.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/appended-resources/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/appended-resources/META-INF/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/appended-resources/META-INF/NOTICE
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/Surefire.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/ComparisonTool.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireAssert.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireAssertionFailedException.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireComparisonFailureException.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractFileReporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractTextReporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefConsoleReporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefFileReporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleReporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DetailedConsoleReporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/FileReporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ForkingConsoleReporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/PojoStackTraceWriter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterException.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/StackTraceWriter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/XMLReporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/AbstractDirectoryTestSuite.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/SurefireTestSuite.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/AbstractTestSet.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/PojoTestSet.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/SurefireTestSet.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/TestSetFailedException.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedCheckedException.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedRuntimeException.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/PrettyPrintXMLWriter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TeeStream.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/UrlUtils.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/resources/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/resources/org/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/resources/org/apache/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/resources/org/apache/maven/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/resources/org/apache/maven/surefire/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/resources/org/apache/maven/surefire/surefire.properties
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/site/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/site/apt/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/site/apt/index.apt
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/assertion/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/assertion/ComparisonToolTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/assertion/SurefireAssertTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/AbstractConsoleReporterTestCase.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/ForkingConsoleReporterTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/XMLReporterTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/util/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/util/UrlUtilsTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/name-output.txt
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkConfiguration.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkingWriterStreamConsumer.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/IsolatedClassLoader.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireExecutionException.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxy.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumer.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/OutputConsumer.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/OutputConsumerProxy.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/PrintWriterOutputConsumer.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/StandardOutputConsumer.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/SupressFooterOutputConsumerProxy.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/SupressHeaderOutputConsumerProxy.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/CmdShell.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/CommandShell.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/Shell.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/AbstractOutputConsumerTestCase.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxyTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumerTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/OutputConsumerProxyTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/PrintWriterOutputConsumerTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/StandardOutputConsumerTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/SupressFooterOutputConsumerProxyTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/SupressHeaderOutputConsumerProxyTest.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitDirectoryTestSuite.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitStackTraceWriter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4DirectoryTestSuite.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4StackTraceWriter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSet.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSetReporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGStackTraceWriter.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGTestSet.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/Configurator.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG4751Configurator.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG52Configurator.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/pom.xml
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/css/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/css/maven-theme.css
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/apache-maven-project-2.png
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/banner.jpg
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/bg.jpg
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/breadcrumbs.jpg
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/collapsed.gif
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/expanded.gif
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/h3.jpg
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/h5.jpg
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/logo_apache.jpg
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/logo_maven.jpg
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/maven-logo-2.gif
   labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/site.xml
Modified:
   labs/jbossbuild/maven-surefire-jboss/trunk/
Log:
Initial checkin of surefire 2.4-SNAPSHOT


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk
___________________________________________________________________
Name: svn:ignore
   + bin
.git
target
.classpath
.project


Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>surefire</artifactId>
+    <groupId>org.apache.maven.surefire</groupId>
+    <version>2.4-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>maven-surefire-plugin</artifactId>
+  <groupId>org.apache.maven.plugins</groupId>
+  <packaging>maven-plugin</packaging>
+  <name>Maven Surefire Plugin</name>
+  <prerequisites>
+    <maven>2.0</maven>
+  </prerequisites>
+  <mailingLists>
+    <!-- duplication from maven-plugins pom - temporary until they inherit properly -->
+    <mailingList>
+      <name>Maven User List</name>
+      <subscribe>users-subscribe at maven.apache.org</subscribe>
+      <unsubscribe>users-unsubscribe at maven.apache.org</unsubscribe>
+      <post>users at maven.apache.org</post>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-users</archive>
+      <otherArchives>
+        <otherArchive>http://www.mail-archive.com/users@maven.apache.org/</otherArchive>
+        <otherArchive>http://www.nabble.com/Maven---Users-f178.html</otherArchive>
+      </otherArchives>
+    </mailingList>
+    <mailingList>
+      <name>Maven Developer List</name>
+      <subscribe>dev-subscribe at maven.apache.org</subscribe>
+      <unsubscribe>dev-unsubscribe at maven.apache.org</unsubscribe>
+      <post>dev at maven.apache.org</post>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
+    </mailingList>
+    <mailingList>
+      <name>Maven Commits List</name>
+      <subscribe>commits-subscribe at maven.apache.org</subscribe>
+      <unsubscribe>commits-unsubscribe at maven.apache.org</unsubscribe>
+      <post>commits at maven.apache.org</post>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
+    </mailingList>
+    <!-- duplication from maven-parent pom - temporary until they inherit properly -->
+    <mailingList>
+      <name>Maven Announcements List</name>
+      <post>announce at maven.apache.org</post>
+      <subscribe>announce-subscribe at maven.apache.org</subscribe>
+      <unsubscribe>announce-unsubscribe at maven.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
+    </mailingList>
+    <mailingList>
+      <name>Maven Issues List</name>
+      <post>issues at maven.apache.org</post>
+      <subscribe>issues-subscribe at maven.apache.org</subscribe>
+      <unsubscribe>issues-unsubscribe at maven.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-issues/</archive>
+    </mailingList>
+    <mailingList>
+      <name>Maven Notifications List</name>
+      <post>notifications at maven.apache.org</post>
+      <subscribe>notifications-subscribe at maven.apache.org</subscribe>
+      <unsubscribe>notifications-unsubscribe at maven.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-notifications/</archive>
+    </mailingList>
+  </mailingLists>
+  <contributors>
+    <contributor>
+      <name>Joakim Erdfelt</name>
+      <email>joakim at erdfelt.com</email>
+    </contributor>
+  </contributors>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.surefire</groupId>
+      <artifactId>surefire-booter</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact</artifactId>
+      <version>2.0</version>
+    </dependency>
+  </dependencies>
+
+  <profiles>
+    <!-- Force JDK 1.4 for this one, plugins can never be built on 1.3 -->
+    <profile>
+      <id>jdk1.3</id>
+      <build>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <artifactId>maven-compiler-plugin</artifactId>
+              <configuration>
+                <fork>false</fork>
+                <compilerVersion>1.4</compilerVersion>
+              </configuration>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+    </profile>
+    <profile>
+      <id>ci</id>
+      <activation>
+        <property>
+          <name>enableCiProfile</name>
+          <value>true</value>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-docck-plugin</artifactId>
+            <version>1.0-beta-1</version>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>check</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+  <distributionManagement>
+    <site>
+      <id>apache.website</id>
+      <url>scp://people.apache.org/www/maven.apache.org/plugins/maven-surefire-plugin</url>
+    </site>
+  </distributionManagement>
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>it</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+  <name>Surefire plugin integration tests</name>
+
+  <modules>
+    <module>test1</module>
+    <module>test2</module>
+    <module>test3</module>
+    <module>test4</module>
+    <module>test5</module>
+    <module>test6</module>
+    <module>test7</module>
+    <module>test8</module>
+    <module>testArgLine</module>
+  </modules>
+
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test1/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test1/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test1/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>test1</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>Test for default configuration</name>
+  <description>Test for default surefire configuration</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test1/src/test/java/SurefireTest1.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test1/src/test/java/SurefireTest1.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test1/src/test/java/SurefireTest1.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,66 @@
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class SurefireTest1
+    extends TestCase
+{
+
+    private boolean setUpCalled = false;
+
+    private static boolean tearDownCalled = false;
+
+    public SurefireTest1( String name, String extraName )
+    {
+        super( name );
+    }
+
+    public static Test suite()
+    {
+        TestSuite suite = new TestSuite();
+        Test test = new SurefireTest1( "testSetUp", "dummy" );
+        suite.addTest( test );
+        TestSetup setup = new TestSetup( suite )
+        {
+
+            protected void setUp()
+            {
+                //oneTimeSetUp();
+            }
+
+            protected void tearDown()
+            {
+                oneTimeTearDown();
+            }
+
+        };
+
+        return setup;
+    }
+
+    protected void setUp()
+    {
+        setUpCalled = true;
+        tearDownCalled = false;
+        System.out.println( "Called setUp" );
+    }
+
+    protected void tearDown()
+    {
+        setUpCalled = false;
+        tearDownCalled = true;
+        System.out.println( "Called tearDown" );
+    }
+
+    public void testSetUp()
+    {
+        assertTrue( "setUp was not called", setUpCalled );
+    }
+
+    public static void oneTimeTearDown()
+    {
+        assertTrue( "tearDown was not called", tearDownCalled );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test2/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test2/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test2/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>test2</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>Test for MSUREFIRE-20</name>
+  <description>forkMode=pertest fails to call setUp</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <forkMode>pertest</forkMode>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test2/src/test/java/SurefireTest2.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test2/src/test/java/SurefireTest2.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test2/src/test/java/SurefireTest2.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,66 @@
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class SurefireTest2
+    extends TestCase
+{
+
+    private boolean setUpCalled = false;
+
+    private static boolean tearDownCalled = false;
+
+    public SurefireTest2( String name, String extraName )
+    {
+        super( name );
+    }
+
+    public static Test suite()
+    {
+        TestSuite suite = new TestSuite();
+        Test test = new SurefireTest2( "testSetUp", "dummy" );
+        suite.addTest( test );
+        TestSetup setup = new TestSetup( suite )
+        {
+
+            protected void setUp()
+            {
+                //oneTimeSetUp();
+            }
+
+            protected void tearDown()
+            {
+                oneTimeTearDown();
+            }
+
+        };
+
+        return setup;
+    }
+
+    protected void setUp()
+    {
+        setUpCalled = true;
+        tearDownCalled = false;
+        System.out.println( "Called setUp" );
+    }
+
+    protected void tearDown()
+    {
+        setUpCalled = false;
+        tearDownCalled = true;
+        System.out.println( "Called tearDown" );
+    }
+
+    public void testSetUp()
+    {
+        assertTrue( "setUp was not called", setUpCalled );
+    }
+
+    public static void oneTimeTearDown()
+    {
+        assertTrue( "tearDown was not called", tearDownCalled );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test3/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test3/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test3/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>test3</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>Test for MSUREFIRE-54</name>
+  <description>XML test reports are not well-formed when failure message contains quotes.</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.1</version>
+        <configuration>
+          <testFailureIgnore>true</testFailureIgnore>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test3/src/test/java/SurefireTest3.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test3/src/test/java/SurefireTest3.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test3/src/test/java/SurefireTest3.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,36 @@
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class SurefireTest3
+    extends TestCase
+{
+
+    public SurefireTest3( )
+    {
+        super( );
+    }
+
+    public SurefireTest3( String name )
+    {
+        super( name );
+    }
+
+
+    public void testQuote()
+    {
+        fail( "\"" );
+    }
+
+    public void testLower()
+    {
+        fail( "<" );
+    }
+
+    public void testGreater()
+    {
+        fail( ">" );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>test4</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>TestNG Suites</name>
+  <description>Uses suite xml file definitions to invoke testng tests</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>5.0.1</version>
+      <classifier>jdk15</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <suiteXmlFiles>
+            <file>src/test-data/testng.xml</file>
+          </suiteXmlFiles>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/src/test/java/TestNGSuiteTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/src/test/java/TestNGSuiteTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/src/test/java/TestNGSuiteTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,33 @@
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+
+/**
+ * Tests that forcing testng to run tests via the 
+ * <code>"${maven.test.forcetestng}"</code> configuration option
+ * works.
+ * 
+ * @author jkuhnert
+ */
+public class TestNGSuiteTest {
+
+	/**
+	 * Sets up testObject
+	 */
+	@BeforeClass
+	public void configureTest()
+	{
+		testObject = new Object();
+	}
+	
+	Object testObject;
+	
+	/**
+	 * Tests reporting an error
+	 */
+	@Test
+	public void isTestObjectNull()
+	{
+		assert testObject != null : "testObject is null";
+	}
+}
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/src/test-data/testng.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/src/test-data/testng.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test4/src/test-data/testng.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,30 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+
+<suite name="Suite 1 Test" verbose="4">
+
+  <test name="Sample Test">
+    <classes>
+      <class name="TestNGSuiteTest"/>
+    </classes>
+  </test>
+
+</suite>
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test5/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test5/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test5/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>test5</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>Test for testng jdk14 integration</name>
+  <description>calls testng jdk14 javadoc based tests</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>5.0.1</version>
+      <classifier>jdk14</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <testSourceDirectory>src/test/java</testSourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <groups>functional</groups>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test5/src/test/java/TestNGJavadocTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test5/src/test/java/TestNGJavadocTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test5/src/test/java/TestNGJavadocTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,42 @@
+import org.testng.Assert;
+
+
+/**
+ * Tests that forcing testng to run tests via the 
+ * <code>"${maven.test.forcetestng}"</code> configuration option
+ * works.
+ * 
+ * @author jkuhnert
+ */
+public class TestNGJavadocTest {
+
+	/**
+	 * Sets up testObject
+	 * @testng.configuration beforeTestClass = "true"
+	 * 						 groups = "functional"
+	 */
+	public void configureTest()
+	{
+		testObject = new Object();
+	}
+	
+	Object testObject;
+	
+	/**
+	 * Tests reporting an error
+	 * @testng.test groups = "functional, notincluded"
+	 */
+	public void isTestObjectNull()
+	{
+		Assert.assertNotNull(testObject, "testObject is null");
+	}
+	
+	/**
+	 * Sample method that shouldn't be run by test suite.
+	 * @testng.test groups = "notincluded"
+	 */
+	public void shouldNotRun()
+	{
+		Assert.assertTrue(false, "Group specified by test shouldnt be run.");
+	}
+}
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test6/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test6/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test6/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>test6</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>TestNG group/parallel thread tests</name>
+  <description>Tests group/thread/parallel functionality of TestNG</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>5.0.1</version>
+      <classifier>jdk15</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <groups>functional</groups>
+          <threadCount>3</threadCount>
+          <parallel>true</parallel>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test6/src/test/java/TestNGTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test6/src/test/java/TestNGTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test6/src/test/java/TestNGTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,52 @@
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+
+/**
+ * Tests grouping/threading/parallel functionality of TestNG.
+ * 
+ * @author jkuhnert
+ */
+public class TestNGTest {
+
+	static int m_testCount = 0;
+	
+	/**
+	 * Sets up testObject
+	 */
+	@BeforeClass(groups = "functional")
+	public void configureTest()
+	{
+		testObject = new Object();
+	}
+	
+	@AfterSuite(alwaysRun = true, groups = "functional")
+	public void check_Test_Count()
+	{
+		System.out.println("check_Test_Count(): " + m_testCount);
+		
+		assert m_testCount == 3 : "Expected 3 tests to be run but local count was " + m_testCount;
+	}
+	
+	Object testObject;
+	
+	/**
+	 * Tests reporting an error
+	 */
+	@Test(groups = {"functional", "notincluded"})
+	public void isTestObjectNull()
+	{
+		m_testCount++;
+		assert testObject != null : "testObject is null";
+	}
+	
+	/**
+	 * Sample method that shouldn't be run by test suite.
+	 */
+	@Test(groups = "notincluded")
+	public void shouldNotRun()
+	{
+		assert false == true : "Group specified by test shouldnt be run.";
+	}
+}
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>test7</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>TestNG Junit Compatible</name>
+  <description>Tests that junit tests can be executed alongside TestNG tests</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>5.0.1</version>
+      <classifier>jdk15</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/src/test/java/JunitTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/src/test/java/JunitTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/src/test/java/JunitTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,28 @@
+import junit.framework.TestCase;
+
+/**
+ * Provided to ensure both junit and testng tests can run together.
+ * 
+ * @author jkuhnert
+ */
+public class JunitTest extends TestCase {
+
+	Object testObject;
+	
+	/**
+	 * Creats an object instance
+	 */
+	public void setUp()
+	{
+		testObject = new Object();
+	}
+	
+	/**
+	 * Tests that object created in setup 
+	 * isn't null.
+	 */
+	public void testJunitObject()
+	{
+		assertNotNull(testObject);
+	}
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/src/test/java/TestNGJunitTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/src/test/java/TestNGJunitTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test7/src/test/java/TestNGJunitTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,31 @@
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+
+/**
+ * Simple test
+ * 
+ * @author jkuhnert
+ */
+public class TestNGJunitTest {
+
+	/**
+	 * Sets up testObject
+	 */
+	@BeforeClass
+	public void configureTest()
+	{
+		testObject = new Object();
+	}
+	
+	Object testObject;
+	
+	/**
+	 * Tests reporting an error
+	 */
+	@Test
+	public void isTestObjectNull()
+	{
+		assert testObject != null : "testObject is null";
+	}
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test8/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test8/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test8/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>test8</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>TestNG 5.1 tests</name>
+  <description>Tests TestNG 5.1 dependency</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>5.1</version>
+      <classifier>jdk15</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <groups>functional</groups>
+          <threadCount>3</threadCount>
+          <parallel>true</parallel>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test8/src/test/java/TestNGTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test8/src/test/java/TestNGTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/test8/src/test/java/TestNGTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,52 @@
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+
+/**
+ * Tests grouping/threading/parallel functionality of TestNG.
+ * 
+ * @author jkuhnert
+ */
+public class TestNGTest {
+
+	static int m_testCount = 0;
+	
+	/**
+	 * Sets up testObject
+	 */
+	@BeforeClass(groups = "functional")
+	public void configureTest()
+	{
+		testObject = new Object();
+	}
+	
+	@AfterSuite(alwaysRun = true, groups = "functional")
+	public void check_Test_Count()
+	{
+		System.out.println("check_Test_Count(): " + m_testCount);
+		
+		assert m_testCount == 3 : "Expected 3 tests to be run but local count was " + m_testCount;
+	}
+	
+	Object testObject;
+	
+	/**
+	 * Tests reporting an error
+	 */
+	@Test(groups = {"functional", "notincluded"})
+	public void isTestObjectNull()
+	{
+		m_testCount++;
+		assert testObject != null : "testObject is null";
+	}
+	
+	/**
+	 * Sample method that shouldn't be run by test suite.
+	 */
+	@Test(groups = "notincluded")
+	public void shouldNotRun()
+	{
+		assert false == true : "Group specified by test shouldnt be run.";
+	}
+}
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/testArgLine/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/testArgLine/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/testArgLine/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>testArgLine</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>Test for argLine configuration</name>
+  <description>Test for argLine configuration parameter</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <argLine>"-Djava.library.path=foo foo/foo/bar/1.0"</argLine>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/testArgLine/src/test/java/SurefireTest1.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/testArgLine/src/test/java/SurefireTest1.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/it/testArgLine/src/test/java/SurefireTest1.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,66 @@
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class SurefireTest1
+    extends TestCase
+{
+
+    private boolean setUpCalled = false;
+
+    private static boolean tearDownCalled = false;
+
+    public SurefireTest1( String name, String extraName )
+    {
+        super( name );
+    }
+
+    public static Test suite()
+    {
+        TestSuite suite = new TestSuite();
+        Test test = new SurefireTest1( "testSetUp", "dummy" );
+        suite.addTest( test );
+        TestSetup setup = new TestSetup( suite )
+        {
+
+            protected void setUp()
+            {
+                //oneTimeSetUp();
+            }
+
+            protected void tearDown()
+            {
+                oneTimeTearDown();
+            }
+
+        };
+
+        return setup;
+    }
+
+    protected void setUp()
+    {
+        setUpCalled = true;
+        tearDownCalled = false;
+        System.out.println( "Called setUp" );
+    }
+
+    protected void tearDown()
+    {
+        setUpCalled = false;
+        tearDownCalled = true;
+        System.out.println( "Called tearDown" );
+    }
+
+    public void testSetUp()
+    {
+        assertTrue( "setUp was not called", setUpCalled );
+    }
+
+    public static void oneTimeTearDown()
+    {
+        assertTrue( "tearDown was not called", tearDownCalled );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,899 @@
+package org.apache.maven.plugin.surefire;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
+import org.apache.maven.artifact.resolver.ArtifactResolver;
+import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
+import org.apache.maven.artifact.resolver.filter.ExcludesArtifactFilter;
+import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
+import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.surefire.booter.ForkConfiguration;
+import org.apache.maven.surefire.booter.SurefireBooter;
+import org.apache.maven.surefire.booter.SurefireBooterForkException;
+import org.apache.maven.surefire.booter.SurefireExecutionException;
+import org.apache.maven.surefire.report.BriefConsoleReporter;
+import org.apache.maven.surefire.report.BriefFileReporter;
+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.ForkingConsoleReporter;
+import org.apache.maven.surefire.report.XMLReporter;
+import org.codehaus.plexus.util.StringUtils;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * Run tests using Surefire.
+ * 
+ * @author Jason van Zyl
+ * @version $Id$
+ * @requiresDependencyResolution test
+ * @goal test
+ * @phase test
+ */
+public class SurefirePlugin
+    extends AbstractMojo
+{
+    /**
+     * Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, but quite convenient on occasion.
+     * 
+     * @parameter expression="${maven.test.skip}"
+     */
+    private boolean skip;
+
+    /**
+     * Set this to 'true' to bypass unit tests execution, but still compile them. Its use is NOT RECOMMENDED, but quite
+     * convenient on occasion.
+     * 
+     * @parameter expression="${maven.test.skip.exec}"
+     */
+    private boolean skipExec;
+
+    /**
+     * Set this to true to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on
+     * occasion.
+     * 
+     * @parameter expression="${maven.test.failure.ignore}"
+     */
+    private boolean testFailureIgnore;
+
+    /**
+     * The base directory of the project being tested. This can be obtained in your unit test by
+     * System.getProperty("basedir").
+     * 
+     * @parameter expression="${basedir}"
+     * @required
+     */
+    private File basedir;
+
+    /**
+     * The directory containing generated test classes of the project being tested.
+     * 
+     * @parameter expression="${project.build.testOutputDirectory}"
+     * @required
+     */
+    private File testClassesDirectory;
+
+    /**
+     * The classpath elements of the project being tested.
+     * 
+     * @parameter expression="${project.testClasspathElements}"
+     * @required
+     * @readonly
+     */
+    private List classpathElements;
+
+    /**
+     * Base directory where all reports are written to.
+     * 
+     * @parameter expression="${project.build.directory}/surefire-reports"
+     */
+    private File reportsDirectory;
+
+    /**
+     * The test source directory containing test class sources.
+     * 
+     * @parameter expression="${project.build.testSourceDirectory}"
+     * @required
+     */
+    private File testSourceDirectory;
+
+    /**
+     * Specify this parameter(can be a comma separated list) if you want to use the test pattern matching notation, Ant
+     * pattern matching, to select tests to run. The Ant pattern will be used to create an include pattern formatted
+     * like <code>**&#47;${test}.java</code> When used, the <code>includes</code> and <code>excludes</code>
+     * patterns parameters are ignored.
+     * 
+     * @parameter expression="${test}"
+     */
+    private String test;
+
+    /**
+     * List of patterns (separated by commas) used to specify the tests that should be included in testing. When not
+     * specified and when the <code>test</code> parameter is not specified, the default includes will be
+     * <code>**&#47;Test*.java   **&#47;*Test.java   **&#47;*TestCase.java</code>
+     * 
+     * @parameter
+     */
+    private List includes;
+
+    /**
+     * List of patterns (separated by commas) used to specify the tests that should be excluded in testing. When not
+     * specified and when the <code>test</code> parameter is not specified, the default excludes will be
+     * <code>**&#47;Abstract*Test.java  **&#47;Abstract*TestCase.java **&#47;*$*</code>
+     * 
+     * @parameter
+     */
+    private List excludes;
+
+    /**
+     * ArtifactRepository of the localRepository. To obtain the directory of localRepository in unit tests use
+     * System.setProperty( "localRepository").
+     * 
+     * @parameter expression="${localRepository}"
+     * @required
+     * @readonly
+     */
+    private ArtifactRepository localRepository;
+
+    /**
+     * List of System properties to pass to the JUnit tests.
+     * 
+     * @parameter
+     */
+    private Properties systemProperties;
+
+    /**
+     * List of properties for configuring all TestNG related configurations. This is the new
+     * preferred method of configuring TestNG.
+     *
+     * @parameter
+     */
+    private Properties properties;
+
+    /**
+     * Map of of plugin artifacts.
+     * 
+     * @parameter expression="${plugin.artifactMap}"
+     * @required
+     * @readonly
+     */
+    private Map pluginArtifactMap;
+
+    /**
+     * Map of of project artifacts.
+     * 
+     * @parameter expression="${project.artifactMap}"
+     * @required
+     * @readonly
+     */
+    private Map projectArtifactMap;
+
+    /**
+     * Option to print summary of test suites or just print the test cases that has errors.
+     * 
+     * @parameter expression="${surefire.printSummary}" default-value="true"
+     */
+    private boolean printSummary;
+
+    /**
+     * Selects the formatting for the test report to be generated. Can be set as brief or plain.
+     * 
+     * @parameter expression="${surefire.reportFormat}" default-value="brief"
+     */
+    private String reportFormat;
+
+    /**
+     * Option to generate a file test report or just output the test report to the console.
+     * 
+     * @parameter expression="${surefire.useFile}" default-value="true"
+     */
+    private boolean useFile;
+
+    /**
+     * When forking, set this to true to redirect the unit test standard output to a file (found in
+     * reportsDirectory/testName-output.txt).
+     * 
+     * @parameter expression="${maven.test.redirectTestOutputToFile}" default-value="false"
+     */
+    private boolean redirectTestOutputToFile;
+
+    /**
+     * Option to specify the forking mode. Can be "never", "once" or "always". "none" and "pertest" are also accepted
+     * for backwards compatibility.
+     * 
+     * @parameter expression="${forkMode}" default-value="once"
+     */
+    private String forkMode;
+
+    /**
+     * Option to specify the jvm (or path to the java executable) to use with the forking options. For the default, the
+     * jvm will be the same as the one used to run Maven.
+     * 
+     * @parameter expression="${jvm}"
+     */
+    private String jvm;
+
+    /**
+     * Arbitrary options to set on the command line.
+     * 
+     * @parameter expression="${argLine}"
+     */
+    private String argLine;
+
+    /**
+     * Additional environments to set on the command line.
+     * 
+     * @parameter
+     */
+    private Map environmentVariables = new HashMap();
+
+    /**
+     * Command line working directory.
+     * 
+     * @parameter
+     */
+    private File workingDirectory;
+
+    /**
+     * When false it makes tests run using the standard classloader delegation instead of the default Maven isolated
+     * classloader. Only used when forking (forkMode is not "none").<br/> Setting it to false helps with some problems
+     * caused by conflicts between xml parsers in the classpath and the Java 5 provider parser.
+     * 
+     * @parameter expression="${childDelegation}" default-value="false"
+     */
+    private boolean childDelegation;
+
+    /**
+     * Groups for this test. Only classes/methods/etc decorated with one of the groups specified here will be included
+     * in test run, if specified.
+     * 
+     * @parameter expression="${groups}"
+     */
+    private String groups;
+
+    /**
+     * Excluded groups. Any methods/classes/etc with one of the groups specified in this list will specifically not be
+     * run.
+     * 
+     * @parameter expression="${excludedGroups}"
+     */
+    private String excludedGroups;
+
+    /**
+     * List of TestNG suite xml file locations, seperated by commas. It should be noted that if suiteXmlFiles is
+     * specified, <b>no</b> other tests will be run, ignoring other parameters, like includes and excludes.
+     * 
+     * @parameter
+     */
+    private File[] suiteXmlFiles;
+
+    /**
+     * The attribute thread-count allows you to specify how many threads should be allocated for this execution. Only
+     * makes sense to use in conjunction with parallel.
+     * 
+     * @parameter expression="${threadCount}" default-value="5"
+     */
+    private int threadCount;
+
+    /**
+     * When you use the parallel attribute, TestNG will try to run all your test methods in separate threads, except for
+     * methods that depend on each other, which will be run in the same thread in order to respect their order of
+     * execution.
+     * 
+     * @parameter expression="${parallel}" default-value="false"
+     * @todo test how this works with forking, and console/file output parallelism
+     */
+    private String parallel;
+
+    /**
+     * Whether to trim the stack trace in the reports to just the lines within the test, or show the full trace.
+     * 
+     * @parameter expression="${trimStackTrace}" default-value="true"
+     */
+    private boolean trimStackTrace;
+
+    /**
+     * Resolves the artifacts needed.
+     * 
+     * @component
+     */
+    private ArtifactResolver artifactResolver;
+
+    /**
+     * Creates the artifact
+     * 
+     * @component
+     */
+    private ArtifactFactory artifactFactory;
+
+    /**
+     * The plugin remote repositories declared in the pom.
+     * 
+     * @parameter expression="${project.pluginArtifactRepositories}"
+     */
+    private List remoteRepositories;
+
+    /**
+     * For retrieval of artifact's metadata.
+     * 
+     * @component
+     */
+    private ArtifactMetadataSource metadataSource;
+
+    private static final String BRIEF_REPORT_FORMAT = "brief";
+
+    private static final String PLAIN_REPORT_FORMAT = "plain";
+
+    private Properties originalSystemProperties;
+
+    /**
+     * Flag to disable the generation of report files in xml format.
+     * 
+     * @parameter expression="${disableXmlReport}" default-value="false"
+     */
+    private boolean disableXmlReport;
+
+    /**
+     * Option to pass dependencies to the system's classloader instead of using an isolated class loader when forking.
+     * Prevents problems with JDKs which implement the service provider lookup mechanism by using the system's
+     * classloader.
+     * 
+     * @parameter expression="${surefire.useSystemClassLoader}" default-value="false"
+     */
+    private boolean useSystemClassLoader;
+
+    /**
+     * By default, Surefire enables JVM assertions for the execution of your test cases. To disable the assertions, set
+     * this flag to <code>false</code>.
+     * 
+     * @parameter expression="${enableAssertions}" default-value="true"
+     */
+    private boolean enableAssertions;
+
+    public void execute()
+        throws MojoExecutionException, MojoFailureException
+    {
+        if ( verifyParameters() )
+        {
+            SurefireBooter surefireBooter = constructSurefireBooter();
+
+            getLog().info( "Surefire report directory: " + reportsDirectory );
+
+            boolean success;
+            try
+            {
+                success = surefireBooter.run();
+            }
+            catch ( SurefireBooterForkException e )
+            {
+                throw new MojoExecutionException( e.getMessage(), e );
+            }
+            catch ( SurefireExecutionException e )
+            {
+                throw new MojoExecutionException( e.getMessage(), e );
+            }
+
+            if ( originalSystemProperties != null )
+            {
+                // restore system properties
+                System.setProperties( originalSystemProperties );
+            }
+
+            if ( !success )
+            {
+                // TODO: i18n
+                String msg = "There are test failures.\n\nPlease refer to " + reportsDirectory + " for the individual test results.";
+
+                if ( testFailureIgnore )
+                {
+                    getLog().error( msg );
+                }
+                else
+                {
+                    throw new MojoFailureException( msg );
+                }
+            }
+        }
+    }
+
+    private boolean verifyParameters()
+        throws MojoFailureException
+    {
+        if ( skip || skipExec )
+        {
+            getLog().info( "Tests are skipped." );
+            return false;
+        }
+
+        if ( !testClassesDirectory.exists() )
+        {
+            getLog().info( "No tests to run." );
+            return false;
+        }
+
+        if ( useSystemClassLoader && ForkConfiguration.FORK_NEVER.equals( forkMode ) )
+        {
+            getLog().warn( "useSystemClassloader=true setting has no effect when not forking" );
+        }
+
+        return true;
+    }
+
+    /**
+     * Converts old TestNG configuration parameters over to new properties based configuration
+     * method. (if any are defined the old way)
+     */
+    private void convertTestNGParameters()
+    {
+        if ( properties == null )
+        {
+            properties = new Properties();
+        }
+
+        if ( this.parallel != null )
+        {
+            properties.put( "parallel", this.parallel );
+        }
+        if ( this.excludedGroups != null )
+        {
+            properties.put( "excludegroups", this.excludedGroups );
+        }
+        if ( this.groups != null )
+        {
+            properties.put( "groups", this.groups );
+        }
+
+        if ( this.threadCount > 0 )
+        {
+            properties.put( "threadcount", new Integer( this.threadCount ) );
+        }
+    }
+
+    private SurefireBooter constructSurefireBooter()
+        throws MojoExecutionException, MojoFailureException
+    {
+        SurefireBooter surefireBooter = new SurefireBooter();
+
+        Artifact surefireArtifact = (Artifact) pluginArtifactMap.get( "org.apache.maven.surefire:surefire-booter" );
+        if ( surefireArtifact == null )
+        {
+            throw new MojoExecutionException( "Unable to locate surefire-booter in the list of plugin artifacts" );
+        }
+
+        surefireArtifact.isSnapshot(); // TODO: this is ridiculous, but it fixes getBaseVersion to be -SNAPSHOT if
+        // needed
+
+        Artifact junitArtifact;
+        Artifact testNgArtifact;
+        try
+        {
+            addArtifact( surefireBooter, surefireArtifact );
+
+            junitArtifact = (Artifact) projectArtifactMap.get( "junit:junit" );
+
+            // TODO: this is pretty manual, but I'd rather not require the plugin > dependencies section right now
+            testNgArtifact = (Artifact) projectArtifactMap.get( "org.testng:testng" );
+
+            if ( testNgArtifact != null )
+            {
+                VersionRange range = VersionRange.createFromVersionSpec( "[4.7,)" );
+                if ( !range.containsVersion( testNgArtifact.getSelectedVersion() ) )
+                {
+                    throw new MojoFailureException(
+                                                    "TestNG support requires version 4.7 or above. You have declared version " +
+                                                        testNgArtifact.getVersion() );
+                }
+
+                convertTestNGParameters();
+
+                if ( this.testClassesDirectory != null )
+                {
+                    properties.put( "testng.test.classpath", testClassesDirectory.getAbsolutePath() );
+                }
+
+                addArtifact( surefireBooter, testNgArtifact );
+
+                // The plugin uses a JDK based profile to select the right testng. We might be explicity using a
+                // different one since its based on the source level, not the JVM. Prune using the filter.
+                addProvider( surefireBooter, "surefire-testng", surefireArtifact.getBaseVersion(), testNgArtifact );
+            }
+            else if ( junitArtifact != null && junitArtifact.getBaseVersion().startsWith( "4" ) )
+            {
+                addProvider( surefireBooter, "surefire-junit4", surefireArtifact.getBaseVersion(), null );
+            }
+            else
+            {
+                // add the JUnit provider as default - it doesn't require JUnit to be present,
+                // since it supports POJO tests.
+                addProvider( surefireBooter, "surefire-junit", surefireArtifact.getBaseVersion(), null );
+            }
+        }
+        catch ( ArtifactNotFoundException e )
+        {
+            throw new MojoExecutionException( "Unable to locate required surefire provider dependency: " +
+                e.getMessage(), e );
+        }
+        catch ( InvalidVersionSpecificationException e )
+        {
+            throw new MojoExecutionException( "Error determining the TestNG version requested: " + e.getMessage(), e );
+        }
+        catch ( ArtifactResolutionException e )
+        {
+            throw new MojoExecutionException( "Error to resolving surefire provider dependency: " + e.getMessage(), e );
+        }
+
+        if ( suiteXmlFiles != null && suiteXmlFiles.length > 0 )
+        {
+            if ( testNgArtifact == null )
+            {
+                throw new MojoExecutionException( "suiteXmlFiles is configured, but there is no TestNG dependency" );
+            }
+
+            // TODO: properties should be passed in here too
+            surefireBooter.addTestSuite( "org.apache.maven.surefire.testng.TestNGXmlTestSuite", new Object[]{
+                suiteXmlFiles, testSourceDirectory.getAbsolutePath(), testNgArtifact.getVersion()} );
+        }
+        else
+        {
+            List includes;
+            List excludes;
+
+            if ( test != null )
+            {
+                // Check to see if we are running a single test. The raw parameter will
+                // come through if it has not been set.
+
+                // FooTest -> **/FooTest.java
+
+                includes = new ArrayList();
+
+                excludes = new ArrayList();
+
+                // Allow paths delimited by '.' or '/'
+                test = test.replace('.', '/');
+                
+                String[] testRegexes = StringUtils.split( test, "," );
+
+                for ( int i = 0; i < testRegexes.length; i++ )
+                {
+                    includes.add( "**/" + testRegexes[i] + ".java" );
+                }
+            }
+            else
+            {
+                includes = this.includes;
+
+                excludes = this.excludes;
+
+                // defaults here, qdox doesn't like the end javadoc value
+                // Have to wrap in an ArrayList as surefire expects an ArrayList instead of a List for some reason
+                if ( includes == null || includes.size() == 0 )
+                {
+                    includes =
+                        new ArrayList( Arrays.asList( new String[] { "**/Test*.java", "**/*Test.java",
+                            "**/*TestCase.java" } ) );
+                }
+                if ( excludes == null || excludes.size() == 0 )
+                {
+                    excludes =
+                        new ArrayList( Arrays.asList( new String[] { "**/Abstract*Test.java",
+                            "**/Abstract*TestCase.java", "**/*$*" } ) );
+                }
+            }
+
+            if ( testNgArtifact != null )
+            {
+                surefireBooter.addTestSuite( "org.apache.maven.surefire.testng.TestNGDirectoryTestSuite", new Object[] {
+                    testClassesDirectory, includes, excludes, testSourceDirectory.getAbsolutePath(),
+                    testNgArtifact.getVersion(), properties} );
+            }
+            else
+            {
+                String junitDirectoryTestSuite;
+                if ( junitArtifact != null && junitArtifact.getBaseVersion() != null &&
+                    junitArtifact.getBaseVersion().startsWith( "4" ) )
+                {
+                    junitDirectoryTestSuite = "org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite";
+                }
+                else
+                {
+                    junitDirectoryTestSuite = "org.apache.maven.surefire.junit.JUnitDirectoryTestSuite";
+                }
+
+                // fall back to JUnit, which also contains POJO support. Also it can run
+                // classes compiled against JUnit since it has a dependency on JUnit itself.
+                surefireBooter.addTestSuite( junitDirectoryTestSuite, new Object[] { testClassesDirectory, includes,
+                    excludes } );
+            }
+        }
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        getLog().debug( "Test Classpath :" );
+
+        // no need to add classes/test classes directory here - they are in the classpath elements already
+
+        for ( Iterator i = classpathElements.iterator(); i.hasNext(); )
+        {
+            String classpathElement = (String) i.next();
+
+            getLog().debug( "  " + classpathElement );
+
+            surefireBooter.addClassPathUrl( classpathElement );
+        }
+
+        // ----------------------------------------------------------------------
+        // Forking
+        // ----------------------------------------------------------------------
+
+        ForkConfiguration fork = new ForkConfiguration();
+
+        fork.setForkMode( forkMode );
+
+        processSystemProperties( !fork.isForking() );
+
+        if ( getLog().isDebugEnabled() )
+        {
+            showMap( systemProperties, "system property" );
+        }
+
+        if ( fork.isForking() )
+        {
+            fork.setUseSystemClassLoader( useSystemClassLoader );
+
+            fork.setSystemProperties( systemProperties );
+
+            if ( jvm == null || "".equals( jvm ) )
+            {
+                // use the same JVM as the one used to run Maven (the "java.home" one)
+                jvm = System.getProperty( "java.home" ) + File.separator + "bin" + File.separator + "java";
+                getLog().debug( "Using JVM: " + jvm );
+            }
+
+            fork.setJvmExecutable( jvm );
+
+            if ( workingDirectory != null )
+            {
+                fork.setWorkingDirectory( workingDirectory );
+            }
+            else
+            {
+                fork.setWorkingDirectory( basedir );
+            }
+
+            fork.setArgLine( argLine );
+
+            fork.setEnvironmentVariables( environmentVariables );
+
+            if ( getLog().isDebugEnabled() )
+            {
+                showMap( environmentVariables, "environment variable" );
+
+                fork.setDebug( true );
+            }
+
+            if ( argLine != null )
+            {
+                List args = Arrays.asList( argLine.split( " " ) );
+                if ( args.contains( "-da" ) || args.contains( "-disableassertions" ) )
+                {
+                    enableAssertions = false;
+                }
+            }
+        }
+
+        surefireBooter.setRedirectTestOutputToFile( redirectTestOutputToFile );
+
+        surefireBooter.setForkConfiguration( fork );
+
+        surefireBooter.setChildDelegation( childDelegation );
+
+        surefireBooter.setEnableAssertions( enableAssertions );
+
+        surefireBooter.setReportsDirectory( reportsDirectory );
+
+        addReporters( surefireBooter, fork.isForking() );
+
+        return surefireBooter;
+    }
+
+    private void showMap( Map map, String setting )
+    {
+        for ( Iterator i = map.keySet().iterator(); i.hasNext(); )
+        {
+            String key = (String) i.next();
+            String value = (String) map.get( key );
+            getLog().debug( "Setting " + setting + " [" + key + "]=[" + value + "]" );
+        }
+    }
+
+    private void addProvider( SurefireBooter surefireBooter, String provider, String version, Artifact filteredArtifact )
+        throws ArtifactNotFoundException, ArtifactResolutionException
+    {
+        Artifact providerArtifact =
+            artifactFactory.createDependencyArtifact( "org.apache.maven.surefire", provider,
+                                                      VersionRange.createFromVersion( version ), "jar", null,
+                                                      Artifact.SCOPE_TEST );
+        ArtifactResolutionResult result = resolveArtifact( filteredArtifact, providerArtifact );
+
+        for ( Iterator i = result.getArtifacts().iterator(); i.hasNext(); )
+        {
+            Artifact artifact = (Artifact) i.next();
+
+            getLog().debug( "Adding to surefire test classpath: " + artifact.getFile().getAbsolutePath() );
+
+            surefireBooter.addSurefireClassPathUrl( artifact.getFile().getAbsolutePath() );
+        }
+    }
+
+    private ArtifactResolutionResult resolveArtifact( Artifact filteredArtifact, Artifact providerArtifact )
+        throws ArtifactResolutionException, ArtifactNotFoundException
+    {
+        ArtifactFilter filter = null;
+        if ( filteredArtifact != null )
+        {
+            filter =
+                new ExcludesArtifactFilter( Collections.singletonList( filteredArtifact.getGroupId() + ":" +
+                    filteredArtifact.getArtifactId() ) );
+        }
+
+        Artifact originatingArtifact = artifactFactory.createBuildArtifact( "dummy", "dummy", "1.0", "jar" );
+
+        return artifactResolver.resolveTransitively( Collections.singleton( providerArtifact ), originatingArtifact,
+                                                     localRepository, remoteRepositories, metadataSource, filter );
+    }
+
+    private void addArtifact( SurefireBooter surefireBooter, Artifact surefireArtifact )
+        throws ArtifactNotFoundException, ArtifactResolutionException
+    {
+        ArtifactResolutionResult result = resolveArtifact( null, surefireArtifact );
+
+        for ( Iterator i = result.getArtifacts().iterator(); i.hasNext(); )
+        {
+            Artifact artifact = (Artifact) i.next();
+
+            getLog().debug( "Adding to surefire booter test classpath: " + artifact.getFile().getAbsolutePath() );
+
+            surefireBooter.addSurefireBootClassPathUrl( artifact.getFile().getAbsolutePath() );
+        }
+    }
+
+    protected void processSystemProperties( boolean setInSystem )
+    {
+        if ( systemProperties == null )
+        {
+            systemProperties = new Properties();
+        }
+
+        originalSystemProperties = (Properties) System.getProperties().clone();
+
+        systemProperties.setProperty( "basedir", basedir.getAbsolutePath() );
+
+        systemProperties.setProperty( "localRepository", localRepository.getBasedir() );
+
+        if ( setInSystem )
+        {
+            // Add all system properties configured by the user
+            Iterator iter = systemProperties.keySet().iterator();
+
+            while ( iter.hasNext() )
+            {
+                String key = (String) iter.next();
+
+                String value = systemProperties.getProperty( key );
+
+                System.setProperty( key, value );
+            }
+        }
+    }
+
+    /**
+     * <p>
+     * Adds Reporters that will generate reports with different formatting.
+     * <p>
+     * The Reporter that will be added will be based on the value of the parameter useFile, reportFormat, and
+     * printSummary.
+     * 
+     * @param surefireBooter The surefire booter that will run tests.
+     * @param forking
+     */
+    private void addReporters( SurefireBooter surefireBooter, boolean forking )
+    {
+        Boolean trimStackTrace = Boolean.valueOf( this.trimStackTrace );
+        if ( useFile )
+        {
+            if ( printSummary )
+            {
+                if ( forking )
+                {
+                    surefireBooter.addReport( ForkingConsoleReporter.class.getName(), new Object[] { trimStackTrace } );
+                }
+                else
+                {
+                    surefireBooter.addReport( ConsoleReporter.class.getName(), new Object[] { trimStackTrace } );
+                }
+            }
+
+            if ( BRIEF_REPORT_FORMAT.equals( reportFormat ) )
+            {
+                surefireBooter.addReport( BriefFileReporter.class.getName(), new Object[] { reportsDirectory,
+                    trimStackTrace } );
+            }
+            else if ( PLAIN_REPORT_FORMAT.equals( reportFormat ) )
+            {
+                surefireBooter.addReport( FileReporter.class.getName(),
+                                          new Object[] { reportsDirectory, trimStackTrace } );
+            }
+        }
+        else
+        {
+            if ( BRIEF_REPORT_FORMAT.equals( reportFormat ) )
+            {
+                surefireBooter.addReport( BriefConsoleReporter.class.getName(), new Object[] { trimStackTrace } );
+            }
+            else if ( PLAIN_REPORT_FORMAT.equals( reportFormat ) )
+            {
+                surefireBooter.addReport( DetailedConsoleReporter.class.getName(), new Object[] { trimStackTrace } );
+            }
+        }
+
+        if ( !disableXmlReport )
+        {
+            surefireBooter.addReport( XMLReporter.class.getName(), new Object[] { reportsDirectory, trimStackTrace } );
+        }
+    }
+
+    /**
+     * @return SurefirePlugin Returns the skipExec.
+     */
+    public boolean isSkipExec()
+    {
+        return this.skipExec;
+    }
+
+    /**
+     * @param skipExec the skipExec to set
+     */
+    public void setSkipExec( boolean skipExec )
+    {
+        this.skipExec = skipExec;
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,34 @@
+package org.apache.maven.test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Run tests using Surefire
+ *
+ * @author Jason van Zyl
+ * @version $Id$
+ * @see org.apache.maven.plugin.surefire.SurefirePlugin
+ * @deprecated use org.apache.maven.plugins.surefire.SurefirePlugin instead
+ */
+public class SurefirePlugin
+    extends org.apache.maven.plugin.surefire.SurefirePlugin
+{
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/class-loading.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/class-loading.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/class-loading.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,40 @@
+  ------
+  Class Loading Issues
+  ------
+  Brett Porter
+  ------
+  July 2006
+  ------
+
+Class Loading Issues
+
+ By default, Surefire loads classes using the default Java mechanism. However,
+ it can be set to use "child first" classloading, like a web application -
+ meaning your dependencies take precedence over those in the JDK. Classes in
+ the java.* and javax.* packages can never be overridden. The only use for
+ this is so that code in the test classpath can override stuff present in the
+ JDK or its "standard extensions" directory which is not in these restricted
+ packages. This means effectively implementations of the various "service provider"
+ interfaces in java such as the xml parser implementation used by jaxp,
+ the cryptography providers, the socket implementation class.
+
+ If you find this is necessary, you can do so by setting the <<<childDelegation>>>
+ property to <<true>>:
+
++---+
+<project>
+  [...]
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <childDelegation>true</childDelegation>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  [...]
+</project>
++---+
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/forking.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/forking.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/forking.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,38 @@
+  ------
+  Forking
+  ------
+  Brett Porter
+  ------
+  July 2006
+  ------
+
+Forking
+
+ If you need to run your tests in a new JVM process you can use the <<<forkMode>>> option to start a new
+ JVM process once for all your tests, or start a new JVM process for each of your tests. You can also set
+ any arbitrary options like <<<-enableassertions>>> or any other JVM options. Here's an example of what
+ this might look like:
+
++---+
+<project>
+  [...]
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <forkMode>pertest</forkMode>
+          <argLine>-enableassertions</argLine>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  [...]
+</project>
++---+
+
+ <<Note:>> You do not need to manually enable assertions if you are using them in your unit tests - Surefire enables
+ them on your test classes automatically under JDK 1.4+.
+
+ The default setting is <<<once>>>. It can also be set to <<<never>>> to run in process for a small performance improvement.
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,76 @@
+  ------
+  Inclusions and Exclusions of Tests
+  ------
+  Allan Ramirez
+  ------
+  July 2006
+  ------
+
+Inclusions and Exclusions of Tests
+
+* Inclusions
+
+  By default, the surefire plugin will automatically include all test classes
+  with the following wildcard patterns:
+
+   * <"**/Test*.java"> - includes all of its subdirectory and all java
+   filenames that start with "Test".
+
+   * <"**/*Test.java"> - includes all of its subdirectory and all java
+   filenames that end with "Test".
+
+   * <"**/*TestCase.java"> - includes all of its subdirectory and all java
+   filenames that end with "TestCase".
+
+   []
+
+  If the test classes does not go with the naming convention, then configure
+  surefire plugin and specify the tests you want to include.
+
++---+
+<project>
+  [...]
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <includes>
+            <include>Sample.java</include>
+          </includes>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  [...]
+</project>
++---+
+
+* Exclusions
+
+  There are certain times when some tests are causing the build to fail.
+  Excluding them is one of the best workarounds to continue the build.
+  Exclusions can be done by configuring the <<excludes>> property of the
+  plugin.
+
++---+
+<project>
+  [...]
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>**/TestCircle.java</exclude>
+            <exclude>**/TestSquare.java</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  [...]
+</project>
++---+
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/single-test.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/single-test.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/single-test.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,19 @@
+  ------
+  Running a Single Test
+  ------
+  Allan Ramirez
+  ------
+  July 2006
+  ------
+
+Running a Single Test
+
+  During development, you may run a single test class repeatedly. To run this
+  through Maven, set the <<<test>>> property to a specific test case.
+
++---+
+mvn -Dtest=TestCircle test
++---+
+
+  The value for the <<<test>>> parameter is the name of the test class(without
+  the extension).
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/skipping-test.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/skipping-test.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/skipping-test.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,39 @@
+  ------
+  Skipping Test
+  ------
+  Johnny Ruiz
+  Brett Porter
+  Allan Ramirez
+  ------
+  July 2006
+  ------
+
+Skipping Tests
+
+ To skip running the tests for a particular project, set the <<skip>>
+ property to <<true>>.
+
++---+
+<project>
+  [...]
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  [...]
+</project>
++---+
+
+ You can also skip the tests via command line by executing the following command:
+
++---+
+mvn install -Dmaven.test.skip=true
++---+
+

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/system-properties.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/system-properties.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/system-properties.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,65 @@
+  ------
+  Using System Properties
+  ------
+  Allan Ramirez
+  ------
+  July 2006
+  ------
+
+Using System Properties
+
+  To add a System property, use the following configuration:
+
++---+
+<project>
+  [...]
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <systemProperties>
+            <property>
+              <name>propertyName</name>
+              <value>propertyValue</value>
+            </property>
+          </systemProperties>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  [...]
+</project>
++---+
+
+  Take note that <<String valued>> properties can only be passed as system
+  properties. Any attempt to pass any other maven variable type (i.e. List
+  or a URL variable) will cause the variable expression to be passed
+  literally (unevaluated). So having an example below:
+
++---+
+<project>
+  [...]
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <systemProperties>
+            <property>
+              <name>buildDir</name>
+              <value>${project.build.outputDirectory}</value>
+            </property>
+          </systemProperties>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  [...]
+</project>
++---+
+
+  will literally pass <<${project.build.outputDirectory}>> because the value
+  of that expression is a File, not a String.
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/testng.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/testng.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/examples/testng.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,100 @@
+ ------
+ Using TestNG
+ ------
+ Brett Porter <brett at apache.org>
+ ------
+ 2 May 2006
+ ------
+
+Using TestNG
+
+* Configuring TestNG
+
+  To get started with TestNG, include the following dependency in your project:
+
++---+
+[...]
+  <dependency>
+    <groupId>org.testng</groupId>
+    <artifactId>testng</artifactId>
+    <version>4.7</version>
+    <scope>test</scope>
+    <classifier>jdk15</classifier>
+  </dependency>
+[...]
++---+
+
+  <<Note:>> if you are using JDK 1.4 Javadoc annotations for your TestNG tests, replace jdk15 with jdk14 above.
+
+  This is the only step that is required to get started - you can now create tests in your test source directory
+  (eg, <<<src/test/java>>>, and as long as they are named using the defaults such as *Test.java they will be run
+  by Surefire as TestNG tests.
+
+  If you'd like to use a different naming scheme, you can change the <<<includes>>> parameter, as discussed in the
+  {{{inclusion-exclusion.html}Inclusions and Exclusions of Tests}} example.
+
+* Using Suite XML Files
+
+  Another alternative is to use test NG suite XML files. This allows flexible configuration of the tests to be run.
+  These files are created as normal, and then added to the Surefire plugin configuration:
+
++---+
+[...]
+  <plugin>
+    <groupId>org.apache.maven.plugins</groupId>
+    <artifactId>maven-surefire-plugin</artifactId>
+    <configuration>
+      <suiteXmlFiles>
+        <suiteXmlFile>testng.xml</suiteXmlFile>
+      </suiteXmlFiles>
+    </configuration>
+  </plugin>
+[...]
++---+
+
+  This configuration will override the includes and excludes patterns and run all tests in the suite files.
+
+* Using Groups
+
+  TestNG allows you to group your tests. You can then execute a specific group or groups. To do this with Surefire,
+  use the <<<groups>>> parameter, for example:
+
++---+
+[...]
+  <plugin>
+    <groupId>org.apache.maven.plugins</groupId>
+    <artifactId>maven-surefire-plugin</artifactId>
+    <configuration>
+      <groups>functest,perftest</groups>
+    </configuration>
+  </plugin>
+[...]
++---+
+
+  Likewise, the <<<excludedGroups>>> parameter can be used to run all but a certain set of groups.
+
+* Running tests in parallel
+
+  TestNG allows you to run your tests in parallel, including JUnit tests. To do this, you must enable the
+  <<<parallel>>> parameter, and may change the <<<threadCount>>> parameter if the default of 5 is not sufficient.
+  For example:
+
++---+
+[...]
+  <plugin>
+    <groupId>org.apache.maven.plugins</groupId>
+    <artifactId>maven-surefire-plugin</artifactId>
+    <configuration>
+      <parallel>true</parallel>
+      <threadCount>10</threadCount>
+    </configuration>
+  </plugin>
+[...]
++---+
+
+  This is particularly useful for slow tests that can have high concurrency, or to quickly and roughly assess the independance
+  and thread safety of your tests and code.
+
+  For more information on TestNG, see the project {{{http://www.testng.org} web site}}.
+
+

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/index.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/index.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/index.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,56 @@
+  ------
+  Introduction
+  ------
+  Allan Ramirez
+  ------
+  July 2006
+  ------
+
+Maven Surefire Plugin
+
+  The surefire plugin is used during the <<<test>>> phase of the build
+  lifecycle to execute the unit tests of an application. It generates reports
+  in 2 different file formats:
+
+  * Plain text files (*.txt)
+
+  * Xml files (*.xml)
+
+  []
+
+  By default, these files are generated at <<<${basedir}/target/surefire-reports>>>.
+
+  For an html format of the report, please see the
+  {{{http://maven.apache.org/plugins/maven-surefire-report-plugin/}maven-surefire-report-plugin}}.
+
+* Goals Overview
+
+  The surefire plugin has only 1 goal:
+
+  * {{{test-mojo.html}surefire:test}} runs the unit tests of an application.
+
+  []
+
+* Usage
+
+  Instructions on how to use the surefire plugin can be found {{{usage.html}here}}.
+
+* Examples
+
+  The following examples show how to use the surefire plugin in more advanced use-cases:
+
+  * {{{examples/skipping-test.html}Skipping Tests}}
+
+  * {{{examples/inclusion-exclusion.html}Inclusions and Exclusions of Tests}}
+
+  * {{{examples/single-test.html}Running a Single Test}}
+
+  * {{{examples/class-loading.html}Class Loading Issues}}
+
+  * {{{examples/forking.html}Forking}}
+
+  * {{{examples/system-properties.html}Using System Properties}}
+
+  * {{{examples/testng.html}Using TestNG}}
+
+  []

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/introduction.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/introduction.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/introduction.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,16 @@
+ ------
+ Maven 2 Surefire Plugin 
+ ------
+ Johnny R. Ruiz III
+ <jruiz at exist.com>
+ ------
+ September 19, 2005
+
+Introduction
+
+ This plugin runs the junit tests in an isolated classloader.  By default, this plugin will be executed in 
+ "test" phase of m2 lifecycle.  
+
+ This plugin generates 2 types of report, Text File Report and XML File Report. Both files will be generated in the
+ <<<${basedir}/target/surefire-report>>>.  For an HTML version of the report, please see the Maven Surefire Report Plugin. 
+

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/testng.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/testng.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/testng.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,100 @@
+ ------
+ Using TestNG
+ ------
+ Brett Porter <brett at apache.org>
+ ------
+ 2 May 2006
+ ------
+
+Using TestNG
+
+* Configuring TestNG
+
+  To get started with TestNG, include the following dependency in your project:
+
+-----
+...
+  <dependency>
+    <groupId>org.testng</groupId>
+    <artifactId>testng</artifactId>
+    <version>4.7</version>
+    <scope>test</scope>
+    <classifier>jdk15</classifier>
+  </dependency>
+...
+-----
+
+  <<Note:>> if you are using JDK 1.4 Javadoc annotations for your TestNG tests, replace jdk15 with jdk14 above.
+
+  This is the only step that is required to get started - you can now create tests in your test source directory
+  (eg, <<<src/test/java>>>, and as long as they are named using the defaults such as *Test.java they will be run
+  by Surefire as TestNG tests.
+
+  If you'd like to use a different naming scheme, you can change the <<<includes>>> parameter, as discussed in the
+  {{{howto.html} How to Use}} page.
+
+* Using Suite XML Files
+
+  Another alternative is to use test NG suite XML files. This allows flexbile configuration of the tests to be run.
+  These files are created as normal, and then added to the Surefire plugin configuration:
+
+-----
+...
+  <plugin>
+    <groupId>org.apache.maven.plugins</groupId>
+    <artifactId>maven-surefire-plugin</artifactId>
+    <configuration>
+      <suiteXmlFiles>
+        <suiteXmlFile>testng.xml</suiteXmlFile>
+      </suiteXmlFiles>
+    </configuration>
+  </plugin>
+...
+-----
+
+  This configuration will override the includes and excludes patterns and run all tests in the suite files.
+
+* Using Groups
+
+  TestNG allows you to group your tests. You can then execute a specific group or groups. To do this with Surefire,
+  use the <<<groups>>> parameter, for example:
+
+-----
+...
+  <plugin>
+    <groupId>org.apache.maven.plugins</groupId>
+    <artifactId>maven-surefire-plugin</artifactId>
+    <configuration>
+      <groups>functest,perftest</groups>
+    </configuration>
+  </plugin>
+...
+-----
+
+  Likewise, the <<<excludedGroups>>> parameter can be used to run all but a certain set of groups.
+
+* Running tests in parallel
+
+  TestNG allows you to run your tests in parallel, including JUnit tests. To do this, you must enable the
+  <<<parallel>>> parameter, and may change the <<<threadCount>>> parameter if the default of 5 is not sufficient.
+  For example:
+
+-----
+...
+  <plugin>
+    <groupId>org.apache.maven.plugins</groupId>
+    <artifactId>maven-surefire-plugin</artifactId>
+    <configuration>
+      <parallel>true</parallel>
+      <threadCount>10</threadCount>
+    </configuration>
+  </plugin>
+...
+-----
+
+  This is particularly useful for slow tests that can have high concurrency, or to quickly and roughly assess the independance
+  and thread safety of your tests and code.
+
+  For more information on TestNG, see the project {{{http://www.testng.org} web site}}.
+
+

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/usage.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/usage.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/apt/usage.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,51 @@
+  ------
+  Usage
+  ------
+  Brett Porter
+  Allan Ramirez
+  ------
+  July 2006
+  ------
+
+Usage
+
+  The surefire plugin can be invoked by calling the <<<test>>> phase of the
+  build lifecycle.
+
++---+
+mvn test
++---+
+
+* Using different testing providers
+
+  Tests in your test source directory can be any combination of the following:
+
+   * TestNG
+
+   * JUnit
+
+   * POJO
+
+  Which providers are available is controlled simply by the inclusion of the
+  appropriate dependencies (ie, junit:junit for JUnit, org.testng:testng 4.7+
+  for TestNG). Since this is required to compile the test classes anyway, no
+  additional configuration is required.
+
+  Note that any normal Surefire integration works identically no matter which
+  providers are in use - so you can still produce a Cobertura report and a
+  Surefire results report on your project web site for your TestNG tests,
+  for example.
+
+  The POJO provider above allows you to write tests that do not depend on
+  JUnit. They behave in the same way, running all <<<test*>>> methods that are
+  public in the class, but the API dependency is not required. To perform
+  assertions, the JDK 1.4 <<<assert>>> keyword can be used, or you can use
+  <<<org.apache.maven.surefire.assertion.Assert>>>.
+
+  All of the providers support the surefire plugin parameter configurations.
+  However, there are additional options available if you are running TestNG
+  tests (including if you are using TestNG to execute your JUnit tests, which
+  occurs by default if both are present in Surefire).
+
+  See {{{examples/testng.html} Using TestNG}} for more information.
+

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/fml/faq.fml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/fml/faq.fml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/fml/faq.fml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<faqs id="FAQ" title="Frequently Asked Questions">
+  <part id="General">
+    <faq id="reuse-test-code">
+      <question>How can I reuse my test code in other modules?</question>
+      <answer>
+        <p>
+          Visit this link for your reference,
+          <a href="http://maven.apache.org/guides/mini/guide-attached-tests.html">
+            Attaching tests
+          </a>
+        </p>
+      </answer>
+    </faq>
+  </part>
+</faqs>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/site.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/site.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-plugin/src/site/site.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project>
+  <body>
+    <menu name="Overview">
+      <item name="Introduction" href="index.html"/>
+      <item name="Goals" href="plugin-info.html"/>
+      <item name="Usage" href="usage.html"/>
+      <item name="FAQ" href="faq.html"/>
+    </menu>
+    <menu name="Examples">
+      <item name="Skipping Tests" href="examples/skipping-test.html"/>
+      <item name="Inclusions and Exclusions of Tests" href="examples/inclusion-exclusion.html"/>
+      <item name="Running a Single Test" href="examples/single-test.html"/>
+      <item name="Class Loading Issues" href="examples/class-loading.html"/>
+      <item name="Forking" href="examples/forking.html"/>
+      <item name="Using System Properties" href="examples/system-properties.html"/>
+      <item name="Using TestNG" href="examples/testng.html"/>
+    </menu>
+  </body>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>surefire</artifactId>
+    <groupId>org.apache.maven.surefire</groupId>
+    <version>2.4-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>maven-surefire-report-plugin</artifactId>
+  <groupId>org.apache.maven.plugins</groupId>
+  <packaging>maven-plugin</packaging>
+  <name>Maven Surefire Report Plugin</name>
+  <prerequisites>
+    <maven>2.0.3</maven>
+  </prerequisites>
+  <developers>
+    <developer>
+      <id>jruiz</id>
+      <name>Johnny Ruiz III</name>
+      <email>jruiz at exist.com</email>
+    </developer>
+  </developers>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.reporting</groupId>
+      <artifactId>maven-reporting-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.reporting</groupId>
+      <artifactId>maven-reporting-impl</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-plugin-testing-harness</artifactId>
+      <scope>test</scope>
+      <version>1.0-beta-1</version>
+    </dependency>
+  </dependencies>
+
+  <profiles>
+    <!-- Force JDK 1.4 for this one, plugins can never be built on 1.3 -->
+    <profile>
+      <id>jdk1.3</id>
+      <build>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <artifactId>maven-compiler-plugin</artifactId>
+              <configuration>
+                <fork>false</fork>
+                <compilerVersion>1.4</compilerVersion>
+              </configuration>
+            </plugin>
+            <plugin>
+              <artifactId>maven-surefire-plugin</artifactId>
+              <configuration>
+                <forkMode>once</forkMode>
+                <childDelegation>true</childDelegation>
+                <jvm>${java.home}/bin/java</jvm>
+              </configuration>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+    </profile>
+    <profile>
+      <id>ci</id>
+      <activation>
+        <property>
+          <name>enableCiProfile</name>
+          <value>true</value>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-docck-plugin</artifactId>
+            <version>1.0-beta-1</version>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>check</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+  <distributionManagement>
+    <site>
+      <id>apache.website</id>
+      <url>scp://people.apache.org/www/maven.apache.org/plugins/maven-surefire-report-plugin</url>
+    </site>
+  </distributionManagement>
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestCase.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestCase.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestCase.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,100 @@
+package org.apache.maven.plugins.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ReportTestCase
+{
+    private String fullClassName;
+
+    private String className;
+
+    private String fullName;
+
+    private String name;
+
+    private float time;
+
+    private Map failure;
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    public String getFullClassName()
+    {
+        return fullClassName;
+    }
+
+    public void setFullClassName( String name )
+    {
+        this.fullClassName = name;
+    }
+
+    public String getClassName()
+    {
+        return className;
+    }
+
+    public void setClassName( String name )
+    {
+        this.className = name;
+    }
+
+    public float getTime()
+    {
+        return time;
+    }
+
+    public void setTime( float time )
+    {
+        this.time = time;
+    }
+
+    public Map getFailure()
+    {
+        return failure;
+    }
+
+    public String getFullName()
+    {
+        return fullName;
+    }
+
+    public void setFullName( String fullName )
+    {
+        this.fullName = fullName;
+    }
+
+    public void addFailure( String message, String type )
+    {
+        failure = new HashMap();
+        failure.put( "message", message );
+        failure.put( "type", type );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestSuite.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestSuite.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestSuite.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,322 @@
+package org.apache.maven.plugins.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import java.io.File;
+import java.io.IOException;
+import java.text.NumberFormat;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+public class ReportTestSuite
+    extends DefaultHandler
+{
+    private List testCases;
+
+    private int numberOfErrors;
+
+    private int numberOfFailures;
+
+    private int numberOfSkipped;
+
+    private int numberOfTests;
+
+    private String name;
+
+    private String fullClassName;
+
+    private String packageName;
+
+    private float timeElapsed;
+
+    private NumberFormat numberFormat = NumberFormat.getInstance();
+
+    /**
+     * @noinspection StringBufferField
+     */
+    private StringBuffer currentElement;
+
+    private ReportTestCase testCase;
+
+    public void parse( String xmlPath )
+        throws ParserConfigurationException, SAXException, IOException
+    {
+        SAXParserFactory factory = SAXParserFactory.newInstance();
+
+        SAXParser saxParser = factory.newSAXParser();
+
+        saxParser.parse( new File( xmlPath ), this );
+    }
+
+
+    private int getAttributeAsInt( Attributes attributes, String name )
+    {
+        // may or may not exist
+        String valueAsString = attributes.getValue( name );
+        if ( valueAsString != null )
+        {
+            return Integer.parseInt( valueAsString );
+        }
+        return 0;
+    }
+
+    public void startElement( String uri, String localName, String qName, Attributes attributes )
+        throws SAXException
+    {
+        try
+        {
+            if ( "testsuite".equals( qName ) )
+            {
+                numberOfErrors = getAttributeAsInt( attributes, "errors" );
+                numberOfFailures = getAttributeAsInt( attributes, "failures" );
+                numberOfSkipped = getAttributeAsInt( attributes, "skipped" );
+                numberOfTests = getAttributeAsInt( attributes, "tests" );
+
+                Number time = numberFormat.parse( attributes.getValue( "time" ) );
+
+                timeElapsed = time.floatValue();
+
+                //check if group attribute is existing
+                if ( attributes.getValue( "group" ) != null && !"".equals( attributes.getValue( "group" ) ) )
+                {
+                    packageName = attributes.getValue( "group" );
+
+                    name = attributes.getValue( "name" );
+
+                    fullClassName = packageName + "." + name;
+                }
+                else
+                {
+                    fullClassName = attributes.getValue( "name" );
+
+                    name = fullClassName.substring( fullClassName.lastIndexOf( "." ) + 1, fullClassName.length() );
+
+                    int lastDotPosition = fullClassName.lastIndexOf( "." );
+                    if ( lastDotPosition < 0 )
+                    {
+                        /* no package name */
+                        packageName = "";
+                    }
+                    else
+                    {
+                        packageName = fullClassName.substring( 0, lastDotPosition );
+                    }
+                }
+
+                testCases = new ArrayList();
+            }
+            else if ( "testcase".equals( qName ) )
+            {
+                currentElement = new StringBuffer();
+
+                testCase = new ReportTestCase();
+
+                testCase.setFullClassName( fullClassName );
+
+                testCase.setName( attributes.getValue( "name" ) );
+
+                testCase.setClassName( name );
+
+                String timeAsString = attributes.getValue( "time" );
+
+                Number time = new Integer( 0 );
+
+                if ( timeAsString != null )
+                {
+                    time = numberFormat.parse( timeAsString );
+                }
+
+                testCase.setTime( time.floatValue() );
+
+                testCase.setFullName( packageName + "." + name + "." + testCase.getName() );
+            }
+            else if ( "failure".equals( qName ) )
+            {
+                testCase.addFailure( attributes.getValue( "message" ), attributes.getValue( "type" ) );
+            }
+            else if ( "error".equals( qName ) )
+            {
+                testCase.addFailure( attributes.getValue( "message" ), attributes.getValue( "type" ) );
+            }
+        }
+        catch ( ParseException e )
+        {
+            throw new SAXException( e.getMessage(), e );
+        }
+    }
+
+    public void endElement( String uri, String localName, String qName )
+        throws SAXException
+    {
+        if ( "testcase".equals( qName ) )
+        {
+            testCases.add( testCase );
+        }
+        else if ( "failure".equals( qName ) )
+        {
+            Map failure = testCase.getFailure();
+
+            failure.put( "detail", parseCause( currentElement.toString() ) );
+        }
+        else if ( "error".equals( qName ) )
+        {
+            Map error = testCase.getFailure();
+
+            error.put( "detail", parseCause( currentElement.toString() ) );
+        }
+    }
+
+    public void characters( char[] ch, int start, int length )
+        throws SAXException
+    {
+        String s = new String( ch, start, length );
+
+        if ( !"".equals( s.trim() ) )
+        {
+            currentElement.append( s );
+        }
+    }
+
+    public List getTestCases()
+    {
+        return this.testCases;
+    }
+
+    public int getNumberOfErrors()
+    {
+        return numberOfErrors;
+    }
+
+    public void setNumberOfErrors( int numberOfErrors )
+    {
+        this.numberOfErrors = numberOfErrors;
+    }
+
+    public int getNumberOfFailures()
+    {
+        return numberOfFailures;
+    }
+
+    public void setNumberOfFailures( int numberOfFailures )
+    {
+        this.numberOfFailures = numberOfFailures;
+    }
+
+    public int getNumberOfSkipped()
+    {
+        return numberOfSkipped;
+    }
+
+    public void setNumberOfSkipped( int numberOfSkipped )
+    {
+        this.numberOfSkipped = numberOfSkipped;
+    }
+
+    public int getNumberOfTests()
+    {
+        return numberOfTests;
+    }
+
+    public void setNumberOfTests( int numberOfTests )
+    {
+        this.numberOfTests = numberOfTests;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    public String getFName()
+    {
+        return name;
+    }
+
+    public void setFName( String name )
+    {
+        this.name = name;
+    }
+
+    public String getPackageName()
+    {
+        return packageName;
+    }
+
+    public void setPackageName( String packageName )
+    {
+        this.packageName = packageName;
+    }
+
+    public float getTimeElapsed()
+    {
+        return this.timeElapsed;
+    }
+
+    public void setTimeElapsed( float timeElapsed )
+    {
+        this.timeElapsed = timeElapsed;
+    }
+
+    private List parseCause( String detail )
+    {
+        String fullName = testCase.getFullName();
+        String name = fullName.substring( fullName.lastIndexOf( "." ) + 1 );
+        return parseCause( detail, name );
+    }
+
+    private List parseCause( String detail, String compareTo )
+    {
+        StringTokenizer stringTokenizer = new StringTokenizer( detail, "\n" );
+        List parsedDetail = new ArrayList( stringTokenizer.countTokens() );
+
+        while ( stringTokenizer.hasMoreTokens() )
+        {
+            String lineString = stringTokenizer.nextToken().trim();
+            parsedDetail.add( lineString );
+            if ( lineString.indexOf( compareTo ) >= 0 )
+            {
+                break;
+            }
+        }
+
+        return parsedDetail;
+    }
+
+    public void setTestCases( List testCases )
+    {
+        this.testCases = Collections.unmodifiableList( testCases );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,707 @@
+package org.apache.maven.plugins.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.reporting.MavenReportException;
+import org.codehaus.doxia.sink.Sink;
+
+import java.io.File;
+import java.text.NumberFormat;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+import java.util.StringTokenizer;
+
+public class SurefireReportGenerator
+{
+    private SurefireReportParser report;
+
+    private List testSuites;
+
+    private boolean showSuccess;
+
+    private String xrefLocation;
+
+    public SurefireReportGenerator( File reportsDirectory, Locale locale, boolean showSuccess, String xrefLocation )
+    {
+        report = new SurefireReportParser( reportsDirectory, locale );
+
+        this.xrefLocation = xrefLocation;
+
+        this.showSuccess = showSuccess;
+    }
+
+    public void doGenerateReport( ResourceBundle bundle, Sink sink )
+        throws MavenReportException
+    {
+        testSuites = report.parseXMLReportFiles();
+
+        sink.head();
+
+        sink.text( bundle.getString( "report.surefire.description" ) );
+
+        StringBuffer str = new StringBuffer();
+        str.append( "<script type=\"text/javascript\">\n" );
+        str.append( "function toggleDisplay(elementId) {\n" );
+        str.append( " var elm = document.getElementById(elementId + 'error');\n" );
+        str.append( " if (elm && typeof elm.style != \"undefined\") {\n" );
+        str.append( " if (elm.style.display == \"none\") {\n" );
+        str.append( " elm.style.display = \"\";\n" );
+        str.append( " document.getElementById(elementId + 'off').style.display = \"none\";\n" );
+        str.append( " document.getElementById(elementId + 'on').style.display = \"inline\";\n" );
+        str.append( " }" );
+        str.append( " else if (elm.style.display == \"\") {" );
+        str.append( " elm.style.display = \"none\";\n" );
+        str.append( " document.getElementById(elementId + 'off').style.display = \"inline\";\n" );
+        str.append( " document.getElementById(elementId + 'on').style.display = \"none\";\n" );
+        str.append( " } \n" );
+        str.append( " } \n" );
+        str.append( " }\n" );
+        str.append( "</script>" );
+        sink.rawText( str.toString() );
+
+        sink.head_();
+
+        sink.body();
+
+        constructSummarySection( bundle, sink );
+
+        Map suitePackages = report.getSuitesGroupByPackage( testSuites );
+        if ( !suitePackages.isEmpty() )
+        {
+            constructPackagesSection( bundle, sink, suitePackages );
+        }
+
+        if ( !testSuites.isEmpty() )
+        {
+            constructTestCasesSection( bundle, sink );
+        }
+
+        List failureList = report.getFailureDetails( testSuites );
+        if ( !failureList.isEmpty() )
+        {
+            constructFailureDetails( sink, bundle, failureList );
+        }
+
+        sinkLineBreak( sink );
+
+        sink.body_();
+
+        sink.flush();
+
+        sink.close();
+    }
+
+    private void constructSummarySection( ResourceBundle bundle, Sink sink )
+    {
+        Map summary = report.getSummary( testSuites );
+
+        sink.sectionTitle1();
+
+        sinkAnchor( sink, "Summary" );
+
+        sink.text( bundle.getString( "report.surefire.label.summary" ) );
+
+        sink.sectionTitle1_();
+
+        constructHotLinks( sink, bundle );
+
+        sinkLineBreak( sink );
+
+        sink.table();
+
+        sink.tableRow();
+
+        sinkHeader( sink, bundle.getString( "report.surefire.label.tests" ) );
+
+        sinkHeader( sink, bundle.getString( "report.surefire.label.errors" ) );
+
+        sinkHeader( sink, bundle.getString( "report.surefire.label.failures" ) );
+
+        sinkHeader( sink, bundle.getString( "report.surefire.label.skipped" ) );
+
+        sinkHeader( sink, bundle.getString( "report.surefire.label.successrate" ) );
+
+        sinkHeader( sink, bundle.getString( "report.surefire.label.time" ) );
+
+        sink.tableRow_();
+
+        sink.tableRow();
+
+        sinkCell( sink, (String) summary.get( "totalTests" ) );
+
+        sinkCell( sink, (String) summary.get( "totalErrors" ) );
+
+        sinkCell( sink, (String) summary.get( "totalFailures" ) );
+
+        sinkCell( sink, (String) summary.get( "totalSkipped" ) );
+
+        sinkCell( sink, summary.get( "totalPercentage" ) + "%" );
+
+        sinkCell( sink, (String) summary.get( "totalElapsedTime" ) );
+
+        sink.tableRow_();
+
+        sink.table_();
+
+        sink.lineBreak();
+
+        sink.rawText( bundle.getString( "report.surefire.text.note1" ) );
+
+        sinkLineBreak( sink );
+    }
+
+    private void constructPackagesSection( ResourceBundle bundle, Sink sink, Map suitePackages )
+    {
+        NumberFormat numberFormat = report.getNumberFormat();
+
+        sink.sectionTitle1();
+
+        sinkAnchor( sink, "Package_List" );
+
+        sink.text( bundle.getString( "report.surefire.label.packagelist" ) );
+
+        sink.sectionTitle1_();
+
+        constructHotLinks( sink, bundle );
+
+        sinkLineBreak( sink );
+
+        sink.table();
+
+        sink.tableRow();
+
+        sinkHeader( sink, bundle.getString( "report.surefire.label.package" ) );
+
+        sinkHeader( sink, bundle.getString( "report.surefire.label.tests" ) );
+
+        sinkHeader( sink, bundle.getString( "report.surefire.label.errors" ) );
+
+        sinkHeader( sink, bundle.getString( "report.surefire.label.failures" ) );
+
+        sinkHeader( sink, bundle.getString( "report.surefire.label.skipped" ) );
+
+        sinkHeader( sink, bundle.getString( "report.surefire.label.successrate" ) );
+
+        sinkHeader( sink, bundle.getString( "report.surefire.label.time" ) );
+
+        sink.tableRow_();
+
+        Iterator packIter = suitePackages.keySet().iterator();
+
+        while ( packIter.hasNext() )
+        {
+            sink.tableRow();
+
+            String packageName = (String) packIter.next();
+
+            List testSuiteList = (List) suitePackages.get( packageName );
+
+            Map packageSummary = report.getSummary( testSuiteList );
+
+            sinkCellLink( sink, packageName, "#" + packageName );
+
+            sinkCell( sink, (String) packageSummary.get( "totalTests" ) );
+
+            sinkCell( sink, (String) packageSummary.get( "totalErrors" ) );
+
+            sinkCell( sink, (String) packageSummary.get( "totalFailures" ) );
+
+            sinkCell( sink, (String) packageSummary.get( "totalSkipped" ) );
+
+            sinkCell( sink, packageSummary.get( "totalPercentage" ) + "%" );
+
+            sinkCell( sink, (String) packageSummary.get( "totalElapsedTime" ) );
+
+            sink.tableRow_();
+        }
+
+        sink.table_();
+
+        sink.lineBreak();
+
+        sink.rawText( bundle.getString( "report.surefire.text.note2" ) );
+
+        packIter = suitePackages.keySet().iterator();
+
+        while ( packIter.hasNext() )
+        {
+            String packageName = (String) packIter.next();
+
+            List testSuiteList = (List) suitePackages.get( packageName );
+
+            Iterator suiteIterator = testSuiteList.iterator();
+
+            sink.sectionTitle2();
+
+            sinkAnchor( sink, packageName );
+
+            sink.text( packageName );
+
+            sink.sectionTitle2_();
+
+            sink.table();
+
+            sink.tableRow();
+
+            sinkHeader( sink, "" );
+
+            sinkHeader( sink, bundle.getString( "report.surefire.label.class" ) );
+
+            sinkHeader( sink, bundle.getString( "report.surefire.label.tests" ) );
+
+            sinkHeader( sink, bundle.getString( "report.surefire.label.errors" ) );
+
+            sinkHeader( sink, bundle.getString( "report.surefire.label.failures" ) );
+
+            sinkHeader( sink, bundle.getString( "report.surefire.label.skipped" ) );
+
+            sinkHeader( sink, bundle.getString( "report.surefire.label.successrate" ) );
+
+            sinkHeader( sink, bundle.getString( "report.surefire.label.time" ) );
+
+            sink.tableRow_();
+
+            while ( suiteIterator.hasNext() )
+            {
+                ReportTestSuite suite = (ReportTestSuite) suiteIterator.next();
+
+                if ( showSuccess || suite.getNumberOfErrors() != 0 || suite.getNumberOfFailures() != 0 )
+                {
+
+                    sink.tableRow();
+
+                    sink.tableCell();
+
+                    sink.link( "#" + suite.getPackageName() + suite.getName() );
+
+                    if ( suite.getNumberOfErrors() > 0 )
+                    {
+                        sinkIcon( "error", sink );
+                    }
+                    else if ( suite.getNumberOfFailures() > 0 )
+                    {
+                        sinkIcon( "junit.framework", sink );
+                    }
+                    else
+                    {
+                        sinkIcon( "success", sink );
+                    }
+
+                    sink.link_();
+
+                    sink.tableCell_();
+
+                    sinkCellLink( sink, suite.getName(), "#" + suite.getPackageName() + suite.getName() );
+
+                    sinkCell( sink, Integer.toString( suite.getNumberOfTests() ) );
+
+                    sinkCell( sink, Integer.toString( suite.getNumberOfErrors() ) );
+
+                    sinkCell( sink, Integer.toString( suite.getNumberOfFailures() ) );
+
+                    sinkCell( sink, Integer.toString( suite.getNumberOfSkipped() ) );
+
+                    String percentage = report.computePercentage( suite.getNumberOfTests(), suite.getNumberOfErrors(),
+                                                                  suite.getNumberOfFailures(), suite
+                        .getNumberOfSkipped() );
+                    sinkCell( sink, percentage + "%" );
+
+                    sinkCell( sink, numberFormat.format( suite.getTimeElapsed() ) );
+
+                    sink.tableRow_();
+                }
+            }
+
+            sink.table_();
+        }
+
+        sinkLineBreak( sink );
+    }
+
+    private void constructTestCasesSection( ResourceBundle bundle, Sink sink )
+    {
+        NumberFormat numberFormat = report.getNumberFormat();
+
+        sink.sectionTitle1();
+
+        sinkAnchor( sink, "Test_Cases" );
+
+        sink.text( bundle.getString( "report.surefire.label.testcases" ) );
+
+        sink.sectionTitle1_();
+
+        constructHotLinks( sink, bundle );
+
+        ListIterator suiteIterator = testSuites.listIterator();
+
+        while ( suiteIterator.hasNext() )
+        {
+            ReportTestSuite suite = (ReportTestSuite) suiteIterator.next();
+
+            List testCases = suite.getTestCases();
+
+            if ( testCases != null )
+            {
+                ListIterator caseIterator = testCases.listIterator();
+
+                sink.sectionTitle2();
+
+                sinkAnchor( sink, suite.getPackageName() + suite.getName() );
+
+                sink.text( suite.getName() );
+
+                sink.sectionTitle2_();
+
+                sink.table();
+
+                while ( caseIterator.hasNext() )
+                {
+                    ReportTestCase testCase = (ReportTestCase) caseIterator.next();
+
+                    if ( testCase.getFailure() != null || showSuccess )
+                    {
+                        sink.tableRow();
+
+                        sink.tableCell();
+
+                        Map failure = testCase.getFailure();
+
+                        if ( failure != null )
+                        {
+                            sink.link( "#" + testCase.getFullName() );
+
+                            sinkIcon( (String) failure.get( "type" ), sink );
+
+                            sink.link_();
+                        }
+                        else
+                        {
+                            sinkIcon( "success", sink );
+                        }
+
+                        sink.tableCell_();
+
+                        if ( failure != null )
+                        {
+                            sink.tableCell();
+
+                            sinkLink( sink, testCase.getName(), "#" + testCase.getFullName() );
+
+                            sink.rawText( "  <div class=\"detailToggle\" style=\"display:inline\">" );
+
+                            sink.link( "javascript:toggleDisplay('" + testCase.getName() + "');" );
+
+                            sink.rawText( "<span style=\"display: inline;\" " + "id=\"" + testCase.getName() +
+                                "off\">+</span><span id=\"" + testCase.getName() + "on\" " +
+                                "style=\"display: none;\">-</span> " );
+                            sink.text( "[ Detail ]" );
+                            sink.link_();
+
+                            sink.rawText( "</div>" );
+
+                            sink.tableCell_();
+                        }
+                        else
+                        {
+                            sinkCell( sink, testCase.getName() );
+                        }
+
+                        sinkCell( sink, numberFormat.format( testCase.getTime() ) );
+
+                        sink.tableRow_();
+
+                        if ( failure != null )
+                        {
+                            sink.tableRow();
+
+                            sinkCell( sink, "" );
+                            sinkCell( sink, (String) failure.get( "message" ) );
+                            sinkCell( sink, "" );
+                            sink.tableRow_();
+
+                            List detail = (List) failure.get( "detail" );
+                            if ( detail != null )
+                            {
+
+                                sink.tableRow();
+                                sinkCell( sink, "" );
+
+                                sink.tableCell();
+                                sink.rawText(
+                                    "  <div id=\"" + testCase.getName() + "error\" style=\"display:none;\">" );
+
+                                Iterator it = detail.iterator();
+
+                                sink.verbatim( true );
+                                while ( it.hasNext() )
+                                {
+                                    sink.text( it.next().toString() );
+                                    sink.lineBreak();
+                                }
+                                sink.verbatim_();
+
+                                sink.rawText( "</div>" );
+                                sink.tableCell_();
+
+                                sinkCell( sink, "" );
+
+                                sink.tableRow_();
+                            }
+                        }
+                    }
+                }
+
+                sink.table_();
+            }
+        }
+
+        sinkLineBreak( sink );
+    }
+
+    private void constructFailureDetails( Sink sink, ResourceBundle bundle, List failureList )
+    {
+        Iterator failIter = failureList.iterator();
+
+        if ( failIter != null )
+        {
+            sink.sectionTitle1();
+
+            sinkAnchor( sink, "Failure_Details" );
+
+            sink.text( bundle.getString( "report.surefire.label.failuredetails" ) );
+
+            sink.sectionTitle1_();
+
+            constructHotLinks( sink, bundle );
+
+            sinkLineBreak( sink );
+
+            sink.table();
+
+            while ( failIter.hasNext() )
+            {
+                ReportTestCase tCase = (ReportTestCase) failIter.next();
+
+                Map failure = tCase.getFailure();
+
+                sink.tableRow();
+
+                sink.tableCell();
+
+                String type = (String) failure.get( "type" );
+                sinkIcon( type, sink );
+
+                sink.tableCell_();
+
+                sinkCellAnchor( sink, tCase.getName(), tCase.getFullName() );
+
+                sink.tableRow_();
+
+                String message = (String) failure.get( "message" );
+
+                sink.tableRow();
+
+                sinkCell( sink, "" );
+
+                StringBuffer sb = new StringBuffer();
+                sb.append( type );
+
+                if ( message != null )
+                {
+                    sb.append( ": " );
+                    sb.append( message );
+                }
+
+                sinkCell( sink, sb.toString() );
+
+                sink.tableRow_();
+
+                List detail = (List) failure.get( "detail" );
+                if ( detail != null )
+                {
+                    Iterator it = detail.iterator();
+
+                    boolean firstLine = true;
+
+                    String techMessage = "";
+                    while ( it.hasNext() )
+                    {
+                        techMessage = it.next().toString();
+                        if ( firstLine )
+                        {
+                            firstLine = false;
+                        }
+                        else
+                        {
+                            sink.text( "    " );
+                        }
+                    }
+
+                    sink.tableRow();
+
+                    sinkCell( sink, "" );
+
+                    sink.tableCell();
+                    sink.rawText( "  <div id=\"" + tCase.getName() + "error\" >" );
+
+                    if ( xrefLocation != null )
+                    {
+                        String path = tCase.getFullClassName().replace( '.', '/' );
+
+                        sink.link( xrefLocation + "/" + path + ".html#" +
+                            getErrorLineNumber( tCase.getFullName(), techMessage ) );
+                    }
+                    sink.text(
+                        tCase.getFullClassName() + ":" + getErrorLineNumber( tCase.getFullName(), techMessage ) );
+
+                    if ( xrefLocation != null )
+                    {
+                        sink.link_();
+                    }
+                    sink.rawText( "</div>" );
+
+                    sink.tableCell_();
+
+                    sink.tableRow_();
+                }
+            }
+
+            sink.table_();
+        }
+
+        sinkLineBreak( sink );
+    }
+
+    private String getErrorLineNumber( String className, String source )
+    {
+        StringTokenizer tokenizer = new StringTokenizer( source );
+
+        String lineNo = "";
+
+        while ( tokenizer.hasMoreTokens() )
+        {
+            String token = tokenizer.nextToken();
+            if ( token.startsWith( className ) )
+            {
+                int idx = token.indexOf( ":" );
+                lineNo = token.substring( idx + 1, token.indexOf( ")" ) );
+                break;
+            }
+        }
+        return lineNo;
+    }
+
+    private void constructHotLinks( Sink sink, ResourceBundle bundle )
+    {
+        if ( !testSuites.isEmpty() )
+        {
+            sink.section2();
+
+            sink.rawText( "[" );
+            sinkLink( sink, bundle.getString( "report.surefire.label.summary" ), "#Summary" );
+            sink.rawText( "]" );
+
+            sink.rawText( "[" );
+            sinkLink( sink, bundle.getString( "report.surefire.label.packagelist" ), "#Package_List" );
+            sink.rawText( "]" );
+
+            sink.rawText( "[" );
+            sinkLink( sink, bundle.getString( "report.surefire.label.testcases" ), "#Test_Cases" );
+            sink.rawText( "]" );
+            sink.section2_();
+        }
+    }
+
+    private void sinkLineBreak( Sink sink )
+    {
+        sink.table();
+        sink.tableRow();
+        sink.tableRow_();
+        sink.tableRow();
+        sink.tableRow_();
+        sink.table_();
+    }
+
+    private void sinkIcon( String type, Sink sink )
+    {
+        sink.figure();
+
+        if ( type.startsWith( "junit.framework" ) )
+        {
+            sink.figureGraphics( "images/icon_warning_sml.gif" );
+        }
+        else if ( type.startsWith( "success" ) )
+        {
+            sink.figureGraphics( "images/icon_success_sml.gif" );
+        }
+        else
+        {
+            sink.figureGraphics( "images/icon_error_sml.gif" );
+        }
+
+        sink.figure_();
+    }
+
+    private void sinkHeader( Sink sink, String header )
+    {
+        sink.tableHeaderCell();
+        sink.text( header );
+        sink.tableHeaderCell_();
+    }
+
+    private void sinkCell( Sink sink, String text )
+    {
+        sink.tableCell();
+        sink.text( text );
+        sink.tableCell_();
+    }
+
+    private void sinkLink( Sink sink, String text, String link )
+    {
+        sink.link( link );
+        sink.text( text );
+        sink.link_();
+    }
+
+    private void sinkCellLink( Sink sink, String text, String link )
+    {
+        sink.tableCell();
+        sinkLink( sink, text, link );
+        sink.tableCell_();
+    }
+
+    private void sinkCellAnchor( Sink sink, String text, String anchor )
+    {
+        sink.tableCell();
+        sinkAnchor( sink, anchor );
+        sink.text( text );
+        sink.tableCell_();
+    }
+
+    private void sinkAnchor( Sink sink, String anchor )
+    {
+        sink.anchor( anchor );
+        sink.anchor_();
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,202 @@
+package org.apache.maven.plugins.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.handler.ArtifactHandler;
+import org.apache.maven.model.ReportPlugin;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.reporting.AbstractMavenReport;
+import org.apache.maven.reporting.MavenReportException;
+import org.codehaus.doxia.site.renderer.SiteRenderer;
+import org.codehaus.plexus.util.PathTool;
+import org.codehaus.plexus.util.StringUtils;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+
+/**
+ * Creates a nicely formatted Surefire Test Report in html format.
+ *
+ * @author <a href="mailto:jruiz at exist.com">Johnny R. Ruiz III</a>
+ * @version $Id$
+ * @goal report
+ * @execute phase="test" lifecycle="surefire"
+ */
+public class SurefireReportMojo
+    extends AbstractMavenReport
+{
+    /**
+     * Location where generated html will be created.
+     *
+     * @parameter expression="${project.reporting.outputDirectory}"
+     */
+    private String outputDirectory;
+
+    /**
+     * Doxia Site Renderer
+     *
+     * @parameter expression="${component.org.codehaus.doxia.site.renderer.SiteRenderer}"
+     * @required @readonly
+     */
+    private SiteRenderer siteRenderer;
+
+    /**
+     * Maven Project
+     *
+     * @parameter expression="${project}"
+     * @required @readonly
+     */
+    private MavenProject project;
+
+    /**
+     * If set to false, only failures are shown.
+     *
+     * @parameter expression="${showSuccess}" default-value="true"
+     * @required
+     */
+    private boolean showSuccess;
+
+    /**
+     * This directory contains the XML Report files that will be parsed and rendered to HTML format.
+     *
+     * @parameter expression="${project.build.directory}/surefire-reports"
+     * @required
+     */
+    private File reportsDirectory;
+
+    /**
+     * The filename to use for the report.
+     *
+     * @parameter expression="${outputName}" default-value="surefire-report"
+     * @required
+     */
+    private String outputName;
+
+    /**
+     * Location of the Xrefs to link.
+     *
+     * @parameter default-value="${project.reporting.outputDirectory}/xref-test"
+     */
+    private File xrefLocation;
+
+    /**
+     * Whether to link the XRef if found.
+     *
+     * @parameter expression="${linkXRef}" default-value="true"
+     */
+    private boolean linkXRef;
+
+    public void executeReport( Locale locale )
+        throws MavenReportException
+    {
+        SurefireReportGenerator report =
+            new SurefireReportGenerator( reportsDirectory, locale, showSuccess, determineXrefLocation() );
+
+        report.doGenerateReport( getBundle( locale ), getSink() );
+    }
+
+    private String determineXrefLocation()
+    {
+        String location = null;
+
+        if ( linkXRef )
+        {
+            String relativePath = PathTool.getRelativePath( outputDirectory, xrefLocation.getAbsolutePath() );
+            if ( StringUtils.isEmpty( relativePath ) )
+            {
+                relativePath = ".";
+            }
+            relativePath = relativePath + "/" + xrefLocation.getName();
+            if ( xrefLocation.exists() )
+            {
+                // XRef was already generated by manual execution of a lifecycle binding
+                location = relativePath;
+            }
+            else
+            {
+                // Not yet generated - check if the report is on its way
+                for ( Iterator reports = project.getReportPlugins().iterator(); reports.hasNext(); )
+                {
+                    ReportPlugin report = (ReportPlugin) reports.next();
+
+                    String artifactId = report.getArtifactId();
+                    if ( "maven-jxr-plugin".equals( artifactId ) || "jxr-maven-plugin".equals( artifactId ) )
+                    {
+                        location = relativePath;
+                    }
+                }
+            }
+
+            if ( location == null )
+            {
+                getLog().warn( "Unable to locate Test Source XRef to link to - DISABLED" );
+            }
+        }
+        return location;
+    }
+
+    public String getName( Locale locale )
+    {
+        return getBundle( locale ).getString( "report.surefire.name" );
+    }
+
+    public String getDescription( Locale locale )
+    {
+        return getBundle( locale ).getString( "report.surefire.description" );
+    }
+
+    protected SiteRenderer getSiteRenderer()
+    {
+        return siteRenderer;
+    }
+
+    protected MavenProject getProject()
+    {
+        return project;
+    }
+
+    public String getOutputName()
+    {
+        return outputName;
+    }
+
+    protected String getOutputDirectory()
+    {
+        return outputDirectory;
+    }
+
+    private ResourceBundle getBundle( Locale locale )
+    {
+        return ResourceBundle.getBundle( "surefire-report", locale, this.getClass().getClassLoader() );
+    }
+
+    /**
+     * @see org.apache.maven.reporting.AbstractMavenReport#canGenerateReport()
+     */
+    public boolean canGenerateReport()
+    {
+        // Only execute reports for java projects
+        ArtifactHandler artifactHandler = this.project.getArtifact().getArtifactHandler();
+        return "java".equals( artifactHandler.getLanguage() );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportOnlyMojo.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportOnlyMojo.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportOnlyMojo.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,37 @@
+package org.apache.maven.plugins.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Creates a nicely formatted Surefire Test Report in html format.
+ * This goal does not run the tests, it only builds the reports.
+ * This is a workaround for
+ * <a href="http://jira.codehaus.org/browse/MSUREFIREREP-6">http://jira.codehaus.org/browse/MSUREFIREREP-6</a>
+ *
+ * @author <a href="mailto:baerrach at gmail.com">Barrie Treloar</a>
+ * @goal report-only
+ * @execute phase="validate" lifecycle="surefire"
+ * @since 2.3
+ */
+public class SurefireReportOnlyMojo
+    extends SurefireReportMojo
+{
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,278 @@
+package org.apache.maven.plugins.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.reporting.MavenReportException;
+import org.codehaus.plexus.util.DirectoryScanner;
+import org.codehaus.plexus.util.StringUtils;
+import org.xml.sax.SAXException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.File;
+import java.io.IOException;
+import java.text.NumberFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Locale;
+import java.util.Map;
+
+public class SurefireReportParser
+{
+    private NumberFormat numberFormat = NumberFormat.getInstance();
+
+    private File reportsDirectory;
+
+    private List testSuites = new ArrayList();
+
+    private Locale locale;
+
+    private static final int PCENT = 100;
+
+    public SurefireReportParser()
+    {
+    }
+
+    public SurefireReportParser( File reportsDirectory, Locale locale )
+    {
+        this.reportsDirectory = reportsDirectory;
+
+        setLocale( locale );
+    }
+
+    public List parseXMLReportFiles()
+        throws MavenReportException
+    {
+        if ( reportsDirectory.exists() )
+        {
+            String[] xmlReportFiles = getIncludedFiles( reportsDirectory, "*.xml", "*.txt" );
+
+            for ( int index = 0; index < xmlReportFiles.length; index++ )
+            {
+                ReportTestSuite testSuite = new ReportTestSuite();
+
+                String currentReport = xmlReportFiles[index];
+
+                try
+                {
+                    testSuite.parse( reportsDirectory + "/" + currentReport );
+                }
+                catch ( ParserConfigurationException e )
+                {
+                    throw new MavenReportException( "Error setting up parser for JUnit XML report", e );
+                }
+                catch ( SAXException e )
+                {
+                    throw new MavenReportException( "Error parsing JUnit XML report " + currentReport, e );
+                }
+                catch ( IOException e )
+                {
+                    throw new MavenReportException( "Error reading JUnit XML report " + currentReport, e );
+                }
+
+                testSuites.add( testSuite );
+            }
+        }
+
+        return testSuites;
+    }
+
+    protected String parseTestSuiteName( String lineString )
+    {
+        return lineString.substring( lineString.lastIndexOf( "." ) + 1, lineString.length() );
+    }
+
+    protected String parseTestSuitePackageName( String lineString )
+    {
+        return lineString.substring( lineString.indexOf( ":" ) + 2, lineString.lastIndexOf( "." ) );
+    }
+
+    protected String parseTestCaseName( String lineString )
+    {
+        return lineString.substring( 0, lineString.indexOf( "(" ) );
+    }
+
+    public Map getSummary( List suites )
+    {
+        Map totalSummary = new HashMap();
+
+        ListIterator iter = suites.listIterator();
+
+        int totalNumberOfTests = 0;
+
+        int totalNumberOfErrors = 0;
+
+        int totalNumberOfFailures = 0;
+
+        int totalNumberOfSkipped = 0;
+
+        float totalElapsedTime = 0.0f;
+
+        while ( iter.hasNext() )
+        {
+            ReportTestSuite suite = (ReportTestSuite) iter.next();
+
+            totalNumberOfTests += suite.getNumberOfTests();
+
+            totalNumberOfErrors += suite.getNumberOfErrors();
+
+            totalNumberOfFailures += suite.getNumberOfFailures();
+
+            totalNumberOfSkipped += suite.getNumberOfSkipped();
+
+            totalElapsedTime += suite.getTimeElapsed();
+        }
+
+        String totalPercentage =
+            computePercentage( totalNumberOfTests, totalNumberOfErrors, totalNumberOfFailures, totalNumberOfSkipped );
+
+        totalSummary.put( "totalTests", Integer.toString( totalNumberOfTests ) );
+
+        totalSummary.put( "totalErrors", Integer.toString( totalNumberOfErrors ) );
+
+        totalSummary.put( "totalFailures", Integer.toString( totalNumberOfFailures ) );
+
+        totalSummary.put( "totalSkipped", Integer.toString( totalNumberOfSkipped ) );
+
+        totalSummary.put( "totalElapsedTime", numberFormat.format( totalElapsedTime ) );
+
+        totalSummary.put( "totalPercentage", totalPercentage );
+
+        return totalSummary;
+    }
+
+    public void setReportsDirectory( File reportsDirectory )
+    {
+        this.reportsDirectory = reportsDirectory;
+    }
+
+    public File getReportsDirectory()
+    {
+        return this.reportsDirectory;
+    }
+
+    public final void setLocale( Locale locale )
+    {
+        this.locale = locale;
+        numberFormat = NumberFormat.getInstance( locale );
+    }
+
+    public Locale getLocale()
+    {
+        return this.locale;
+    }
+
+    public void setNumberFormat( NumberFormat numberFormat )
+    {
+        this.numberFormat = numberFormat;
+    }
+
+    public NumberFormat getNumberFormat()
+    {
+        return this.numberFormat;
+    }
+
+    public Map getSuitesGroupByPackage( List testSuitesList )
+    {
+        ListIterator iter = testSuitesList.listIterator();
+
+        Map suitePackage = new HashMap();
+
+        while ( iter.hasNext() )
+        {
+            ReportTestSuite suite = (ReportTestSuite) iter.next();
+
+            List suiteList = new ArrayList();
+
+            if ( suitePackage.get( suite.getPackageName() ) != null )
+            {
+                suiteList = (List) suitePackage.get( suite.getPackageName() );
+            }
+
+            suiteList.add( suite );
+
+            suitePackage.put( suite.getPackageName(), suiteList );
+        }
+
+        return suitePackage;
+    }
+
+    public String computePercentage( int tests, int errors, int failures, int skipped )
+    {
+        float percentage;
+        if ( tests == 0 )
+        {
+            percentage = 0;
+        }
+        else
+        {
+            percentage = ( (float) ( tests - errors - failures - skipped ) / (float) tests ) * PCENT;
+        }
+
+        return numberFormat.format( percentage );
+    }
+
+    public List getFailureDetails( List testSuitesList )
+    {
+        ListIterator iter = testSuitesList.listIterator();
+
+        List failureDetailList = new ArrayList();
+
+        while ( iter.hasNext() )
+        {
+            ReportTestSuite suite = (ReportTestSuite) iter.next();
+
+            List testCaseList = suite.getTestCases();
+
+            if ( testCaseList != null )
+            {
+                ListIterator caseIter = testCaseList.listIterator();
+
+                while ( caseIter.hasNext() )
+                {
+                    ReportTestCase tCase = (ReportTestCase) caseIter.next();
+
+                    if ( tCase.getFailure() != null )
+                    {
+                        failureDetailList.add( tCase );
+                    }
+                }
+            }
+        }
+
+        return failureDetailList;
+    }
+
+    private String[] getIncludedFiles( File directory, String includes, String excludes )
+    {
+        DirectoryScanner scanner = new DirectoryScanner();
+
+        scanner.setBasedir( directory );
+
+        scanner.setIncludes( StringUtils.split( includes, "," ) );
+
+        scanner.setExcludes( StringUtils.split( excludes, "," ) );
+
+        scanner.scan();
+
+        return scanner.getIncludedFiles();
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/resources/META-INF/maven/lifecycle.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/resources/META-INF/maven/lifecycle.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/resources/META-INF/maven/lifecycle.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,34 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<lifecycles>
+  <lifecycle>
+    <id>surefire</id>
+    <phases>
+      <phase>
+        <id>test</id>
+        <configuration>
+          <testFailureIgnore>true</testFailureIgnore>
+        </configuration>
+      </phase>
+    </phases>
+  </lifecycle>
+</lifecycles>
+
+

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/resources/surefire-report.properties
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/resources/surefire-report.properties	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/main/resources/surefire-report.properties	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+report.surefire.name=Maven Surefire Report
+report.surefire.description=Report on the test results of the project.
+report.surefire.header=Maven Surefire Report
+report.surefire.label.summary=Summary
+report.surefire.label.tests=Tests
+report.surefire.label.errors=Errors 
+report.surefire.label.failures=Failures
+report.surefire.label.skipped=Skipped
+report.surefire.label.successrate=Success Rate
+report.surefire.label.time=Time
+report.surefire.label.packagelist=Package List
+report.surefire.label.package=Package
+report.surefire.label.class=Class
+report.surefire.label.testcases=Test Cases
+report.surefire.label.failuredetails=Failure Details
+report.surefire.text.note1=Note: failures are anticipated and checked for with assertions while errors are unanticipated.
+report.surefire.text.note2=Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.
+

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/changing-report-name.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/changing-report-name.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/changing-report-name.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,51 @@
+  ------
+  Changing Report Name
+  ------
+  Allan Ramirez
+  ------
+  July 2006
+  ------
+
+~~ Copyright 2006 The Apache Software Foundation.
+~~
+~~ Licensed under the Apache License, Version 2.0 (the "License");
+~~ you may not use this file except in compliance with the License.
+~~ You may obtain a copy of the License at
+~~
+~~      http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Changing Report Name
+
+  In order to configure the file name of the generated report(which is
+  <"surefire-report"> by default), the <<outputName>> property should
+  be set to its new name.
+
++----+
+<project>
+  [...]
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <configuration>
+           <outputName>newname</outputName>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+  [...]
+</project>
++----+
+
+  And after executing the <<<mvn site>>>, the generated report file is named
+  to <<newname.html>>.

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/cross-referencing.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/cross-referencing.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/cross-referencing.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,82 @@
+  ------
+  Source Code Cross Reference
+  ------
+  Allan Ramirez
+  ------
+  July 2006
+  ------
+
+~~ Copyright 2006 The Apache Software Foundation.
+~~
+~~ Licensed under the Apache License, Version 2.0 (the "License");
+~~ you may not use this file except in compliance with the License.
+~~ You may obtain a copy of the License at
+~~
+~~      http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Source Code Cross Reference
+
+  There are times when we need to know right away the line number of the
+  source code that caused the failure of the test. The surefire-report plugin
+  has the capability to cross reference the source code that made the test
+  failed. To be able to activate it, the <<<maven-jxr-plugin>>> should
+  also be declared in the \<reporting\> section of the pom along with the
+  <<<maven-surefire-report-plugin>>>. For more reference about
+  <<<maven-jxr-plugin>>> please click
+  {{{http://maven.apache.org/plugins/maven-jxr-plugin/}here}}.
+
++----+
+<project>
+  [...]
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <configuration>
+           <!-- place your configuration here -->
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jxr-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+  [...]
+</project>
++----+
+
+  After executing <<<mvn site>>> for site generation, You'll notice that from
+  the <<Failure Details>> section of the report, the link is available to
+  redirect you to the source code that caused the failure.
+
+  From the figure below the code that caused the failure is
+  <com.test.proj.AppTest:36>
+
+[../images/failure-details.PNG] Failure Details
+
+  The link will redirect you to the source by clicking it.
+
+[../images/xref.PNG] The source
+
+* Disable the Cross Reference Link
+
+  To disable the link to the source code, the <<linkXRef>> property should
+  be set to <<false>>. Or another way is by not declaring the
+  <<<maven-jxr-plugin>>> to the \<reporting\> section.
+
+  
+
+
+
+  

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/report-custom-location.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/report-custom-location.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/report-custom-location.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,70 @@
+  ------
+  Custom Location of the Surefire Report
+  ------
+  Allan Ramirez
+  ------
+  July 2006
+  ------
+
+~~ Copyright 2006 The Apache Software Foundation.
+~~
+~~ Licensed under the Apache License, Version 2.0 (the "License");
+~~ you may not use this file except in compliance with the License.
+~~ You may obtain a copy of the License at
+~~
+~~      http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Configuring the Output Location as part of the Project Reports
+
+  To change the location of the generated output report along with other
+  project reports. The <<outputDirectory>> property of both
+  <<<maven-site-plugin>>> and <<<maven-surefire-plugin>>> should be set to the
+  new path. For more information about <<<maven-site-plugin>>>, please click
+  {{{http://maven.apache.org/plugins/maven-site-plugin/}here}}.
+
++----+
+<project>
+  [...]
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <configuration>
+           <outputDirectory>${basedir}/target/newsite</outputDirectory>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-site-plugin</artifactId>
+        <configuration>
+           <outputDirectory>${basedir}/target/newsite</outputDirectory>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+  [...]
+</project>
++----+
+
+  Please take note that if the <<outputDirectory>> of the <<<site plugin>>>
+  is not configured, the output location of the surefire-report will still
+  be the default.
+
+* Configuring the Output Location using standalone goal
+
+  To change the location of the generated output report using the standalone
+  goal. The <<outputDirectory>> property should be set to the new path.
+
++---+
+mvn surefire-report:report -DoutputDirectory=newpath
++---+

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/show-failures.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/show-failures.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/examples/show-failures.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,56 @@
+  ------
+  Showing Failure Tests
+  ------
+  Allan Ramirez
+  ------
+  July 2006
+  ------
+
+~~ Copyright 2006 The Apache Software Foundation.
+~~
+~~ Licensed under the Apache License, Version 2.0 (the "License");
+~~ you may not use this file except in compliance with the License.
+~~ You may obtain a copy of the License at
+~~
+~~      http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Showing Failure Tests
+
+  By default, the surefire-report plugin shows all test result status(success
+  and failures) in the generated html. To be able to show the failures only, the
+  property <<showSuccess>> should be set to <<false>>.
+
++----+
+<project>
+  [...]
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <configuration>
+           <showSuccess>false</showSuccess>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+  [...]
+</project>
++----+
+
+  Then execute <<<mvn site>>> for the report generation.
+
+  It can also be set via commandline with the standalone goal.
+
++----+
+  mvn surefire-report:report -DshowSuccess=false
++----+

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/index.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/index.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/index.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,61 @@
+  ------
+  Introduction
+  ------
+  Allan Ramirez
+  ------
+  July 2006
+  ------
+
+~~ Copyright 2006 The Apache Software Foundation.
+~~
+~~ Licensed under the Apache License, Version 2.0 (the "License");
+~~ you may not use this file except in compliance with the License.
+~~ You may obtain a copy of the License at
+~~
+~~      http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Maven Surefire-Report Plugin
+
+  The surefire-report plugin parses the generated TEST-*.xml files under
+  <<<${basedir}/target/surefire-reports>>> and renders them to DOXIA
+  which creates the web interface version of the test results.
+
+* Goals Overview
+
+  Surefire-report plugin only has one goal (the other is a workaround):
+
+  * {{{report-mojo.html}surefire-report:report}} Generates the test
+  results report into html format.
+
+  * {{{report-only-mojo.html}surefire-report:report-only}} This goal does 
+  not run the tests, it only builds the reports. It is provided as a work 
+  around for {{http://jira.codehaus.org/browse/MSUREFIREREP-6}}
+
+  []
+
+* Usage
+
+  Instructions on how to use the surefire-report plugin can be found {{{usage.html}here}}.
+
+* Examples
+
+  The following examples show how to use the surefire-report plugin in more advanced usecases:
+
+  * {{{examples/show-failures.html}Showing Failure Tests}}
+
+  * {{{examples/changing-report-name.html}Changing Report Name}}
+
+  * {{{examples/report-custom-location.html}Configuring the Output Location of the Report}}
+
+  * {{{examples/cross-referencing.html}Source Code Cross Reference}}
+
+  []

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/usage.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/usage.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/apt/usage.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,64 @@
+  ------
+  Usage
+  ------
+  Allan Ramirez
+  ------
+  July 2006
+  ------
+
+~~ Copyright 2006 The Apache Software Foundation.
+~~
+~~ Licensed under the Apache License, Version 2.0 (the "License");
+~~ you may not use this file except in compliance with the License.
+~~ You may obtain a copy of the License at
+~~
+~~      http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Usage
+
+* Generate the report as part of Project Reports
+
+  To generate the surefire-report as part of the site-generation, add the following in
+  the \<reporting\> section of your pom:
+
++---+
+<project>
+  ...
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+  ...
+</project>
++---+
+
+  When the <<<mvn site>>> is invoked, the report will be automatically
+  included in the Project Reports menu as shown in the figure below.
+
+[images/surefire-sample1.PNG] Sample surefire-report
+
+* Generate the report as standalone
+
+  The surefire-report can also generate the report using its standalone goal:
+
++---+
+mvn surefire-report:report  
++---+
+
+  A html report should be generated in <<<${basedir}/target/site/surefire-report.html>>>.
+
+[images/surefire-sample2.PNG] Sample standalone surefire-report
+

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/fml/faq.fml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/fml/faq.fml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/fml/faq.fml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<faqs id="FAQ" title="Frequently Asked Questions">
+  <part id="General">
+    <faq id="question">
+      <question>The surefire-report plugin reruns test. Is this its desired behavior?</question>
+      <answer>
+        <p>
+          No. This is a very known issue for the plugin. Please see
+          <a href="http://jira.codehaus.org/browse/MSUREFIREREP-6">MSUREFIREREP-6</a>
+          for
+          details.
+        </p>
+      </answer>
+    </faq>
+  </part>
+</faqs>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/images/failure-details.PNG
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/images/failure-details.PNG
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/images/surefire-sample1.PNG
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/images/surefire-sample1.PNG
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/images/surefire-sample2.PNG
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/images/surefire-sample2.PNG
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/images/xref.PNG
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/resources/images/xref.PNG
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/site.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/site.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/site/site.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project>
+  <body>
+    <menu name="Overview">
+      <item name="Introduction" href="index.html"/>
+      <item name="Goals" href="plugin-info.html"/>
+      <item name="Usage" href="usage.html"/>
+      <item name="FAQ" href="faq.html"/>
+    </menu>
+    <menu name="Examples">
+      <item name="Showing Failure Tests" href="examples/show-failures.html"/>
+      <item name="Changing Report Name" href="examples/changing-report-name.html"/>
+      <item name="Configuring the Output Location of the Report" href="examples/report-custom-location.html"/>
+      <item name="Source Code Cross Reference" href="examples/cross-referencing.html"/>
+    </menu>
+  </body>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/ReportTestCaseTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/ReportTestCaseTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/ReportTestCaseTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,68 @@
+package org.apache.maven.plugins.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.TestCase;
+
+/**
+ * @author Jontri
+ */
+public class ReportTestCaseTest
+    extends TestCase
+{
+    private ReportTestCase tCase;
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        tCase = new ReportTestCase();
+    }
+
+    public void testSetName()
+    {
+        tCase.setName( "Test Case Name" );
+
+        assertEquals( "Test Case Name", tCase.getName() );
+    }
+
+    public void testSetTime()
+    {
+        tCase.setTime( .06f );
+
+        assertEquals( .06f, tCase.getTime(), 0.0 );
+    }
+
+    public void testSetFailure()
+    {
+        tCase.addFailure( "messageVal", "typeVal" );
+
+        assertEquals( "messageVal", tCase.getFailure().get( "message" ) );
+        assertEquals( "typeVal", tCase.getFailure().get( "type" ) );
+    }
+
+    public void testSetFullName()
+    {
+        tCase.setFullName( "Test Case Full Name" );
+
+        assertEquals( "Test Case Full Name", tCase.getFullName() );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/ReportTestSuiteTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/ReportTestSuiteTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/ReportTestSuiteTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,101 @@
+package org.apache.maven.plugins.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.TestCase;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ReportTestSuiteTest
+    extends TestCase
+{
+    private ReportTestSuite tSuite;
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        tSuite = new ReportTestSuite();
+    }
+
+    public void testSetTestCases()
+    {
+        ReportTestCase tCase = new ReportTestCase();
+
+        List tCaseList = new ArrayList();
+
+        tCaseList.add( tCase );
+
+        tSuite.setTestCases( tCaseList );
+
+        assertEquals( tCase, tSuite.getTestCases().get( 0 ) );
+    }
+
+    public void testSetNumberdOfErrors()
+    {
+        tSuite.setNumberOfErrors( 9 );
+
+        assertEquals( 9, tSuite.getNumberOfErrors() );
+    }
+
+    public void testSetNumberOfFailures()
+    {
+        tSuite.setNumberOfFailures( 10 );
+
+        assertEquals( 10, tSuite.getNumberOfFailures() );
+    }
+
+    public void testSetNumberOfSkipped()
+    {
+        tSuite.setNumberOfSkipped( 5 );
+
+        assertEquals( 5, tSuite.getNumberOfSkipped() );
+    }
+
+    public void testSetNumberOfTests()
+    {
+        tSuite.setNumberOfTests( 11 );
+
+        assertEquals( 11, tSuite.getNumberOfTests() );
+    }
+
+    public void testSetName()
+    {
+        tSuite.setName( "Suite Name" );
+
+        assertEquals( "Suite Name", tSuite.getName() );
+    }
+
+    public void testSetPackageName()
+    {
+        tSuite.setPackageName( "Suite Package Name" );
+
+        assertEquals( "Suite Package Name", tSuite.getPackageName() );
+    }
+
+    public void testSetTimeElapsed()
+    {
+        tSuite.setTimeElapsed( .06f );
+
+        assertEquals( .06f, tSuite.getTimeElapsed(), 0.0 );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,166 @@
+package org.apache.maven.plugins.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.codehaus.plexus.util.FileUtils;
+
+import java.io.File;
+import java.net.URL;
+
+/**
+ * @author <a href="mailto:aramirez at apache.org">Allan Ramirez</a>
+ */
+public class SurefireReportMojoTest
+    extends AbstractMojoTestCase
+{
+    public void testBasicSurefireReport()
+        throws Exception
+    {
+        File testPom = new File( getUnitBaseDir(), "basic-surefire-report-test/plugin-config.xml" );
+
+        SurefireReportMojo mojo = (SurefireReportMojo) lookupMojo( "report", testPom );
+
+        assertNotNull( mojo );
+
+        String outputDir = (String) getVariableValueFromObject( mojo, "outputDirectory" );
+
+        boolean showSuccess = ( (Boolean) getVariableValueFromObject( mojo, "showSuccess" ) ).booleanValue();
+
+        File reportsDir = (File) getVariableValueFromObject( mojo, "reportsDirectory" );
+
+        String outputName = (String) getVariableValueFromObject( mojo, "outputName" );
+
+        File xrefLocation = (File) getVariableValueFromObject( mojo, "xrefLocation" );
+
+        boolean linkXRef = ( (Boolean) getVariableValueFromObject( mojo, "linkXRef" ) ).booleanValue();
+
+        assertEquals( getBasedir() + "/target/site/unit/basic-surefire-report-test", outputDir );
+
+        assertTrue( showSuccess );
+
+        assertEquals( new File(
+            getBasedir() + "/src/test/resources/unit/basic-surefire-report-test/surefire-reports" ).getAbsolutePath(),
+                      reportsDir.getAbsolutePath() );
+
+        assertEquals( "surefire-report", outputName );
+
+        assertEquals(
+            new File( getBasedir() + "/target/site/unit/basic-surefire-report-test/xref-test" ).getAbsolutePath(),
+            xrefLocation.getAbsolutePath() );
+
+        assertTrue( linkXRef );
+
+        mojo.execute();
+
+        File report = new File( getBasedir(), "target/site/unit/basic-surefire-report-test/surefire-report.html" );
+
+        assertTrue( report.exists() );
+
+        String htmlContent = FileUtils.fileRead( report );
+
+        int idx = htmlContent.indexOf( "images/icon_success_sml.gif" );
+
+        assertTrue( idx >= 0 );
+    }
+
+    private File getUnitBaseDir()
+    {
+        URL resource = getClass().getResource( "/unit" );
+        return new File( resource.getPath() ).getAbsoluteFile();
+    }
+
+    public void testBasicSurefireReportIfShowSuccessIsFalse()
+        throws Exception
+    {
+        File testPom = new File( getUnitBaseDir(), "basic-surefire-report-success-false/plugin-config.xml" );
+
+        SurefireReportMojo mojo = (SurefireReportMojo) lookupMojo( "report", testPom );
+
+        assertNotNull( mojo );
+
+        boolean showSuccess = ( (Boolean) getVariableValueFromObject( mojo, "showSuccess" ) ).booleanValue();
+
+        assertFalse( showSuccess );
+
+        mojo.execute();
+
+        File report =
+            new File( getBasedir(), "target/site/unit/basic-surefire-report-success-false/surefire-report.html" );
+
+        assertTrue( report.exists() );
+
+        String htmlContent = FileUtils.fileRead( report );
+
+        int idx = htmlContent.indexOf( "images/icon_success_sml.gif" );
+
+        assertTrue( idx < 0 );
+    }
+
+    public void testBasicSurefireReportIfLinkXrefIsFalse()
+        throws Exception
+    {
+        File testPom = new File( getUnitBaseDir(), "basic-surefire-report-linkxref-false/plugin-config.xml" );
+
+        SurefireReportMojo mojo = (SurefireReportMojo) lookupMojo( "report", testPom );
+
+        assertNotNull( mojo );
+
+        boolean linkXRef = ( (Boolean) getVariableValueFromObject( mojo, "linkXRef" ) ).booleanValue();
+
+        assertFalse( linkXRef );
+
+        mojo.execute();
+
+        File report =
+            new File( getBasedir(), "target/site/unit/basic-surefire-report-success-false/surefire-report.html" );
+
+        assertTrue( report.exists() );
+
+        String htmlContent = FileUtils.fileRead( report );
+
+        int idx = htmlContent.indexOf( "./xref-test/com/shape/CircleTest.html#44" );
+
+        assertTrue( idx >= 0 );
+    }
+
+    public void testBasicSurefireReportIfReportingIsNull()
+        throws Exception
+    {
+        File testPom = new File( getUnitBaseDir(), "basic-surefire-report-reporting-null/plugin-config.xml" );
+
+        SurefireReportMojo mojo = (SurefireReportMojo) lookupMojo( "report", testPom );
+
+        assertNotNull( mojo );
+
+        mojo.execute();
+
+        File report =
+            new File( getBasedir(), "target/site/unit/basic-surefire-report-reporting-null/surefire-report.html" );
+
+        assertTrue( report.exists() );
+
+        String htmlContent = FileUtils.fileRead( report );
+
+        int idx = htmlContent.indexOf( "./xref-test/com/shape/CircleTest.html#44" );
+
+        assertTrue( idx < 0 );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportParserTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportParserTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportParserTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,234 @@
+package org.apache.maven.plugins.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.TestCase;
+import org.apache.maven.reporting.MavenReportException;
+
+import java.io.File;
+import java.net.URL;
+import java.text.NumberFormat;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+public class SurefireReportParserTest
+    extends TestCase
+{
+    private SurefireReportParser report;
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        report = new SurefireReportParser();
+
+        report.setLocale( Locale.ENGLISH );
+    }
+
+    public void testParseXMLReportFiles()
+        throws MavenReportException
+    {
+        report.setReportsDirectory( getTestDir( "/test-reports" ) );
+
+        List suites = report.parseXMLReportFiles();
+
+        assertEquals( 4, suites.size() );
+
+        Iterator it = suites.iterator();
+        while ( it.hasNext() )
+        {
+            ReportTestSuite suite = (ReportTestSuite) it.next();
+            assertNotNull( suite.getName() + " was not correctly parsed", suite.getTestCases() );
+            assertNotNull( suite.getName() );
+            assertNotNull( suite.getPackageName() );
+        }
+    }
+
+    private File getTestDir( String path )
+    {
+        URL resource = getClass().getResource( path );
+        return new File( resource.getPath() );
+    }
+
+    public void testParseTestSuiteName()
+    {
+        assertEquals( "CircleTest", report.parseTestSuiteName( "Battery: com.shape.CircleTest" ) );
+    }
+
+    public void testParseTestSuitePackageName()
+    {
+        assertEquals( "com.shape", report.parseTestSuitePackageName( "Battery: com.shape.CircleTest" ) );
+    }
+
+    public void testParseTestCaseName()
+    {
+        assertEquals( "testCase", report.parseTestCaseName( "testCase(com.shape.CircleTest)" ) );
+    }
+
+    public void testGetSummary()
+        throws Exception
+    {
+        ReportTestSuite tSuite1 = new ReportTestSuite();
+
+        ReportTestSuite tSuite2 = new ReportTestSuite();
+
+        tSuite1.setNumberOfErrors( 10 );
+
+        tSuite1.setNumberOfFailures( 20 );
+
+        tSuite1.setNumberOfSkipped( 2 );
+
+        tSuite1.setTimeElapsed( 1.0f );
+
+        tSuite1.setNumberOfTests( 100 );
+
+        tSuite2.setNumberOfErrors( 10 );
+
+        tSuite2.setNumberOfFailures( 20 );
+
+        tSuite2.setNumberOfSkipped( 2 );
+
+        tSuite2.setTimeElapsed( 1.0f );
+
+        tSuite2.setNumberOfTests( 100 );
+
+        List suiteList = new ArrayList();
+
+        suiteList.add( tSuite1 );
+
+        suiteList.add( tSuite2 );
+
+        Map testMap = report.getSummary( suiteList );
+
+        assertEquals( 20, Integer.parseInt( testMap.get( "totalErrors" ).toString() ) );
+
+        assertEquals( 40, Integer.parseInt( testMap.get( "totalFailures" ).toString() ) );
+
+        assertEquals( 200, Integer.parseInt( testMap.get( "totalTests" ).toString() ) );
+
+        assertEquals( 4, Integer.parseInt( testMap.get( "totalSkipped" ).toString() ) );
+
+        NumberFormat numberFormat = report.getNumberFormat();
+
+        assertEquals( 2.0f, numberFormat.parse( testMap.get( "totalElapsedTime" ).toString() )
+            .floatValue(), 0.0f );
+
+        assertEquals( 68.00f, numberFormat.parse( (String) testMap.get( "totalPercentage" ) )
+            .floatValue(), 0 );
+    }
+
+    public void testSetReportsDirectory()
+    {
+        report.setReportsDirectory( new File( "Reports_Directory" ) );
+
+        assertEquals( new File( "Reports_Directory" ), report.getReportsDirectory() );
+    }
+
+    public void testGetSuitesGroupByPackage()
+    {
+        ReportTestSuite tSuite1 = new ReportTestSuite();
+
+        ReportTestSuite tSuite2 = new ReportTestSuite();
+
+        ReportTestSuite tSuite3 = new ReportTestSuite();
+
+        tSuite1.setPackageName( "Package1" );
+
+        tSuite2.setPackageName( "Package1" );
+
+        tSuite3.setPackageName( "Package2" );
+
+        List suiteList = new ArrayList();
+
+        suiteList.add( tSuite1 );
+
+        suiteList.add( tSuite2 );
+
+        suiteList.add( tSuite3 );
+
+        Map groupMap = report.getSuitesGroupByPackage( suiteList );
+
+        assertEquals( 2, groupMap.size() );
+
+        assertEquals( tSuite1, ( (List) groupMap.get( "Package1" ) ).get( 0 ) );
+
+        assertEquals( tSuite2, ( (List) groupMap.get( "Package1" ) ).get( 1 ) );
+
+        assertEquals( tSuite3, ( (List) groupMap.get( "Package2" ) ).get( 0 ) );
+    }
+
+    public void testComputePercentage()
+        throws Exception
+    {
+        NumberFormat numberFormat = report.getNumberFormat();
+
+        assertEquals( 70.00f, numberFormat.parse( report.computePercentage( 100, 20, 10, 0 ) )
+            .floatValue(), 0 );
+    }
+
+    public void testGetFailureDetails()
+    {
+        ReportTestSuite tSuite1 = new ReportTestSuite();
+
+        ReportTestSuite tSuite2 = new ReportTestSuite();
+
+        ReportTestCase tCase1 = new ReportTestCase();
+
+        ReportTestCase tCase2 = new ReportTestCase();
+
+        ReportTestCase tCase3 = new ReportTestCase();
+
+        tCase1.addFailure( null, null );
+
+        tCase3.addFailure( null, null );
+
+        List tCaseList = new ArrayList();
+
+        List tCaseList2 = new ArrayList();
+
+        tCaseList.add( tCase1 );
+
+        tCaseList.add( tCase2 );
+
+        tCaseList2.add( tCase3 );
+
+        tSuite1.setTestCases( tCaseList );
+
+        tSuite2.setTestCases( tCaseList2 );
+
+        List suiteList = new ArrayList();
+
+        suiteList.add( tSuite1 );
+
+        suiteList.add( tSuite2 );
+
+        List failList = report.getFailureDetails( suiteList );
+
+        assertEquals( 2, failList.size() );
+
+        assertEquals( tCase1, failList.get( 0 ) );
+
+        assertEquals( tCase3, failList.get( 1 ) );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,51 @@
+package org.apache.maven.plugins.surefire.report.stubs;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.model.Model;
+import org.apache.maven.model.ReportPlugin;
+import org.apache.maven.model.Reporting;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:aramirez at apache.org">Allan Ramirez</a>
+ */
+public class SurefireRepMavenProjectStub
+    extends MavenProjectStub
+{
+    public List getReportPlugins()
+    {
+        Reporting reporting = new Reporting();
+
+        ReportPlugin reportPlugin = new ReportPlugin();
+        reportPlugin.setGroupId( "org.apache.maven.plugins" );
+        reportPlugin.setArtifactId( "maven-jxr-plugin" );
+        reportPlugin.setVersion( "2.0-SNAPSHOT" );
+        reporting.addPlugin( reportPlugin );
+
+        Model model = new Model();
+
+        model.setReporting( reporting );
+
+        return reporting.getPlugins();
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,37 @@
+package org.apache.maven.plugins.surefire.report.stubs;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:aramirez at apache.org">Allan Ramirez</a>
+ */
+public class SurefireRepMavenProjectStub2
+    extends MavenProjectStub
+{
+    public List getReportPlugins()
+    {
+        return new ArrayList();
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-NoPackageTest.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-NoPackageTest.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-NoPackageTest.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<testsuite errors="0" tests="3" time="0.047" failures="3" name="NoPackageTest">
+  <properties>
+    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+    <property value="c:\Program Files\Java\jdk1.5.0_06\jre\bin" name="sun.boot.library.path"/>
+    <property value="1.5.0_06-b05" name="java.vm.version"/>
+    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+    <property value="http://java.sun.com/" name="java.vendor.url"/>
+    <property value=";" name="path.separator"/>
+    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+    <property value="sun.io" name="file.encoding.pkg"/>
+    <property value="US" name="user.country"/>
+    <property value="Service Pack 2" name="sun.os.patch.level"/>
+    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+    <property value="C:\dev\maven\plugins\maven-surefire-plugin\src\it\test3" name="user.dir"/>
+    <property value="1.5.0_06-b05" name="java.runtime.version"/>
+    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+    <property value="C:\dev\maven\plugins\maven-surefire-plugin\src\it\test3" name="basedir"/>
+    <property value="c:\Program Files\Java\jdk1.5.0_06\jre\lib\endorsed" name="java.endorsed.dirs"/>
+    <property value="x86" name="os.arch"/>
+    <property value="c:\DOCUME~1\csanchez\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+    <property value="
+" name="line.separator"/>
+    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+    <property value="" name="user.variant"/>
+    <property value="Windows XP" name="os.name"/>
+    <property value="c:\apps\maven-2.1-SNAPSHOT/bin/m2.conf" name="classworlds.conf"/>
+    <property value="Cp1252" name="sun.jnu.encoding"/>
+    <property
+        value="c:\Program Files\Java\jdk1.5.0_06\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\apps\cygwin\usr\local\bin;C:\apps\cygwin\bin;C:\apps\cygwin\bin;C:\apps\cygwin\usr\X11R6\bin;c:\Program Files\ThinkPad\Utilities;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\Program Files\Intel\Wireless\Bin\;c:\Program Files\ATI Technologies\ATI Control Panel;c:\WINDOWS\Downloaded Program Files;c:\Program Files\PC-Doctor for Windows\services;c:\Program Files\Subversion\bin;c:\Program Files\Intel\Wireless\Bin\;c:\Program Files\Intel\Wireless\Bin\;c:\Program Files\IBM ThinkVantage\Client Security Solution;c:\apps\jwsdp-1.6\jwsdp-shared\bin;c:\apps\apache-ant-1.6.5\bin;c:\apps\maven-1.1-beta-2\bin;c:\apps\maven-2.1-SNAPSHOT\bin;c:\Program Files\Java\jdk1.5.0_06\bin;c:\Program Files\putty;c:\Program Files\ThinkPad\Utilities;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\Program Files\Intel\Wireless\Bin\;c:\Program Files\ATI Technologies\ATI Control Panel;c:\WINDOWS!
 \Downloaded Program Files;c:\Program Files\PC-Doctor for Windows\services;c:\Program Files\Subversion\bin;c:\Program Files\Intel\Wireless\Bin\;c:\Program Files\Intel\Wireless\Bin\;c:\Program Files\IBM ThinkVantage\Client Security Solution"
+        name="java.library.path"/>
+    <property value="Java Platform API Specification" name="java.specification.name"/>
+    <property value="49.0" name="java.class.version"/>
+    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+    <property value="true" name="maven.test.failure.ignore"/>
+    <property value="5.1" name="os.version"/>
+    <property value="C:\Documents and Settings\csanchez" name="user.home"/>
+    <property value="America/Los_Angeles" name="user.timezone"/>
+    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+    <property value="Cp1252" name="file.encoding"/>
+    <property value="1.5" name="java.specification.version"/>
+    <property value="csanchez" name="user.name"/>
+    <property value="c:\apps\maven-2.1-SNAPSHOT/core/boot/classworlds-1.1.jar" name="java.class.path"/>
+    <property value="1.0" name="java.vm.specification.version"/>
+    <property value="32" name="sun.arch.data.model"/>
+    <property value="c:\Program Files\Java\jdk1.5.0_06\jre" name="java.home"/>
+    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+    <property value="en" name="user.language"/>
+    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+    <property value="mixed mode, sharing" name="java.vm.info"/>
+    <property value="1.5.0_06" name="java.version"/>
+    <property value="c:\Program Files\Java\jdk1.5.0_06\jre\lib\ext" name="java.ext.dirs"/>
+    <property
+        value="c:\Program Files\Java\jdk1.5.0_06\jre\lib\rt.jar;c:\Program Files\Java\jdk1.5.0_06\jre\lib\i18n.jar;c:\Program Files\Java\jdk1.5.0_06\jre\lib\sunrsasign.jar;c:\Program Files\Java\jdk1.5.0_06\jre\lib\jsse.jar;c:\Program Files\Java\jdk1.5.0_06\jre\lib\jce.jar;c:\Program Files\Java\jdk1.5.0_06\jre\lib\charsets.jar;c:\Program Files\Java\jdk1.5.0_06\jre\classes"
+        name="sun.boot.class.path"/>
+    <property value="Sun Microsystems Inc." name="java.vendor"/>
+    <property value="c:\apps\maven-2.1-SNAPSHOT" name="maven.home"/>
+    <property value="C:\Documents and Settings\csanchez\.m2\repository" name="localRepository"/>
+    <property value="\" name="file.separator"/>
+    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+    <property value="little" name="sun.cpu.endian"/>
+    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+    <property value="windows" name="sun.desktop"/>
+    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
+  </properties>
+  <testcase time="0" name="testQuote">
+    <failure type="junit.framework.AssertionFailedError" message="&quot;">junit.framework.AssertionFailedError: &quot;
+      at junit.framework.Assert.fail(Assert.java:47)
+      at NoPackageTest.testQuote(NoPackageTest.java:23)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)
+      at org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216)
+      at org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
+      at org.apache.maven.surefire.Surefire.run(Surefire.java:163)
+      at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.apache.maven.surefire.SurefireBooter.runTestsInProcess(SurefireBooter.java:300)
+      at org.apache.maven.surefire.SurefireBooter.run(SurefireBooter.java:216)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:369)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:867)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:739)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:510)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
+      at
+      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:274)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
+      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </failure>
+  </testcase>
+  <testcase time="0" name="testLower">
+    <failure type="junit.framework.AssertionFailedError" message="&lt;">junit.framework.AssertionFailedError: &lt;
+      at junit.framework.Assert.fail(Assert.java:47)
+      at NoPackageTest.testLower(NoPackageTest.java:28)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)
+      at org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216)
+      at org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
+      at org.apache.maven.surefire.Surefire.run(Surefire.java:163)
+      at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.apache.maven.surefire.SurefireBooter.runTestsInProcess(SurefireBooter.java:300)
+      at org.apache.maven.surefire.SurefireBooter.run(SurefireBooter.java:216)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:369)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:867)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:739)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:510)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
+      at
+      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:274)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
+      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </failure>
+  </testcase>
+  <testcase time="0" name="testGreater">
+    <failure type="junit.framework.AssertionFailedError" message="&gt;">junit.framework.AssertionFailedError: &gt;
+      at junit.framework.Assert.fail(Assert.java:47)
+      at NoPackageTest.testGreater(NoPackageTest.java:33)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)
+      at org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216)
+      at org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
+      at org.apache.maven.surefire.Surefire.run(Surefire.java:163)
+      at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.apache.maven.surefire.SurefireBooter.runTestsInProcess(SurefireBooter.java:300)
+      at org.apache.maven.surefire.SurefireBooter.run(SurefireBooter.java:216)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:369)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:867)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:739)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:510)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
+      at
+      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:274)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
+      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </failure>
+  </testcase>
+</testsuite>
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-NoTimeTestCaseTest.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-NoTimeTestCaseTest.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-NoTimeTestCaseTest.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<testsuite errors="0" tests="8" time="0.563" failures="0" name="NoTimeTestCaseTest">
+  <properties>
+    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+    <property value="c:\Program Files\Java\jdk1.5.0_06\jre\bin" name="sun.boot.library.path"/>
+    <property value="1.5.0_06-b05" name="java.vm.version"/>
+    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+    <property value="http://java.sun.com/" name="java.vendor.url"/>
+    <property value=";" name="path.separator"/>
+    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+    <property value="sun.io" name="file.encoding.pkg"/>
+    <property value="US" name="user.country"/>
+    <property value="Service Pack 2" name="sun.os.patch.level"/>
+    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+    <property value="c:\dev\test" name="user.dir"/>
+    <property value="1.5.0_06-b05" name="java.runtime.version"/>
+    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+    <property value="c:\dev\test" name="basedir"/>
+    <property value="c:\Program Files\Java\jdk1.5.0_06\jre\lib\endorsed" name="java.endorsed.dirs"/>
+    <property value="x86" name="os.arch"/>
+    <property value="c:\DOCUME~1\csanchez\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+    <property value="
+" name="line.separator"/>
+    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+    <property value="" name="user.variant"/>
+    <property value="Windows XP" name="os.name"/>
+    <property value="c:\apps\maven-2.0.5-SNAPSHOT/bin/m2.conf" name="classworlds.conf"/>
+    <property value="Cp1252" name="sun.jnu.encoding"/>
+    <property
+        value="c:\Program Files\Java\jdk1.5.0_06\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\apps\cygwin\usr\local\bin;C:\apps\cygwin\bin;C:\apps\cygwin\bin;C:\apps\cygwin\usr\X11R6\bin;c:\Program Files\ThinkPad\Utilities;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\Program Files\Intel\Wireless\Bin\;c:\Program Files\ATI Technologies\ATI Control Panel;c:\WINDOWS\Downloaded Program Files;c:\Program Files\PC-Doctor for Windows\services;c:\Program Files\Subversion\bin;c:\Program Files\Intel\Wireless\Bin\;c:\Program Files\Intel\Wireless\Bin\;c:\Program Files\IBM ThinkVantage\Client Security Solution;c:\Program Files\ThinkPad\ConnectUtilities;c:\Program Files\Intel\Wireless\Bin\;c:\Program Files\TortoiseCVS;c:\apps\graphviz-2.8\bin;c:\apps\jwsdp-1.6\jwsdp-shared\bin;c:\apps\apache-ant-1.6.5\bin;c:\apps\maven-1.1-beta-2\bin;c:\apps\maven-2.0.5-SNAPSHOT\bin;c:\Program Files\Java\jdk1.5.0_06\bin;c:\Program Files\putty;c:\Program Files\ThinkPad\Utilities;c:\WINDOWS\system32!
 ;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\Program Files\Intel\Wireless\Bin\;c:\Program Files\ATI Technologies\ATI Control Panel;c:\WINDOWS\Downloaded Program Files;c:\Program Files\PC-Doctor for Windows\services;c:\Program Files\Subversion\bin;c:\Program Files\Intel\Wireless\Bin\;c:\Program Files\Intel\Wireless\Bin\;c:\Program Files\IBM ThinkVantage\Client Security Solution;c:\Program Files\ThinkPad\ConnectUtilities;c:\Program Files\Intel\Wireless\Bin\"
+        name="java.library.path"/>
+    <property value="Java Platform API Specification" name="java.specification.name"/>
+    <property value="49.0" name="java.class.version"/>
+    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+    <property value="5.1" name="os.version"/>
+    <property value="C:\Documents and Settings\csanchez" name="user.home"/>
+    <property value="America/Los_Angeles" name="user.timezone"/>
+    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+    <property value="Cp1252" name="file.encoding"/>
+    <property value="1.5" name="java.specification.version"/>
+    <property value="csanchez" name="user.name"/>
+    <property value="c:\apps\maven-2.0.5-SNAPSHOT/core/boot/classworlds-1.1.jar" name="java.class.path"/>
+    <property value="1.0" name="java.vm.specification.version"/>
+    <property value="32" name="sun.arch.data.model"/>
+    <property value="c:\Program Files\Java\jdk1.5.0_06\jre" name="java.home"/>
+    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+    <property value="en" name="user.language"/>
+    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+    <property value="mixed mode" name="java.vm.info"/>
+    <property value="1.5.0_06" name="java.version"/>
+    <property value="c:\Program Files\Java\jdk1.5.0_06\jre\lib\ext" name="java.ext.dirs"/>
+    <property
+        value="c:\Program Files\Java\jdk1.5.0_06\jre\lib\rt.jar;c:\Program Files\Java\jdk1.5.0_06\jre\lib\i18n.jar;c:\Program Files\Java\jdk1.5.0_06\jre\lib\sunrsasign.jar;c:\Program Files\Java\jdk1.5.0_06\jre\lib\jsse.jar;c:\Program Files\Java\jdk1.5.0_06\jre\lib\jce.jar;c:\Program Files\Java\jdk1.5.0_06\jre\lib\charsets.jar;c:\Program Files\Java\jdk1.5.0_06\jre\classes"
+        name="sun.boot.class.path"/>
+    <property value="Sun Microsystems Inc." name="java.vendor"/>
+    <property value="c:\apps\maven-2.0.5-SNAPSHOT" name="maven.home"/>
+    <property value="C:\Documents and Settings\csanchez\.m2\repository" name="localRepository"/>
+    <property value="\" name="file.separator"/>
+    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+    <property value="little" name="sun.cpu.endian"/>
+    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+    <property value="windows" name="sun.desktop"/>
+    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
+  </properties>
+  <testcase time="0" name="test1"/>
+  <testcase time="0" name="test2"/>
+  <testcase time="0" name="test3"/>
+  <testcase time="0" name="test4"/>
+  <testcase time="0" name="test5"/>
+  <testcase name="test7"/>
+  <testcase name="testResults"/>
+  <testcase time="0.5" name="test6"/>
+</testsuite>
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-com.shape.CircleTest.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-com.shape.CircleTest.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-com.shape.CircleTest.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<testsuite errors="1" tests="8" time="0.201" failures="1" name="com.shape.CircleTest">
+  <properties>
+    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\bin" name="sun.boot.library.path"/>
+    <property value="1.5.0_04-b05" name="java.vm.version"/>
+    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+    <property value="http://java.sun.com/" name="java.vendor.url"/>
+    <property value=";" name="path.separator"/>
+    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+    <property value="sun.io" name="file.encoding.pkg"/>
+    <property value="US" name="user.country"/>
+    <property value="Service Pack 2" name="sun.os.patch.level"/>
+    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="user.dir"/>
+    <property value="1.5.0_04-b05" name="java.runtime.version"/>
+    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="basedir"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\endorsed" name="java.endorsed.dirs"/>
+    <property value="x86" name="os.arch"/>
+    <property value="C:\DOCUME~1\Jontri\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+    <property value="
+" name="line.separator"/>
+    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+    <property value="" name="user.variant"/>
+    <property value="Windows XP" name="os.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\bin\m2.conf" name="classworlds.conf"/>
+    <property value="Cp1252" name="sun.jnu.encoding"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\JApps\maven-2.0-beta-1\bin;C:\JApps\maven-1.0.2\bin;c:\BatchFile;C:\Program Files\cvsnt;C:\JApps\svn-1.1.4\bin;C:\JApps\ant-1.6.2\bin;"
+        name="java.library.path"/>
+    <property value="Java Platform API Specification" name="java.specification.name"/>
+    <property value="49.0" name="java.class.version"/>
+    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+    <property value="5.1" name="os.version"/>
+    <property value="C:\Documents and Settings\Jontri" name="user.home"/>
+    <property value="Asia/Shanghai" name="user.timezone"/>
+    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+    <property value="Cp1252" name="file.encoding"/>
+    <property value="1.5" name="java.specification.version"/>
+    <property value="Jontri" name="user.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\core\boot\classworlds-1.1-alpha-2.jar" name="java.class.path"/>
+    <property value="1.0" name="java.vm.specification.version"/>
+    <property value="32" name="sun.arch.data.model"/>
+    <property value="c:\japps\jdk1.5.0_04\jre" name="java.home"/>
+    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+    <property value="en" name="user.language"/>
+    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+    <property value="mixed mode, sharing" name="java.vm.info"/>
+    <property value="1.5.0_04" name="java.version"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\ext" name="java.ext.dirs"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\jre\lib\rt.jar;c:\japps\jdk1.5.0_04\jre\lib\i18n.jar;c:\japps\jdk1.5.0_04\jre\lib\sunrsasign.jar;c:\japps\jdk1.5.0_04\jre\lib\jsse.jar;c:\japps\jdk1.5.0_04\jre\lib\jce.jar;c:\japps\jdk1.5.0_04\jre\lib\charsets.jar;c:\japps\jdk1.5.0_04\jre\classes"
+        name="sun.boot.class.path"/>
+    <property value="Sun Microsystems Inc." name="java.vendor"/>
+    <property value="C:\JApps\maven-2.0-beta-1" name="maven.home"/>
+    <property value="C:\Documents and Settings\Jontri\.m2\repository" name="localRepository"/>
+    <property value="\" name="file.separator"/>
+    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+    <property value="little" name="sun.cpu.endian"/>
+    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+    <property value="windows" name="sun.desktop"/>
+    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
+  </properties>
+  <testcase time="0.01" name="testX"/>
+  <testcase time="0" name="testY"/>
+  <testcase time="0" name="testXY"/>
+  <testcase time="0.01" name="testRadius">
+    <failure type="junit.framework.AssertionFailedError" message="expected:&lt;20&gt; but was:&lt;10&gt;">
+      junit.framework.AssertionFailedError: expected:&lt;20&gt; but was:&lt;10&gt;
+      at junit.framework.Assert.fail(Assert.java:47)
+      at junit.framework.Assert.failNotEquals(Assert.java:282)
+      at junit.framework.Assert.assertEquals(Assert.java:64)
+      at junit.framework.Assert.assertEquals(Assert.java:201)
+      at junit.framework.Assert.assertEquals(Assert.java:207)
+      at com.shape.CircleTest.testRadius(CircleTest.java:34)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </failure>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0.02" name="testProperties">
+    <error type="java.lang.ArithmeticException" message="/ by zero">java.lang.ArithmeticException: / by zero
+      at com.shape.CircleTest.testProperties(CircleTest.java:44)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </error>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0" name="testPI"/>
+  <testcase time="0.01" name="testCircumference"/>
+  <testcase time="0" name="testDiameter"/>
+</testsuite>
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-com.shape.PointTest.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-com.shape.PointTest.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-com.shape.PointTest.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<testsuite errors="0" tests="3" time="0.01" failures="1" name="com.shape.PointTest">
+  <properties>
+    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\bin" name="sun.boot.library.path"/>
+    <property value="1.5.0_04-b05" name="java.vm.version"/>
+    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+    <property value="http://java.sun.com/" name="java.vendor.url"/>
+    <property value=";" name="path.separator"/>
+    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+    <property value="sun.io" name="file.encoding.pkg"/>
+    <property value="US" name="user.country"/>
+    <property value="Service Pack 2" name="sun.os.patch.level"/>
+    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="user.dir"/>
+    <property value="1.5.0_04-b05" name="java.runtime.version"/>
+    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="basedir"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\endorsed" name="java.endorsed.dirs"/>
+    <property value="x86" name="os.arch"/>
+    <property value="C:\DOCUME~1\Jontri\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+    <property value="
+" name="line.separator"/>
+    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+    <property value="" name="user.variant"/>
+    <property value="Windows XP" name="os.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\bin\m2.conf" name="classworlds.conf"/>
+    <property value="Cp1252" name="sun.jnu.encoding"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\JApps\maven-2.0-beta-1\bin;C:\JApps\maven-1.0.2\bin;c:\BatchFile;C:\Program Files\cvsnt;C:\JApps\svn-1.1.4\bin;C:\JApps\ant-1.6.2\bin;"
+        name="java.library.path"/>
+    <property value="Java Platform API Specification" name="java.specification.name"/>
+    <property value="49.0" name="java.class.version"/>
+    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+    <property value="5.1" name="os.version"/>
+    <property value="C:\Documents and Settings\Jontri" name="user.home"/>
+    <property value="Asia/Shanghai" name="user.timezone"/>
+    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+    <property value="Cp1252" name="file.encoding"/>
+    <property value="1.5" name="java.specification.version"/>
+    <property value="Jontri" name="user.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\core\boot\classworlds-1.1-alpha-2.jar" name="java.class.path"/>
+    <property value="1.0" name="java.vm.specification.version"/>
+    <property value="32" name="sun.arch.data.model"/>
+    <property value="c:\japps\jdk1.5.0_04\jre" name="java.home"/>
+    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+    <property value="en" name="user.language"/>
+    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+    <property value="mixed mode, sharing" name="java.vm.info"/>
+    <property value="1.5.0_04" name="java.version"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\ext" name="java.ext.dirs"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\jre\lib\rt.jar;c:\japps\jdk1.5.0_04\jre\lib\i18n.jar;c:\japps\jdk1.5.0_04\jre\lib\sunrsasign.jar;c:\japps\jdk1.5.0_04\jre\lib\jsse.jar;c:\japps\jdk1.5.0_04\jre\lib\jce.jar;c:\japps\jdk1.5.0_04\jre\lib\charsets.jar;c:\japps\jdk1.5.0_04\jre\classes"
+        name="sun.boot.class.path"/>
+    <property value="Sun Microsystems Inc." name="java.vendor"/>
+    <property value="C:\JApps\maven-2.0-beta-1" name="maven.home"/>
+    <property value="C:\Documents and Settings\Jontri\.m2\repository" name="localRepository"/>
+    <property value="\" name="file.separator"/>
+    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+    <property value="little" name="sun.cpu.endian"/>
+    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+    <property value="windows" name="sun.desktop"/>
+    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
+  </properties>
+  <testcase time="0" name="testX"/>
+  <testcase time="0" name="testY"/>
+  <testcase time="0" name="testXY">
+    <failure type="junit.framework.AssertionFailedError" message="expected:&lt;0&gt; but was:&lt;1&gt;">
+      junit.framework.AssertionFailedError: expected:&lt;0&gt; but was:&lt;1&gt;
+      at junit.framework.Assert.fail(Assert.java:47)
+      at junit.framework.Assert.failNotEquals(Assert.java:282)
+      at junit.framework.Assert.assertEquals(Assert.java:64)
+      at junit.framework.Assert.assertEquals(Assert.java:201)
+      at junit.framework.Assert.assertEquals(Assert.java:207)
+      at com.shape.PointTest.testXY(PointTest.java:28)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </failure>
+    <system-out></system-out>
+    <system-err></system-err>
+  </testcase>
+</testsuite>
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/com.shape.CircleTest.txt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/com.shape.CircleTest.txt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/com.shape.CircleTest.txt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,122 @@
+-------------------------------------------------------------------------------
+Battery: com.shape.CircleTest
+-------------------------------------------------------------------------------
+testX(com.shape.CircleTest)
+testY(com.shape.CircleTest)
+testXY(com.shape.CircleTest)
+testRadius(com.shape.CircleTest)
+
+[ stdout ] ---------------------------------------------------------------
+
+
+[ stderr ] ---------------------------------------------------------------
+
+
+[ stacktrace ] -----------------------------------------------------------
+
+junit.framework.AssertionFailedError: expected:<20> but was:<10>
+	at junit.framework.Assert.fail(Assert.java:47)
+	at junit.framework.Assert.failNotEquals(Assert.java:282)
+	at junit.framework.Assert.assertEquals(Assert.java:64)
+	at junit.framework.Assert.assertEquals(Assert.java:201)
+	at junit.framework.Assert.assertEquals(Assert.java:207)
+	at com.shape.CircleTest.testRadius(CircleTest.java:34)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at junit.framework.TestCase.runTest(TestCase.java:154)
+	at junit.framework.TestCase.runBare(TestCase.java:127)
+	at junit.framework.TestResult$1.protect(TestResult.java:106)
+	at junit.framework.TestResult.runProtected(TestResult.java:124)
+	at junit.framework.TestResult.run(TestResult.java:109)
+	at junit.framework.TestCase.run(TestCase.java:118)
+	at junit.framework.TestSuite.runTest(TestSuite.java:208)
+	at junit.framework.TestSuite.run(TestSuite.java:203)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:190)
+	at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:155)
+	at org.codehaus.surefire.Surefire.run(Surefire.java:105)
+	at org.codehaus.surefire.Surefire.run(Surefire.java:59)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:83)
+	at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:218)
+	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:361)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:472)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:445)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:431)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:127)
+	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+	at org.apache.maven.cli.MavenCli.main(MavenCli.java:292)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+testProperties(com.shape.CircleTest)
+
+[ stdout ] ---------------------------------------------------------------
+
+
+[ stderr ] ---------------------------------------------------------------
+
+
+[ stacktrace ] -----------------------------------------------------------
+
+java.lang.ArithmeticException: / by zero
+	at com.shape.CircleTest.testProperties(CircleTest.java:44)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at junit.framework.TestCase.runTest(TestCase.java:154)
+	at junit.framework.TestCase.runBare(TestCase.java:127)
+	at junit.framework.TestResult$1.protect(TestResult.java:106)
+	at junit.framework.TestResult.runProtected(TestResult.java:124)
+	at junit.framework.TestResult.run(TestResult.java:109)
+	at junit.framework.TestCase.run(TestCase.java:118)
+	at junit.framework.TestSuite.runTest(TestSuite.java:208)
+	at junit.framework.TestSuite.run(TestSuite.java:203)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:190)
+	at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:155)
+	at org.codehaus.surefire.Surefire.run(Surefire.java:105)
+	at org.codehaus.surefire.Surefire.run(Surefire.java:59)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:83)
+	at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:218)
+	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:361)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:472)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:445)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:431)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:127)
+	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+	at org.apache.maven.cli.MavenCli.main(MavenCli.java:292)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+testPI(com.shape.CircleTest)
+testCircumference(com.shape.CircleTest)
+testDiameter(com.shape.CircleTest)

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/com.shapeclone.CircleTest.txt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/com.shapeclone.CircleTest.txt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/com.shapeclone.CircleTest.txt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,122 @@
+-------------------------------------------------------------------------------
+Battery: com.shapeclone.CircleTest
+-------------------------------------------------------------------------------
+testX(com.shapeclone.CircleTest)
+testY(com.shapeclone.CircleTest)
+testXY(com.shapeclone.CircleTest)
+testRadius(com.shapeclone.CircleTest)
+
+[ stdout ] ---------------------------------------------------------------
+
+
+[ stderr ] ---------------------------------------------------------------
+
+
+[ stacktrace ] -----------------------------------------------------------
+
+junit.framework.AssertionFailedError: expected:<20> but was:<10>
+	at junit.framework.Assert.fail(Assert.java:47)
+	at junit.framework.Assert.failNotEquals(Assert.java:282)
+	at junit.framework.Assert.assertEquals(Assert.java:64)
+	at junit.framework.Assert.assertEquals(Assert.java:201)
+	at junit.framework.Assert.assertEquals(Assert.java:207)
+	at com.shapeclone.CircleTest.testRadius(CircleTest.java:34)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at junit.framework.TestCase.runTest(TestCase.java:154)
+	at junit.framework.TestCase.runBare(TestCase.java:127)
+	at junit.framework.TestResult$1.protect(TestResult.java:106)
+	at junit.framework.TestResult.runProtected(TestResult.java:124)
+	at junit.framework.TestResult.run(TestResult.java:109)
+	at junit.framework.TestCase.run(TestCase.java:118)
+	at junit.framework.TestSuite.runTest(TestSuite.java:208)
+	at junit.framework.TestSuite.run(TestSuite.java:203)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:190)
+	at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:155)
+	at org.codehaus.surefire.Surefire.run(Surefire.java:105)
+	at org.codehaus.surefire.Surefire.run(Surefire.java:59)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:83)
+	at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:218)
+	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:361)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:472)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:445)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:431)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:127)
+	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+	at org.apache.maven.cli.MavenCli.main(MavenCli.java:292)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+testProperties(com.shapeclone.CircleTest)
+
+[ stdout ] ---------------------------------------------------------------
+
+
+[ stderr ] ---------------------------------------------------------------
+
+
+[ stacktrace ] -----------------------------------------------------------
+
+java.lang.ArithmeticException: / by zero
+	at com.shapeclone.CircleTest.testProperties(CircleTest.java:44)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at junit.framework.TestCase.runTest(TestCase.java:154)
+	at junit.framework.TestCase.runBare(TestCase.java:127)
+	at junit.framework.TestResult$1.protect(TestResult.java:106)
+	at junit.framework.TestResult.runProtected(TestResult.java:124)
+	at junit.framework.TestResult.run(TestResult.java:109)
+	at junit.framework.TestCase.run(TestCase.java:118)
+	at junit.framework.TestSuite.runTest(TestSuite.java:208)
+	at junit.framework.TestSuite.run(TestSuite.java:203)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:190)
+	at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:155)
+	at org.codehaus.surefire.Surefire.run(Surefire.java:105)
+	at org.codehaus.surefire.Surefire.run(Surefire.java:59)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:83)
+	at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:218)
+	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:361)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:472)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:445)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:431)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
+	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:127)
+	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+	at org.apache.maven.cli.MavenCli.main(MavenCli.java:292)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+	at java.lang.reflect.Method.invoke(Method.java:585)
+	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+testPI(com.shapeclone.CircleTest)
+testCircumference(com.shapeclone.CircleTest)
+testDiameter(com.shapeclone.CircleTest)

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/plugin-config.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/plugin-config.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/plugin-config.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,38 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <configuration>
+          <outputDirectory>${basedir}/target/site/unit/basic-surefire-report-linkxref-false</outputDirectory>
+          <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+          <showSuccess>true</showSuccess>
+          <reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-linkxref-false/surefire-reports
+          </reportsDirectory>
+          <outputName>surefire-report</outputName>
+          <xrefLocation>${basedir}/target/site/unit/basic-surefire-report-linkxref-false/xref-test</xrefLocation>
+          <linkXRef>false</linkXRef>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/surefire-reports/TEST-com.shape.CircleTest.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/surefire-reports/TEST-com.shape.CircleTest.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/surefire-reports/TEST-com.shape.CircleTest.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<testsuite errors="1" tests="8" time="0.201" failures="1" name="com.shape.CircleTest">
+  <properties>
+    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\bin" name="sun.boot.library.path"/>
+    <property value="1.5.0_04-b05" name="java.vm.version"/>
+    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+    <property value="http://java.sun.com/" name="java.vendor.url"/>
+    <property value=";" name="path.separator"/>
+    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+    <property value="sun.io" name="file.encoding.pkg"/>
+    <property value="US" name="user.country"/>
+    <property value="Service Pack 2" name="sun.os.patch.level"/>
+    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="user.dir"/>
+    <property value="1.5.0_04-b05" name="java.runtime.version"/>
+    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="basedir"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\endorsed" name="java.endorsed.dirs"/>
+    <property value="x86" name="os.arch"/>
+    <property value="C:\DOCUME~1\Jontri\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+    <property value="
+" name="line.separator"/>
+    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+    <property value="" name="user.variant"/>
+    <property value="Windows XP" name="os.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\bin\m2.conf" name="classworlds.conf"/>
+    <property value="Cp1252" name="sun.jnu.encoding"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\JApps\maven-2.0-beta-1\bin;C:\JApps\maven-1.0.2\bin;c:\BatchFile;C:\Program Files\cvsnt;C:\JApps\svn-1.1.4\bin;C:\JApps\ant-1.6.2\bin;"
+        name="java.library.path"/>
+    <property value="Java Platform API Specification" name="java.specification.name"/>
+    <property value="49.0" name="java.class.version"/>
+    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+    <property value="5.1" name="os.version"/>
+    <property value="C:\Documents and Settings\Jontri" name="user.home"/>
+    <property value="Asia/Shanghai" name="user.timezone"/>
+    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+    <property value="Cp1252" name="file.encoding"/>
+    <property value="1.5" name="java.specification.version"/>
+    <property value="Jontri" name="user.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\core\boot\classworlds-1.1-alpha-2.jar" name="java.class.path"/>
+    <property value="1.0" name="java.vm.specification.version"/>
+    <property value="32" name="sun.arch.data.model"/>
+    <property value="c:\japps\jdk1.5.0_04\jre" name="java.home"/>
+    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+    <property value="en" name="user.language"/>
+    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+    <property value="mixed mode, sharing" name="java.vm.info"/>
+    <property value="1.5.0_04" name="java.version"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\ext" name="java.ext.dirs"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\jre\lib\rt.jar;c:\japps\jdk1.5.0_04\jre\lib\i18n.jar;c:\japps\jdk1.5.0_04\jre\lib\sunrsasign.jar;c:\japps\jdk1.5.0_04\jre\lib\jsse.jar;c:\japps\jdk1.5.0_04\jre\lib\jce.jar;c:\japps\jdk1.5.0_04\jre\lib\charsets.jar;c:\japps\jdk1.5.0_04\jre\classes"
+        name="sun.boot.class.path"/>
+    <property value="Sun Microsystems Inc." name="java.vendor"/>
+    <property value="C:\JApps\maven-2.0-beta-1" name="maven.home"/>
+    <property value="C:\Documents and Settings\Jontri\.m2\repository" name="localRepository"/>
+    <property value="\" name="file.separator"/>
+    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+    <property value="little" name="sun.cpu.endian"/>
+    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+    <property value="windows" name="sun.desktop"/>
+    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
+  </properties>
+  <testcase time="0.01" name="testX"/>
+  <testcase time="0" name="testY"/>
+  <testcase time="0" name="testXY"/>
+  <testcase time="0.01" name="testRadius">
+    <failure type="junit.framework.AssertionFailedError" message="expected:&lt;20&gt; but was:&lt;10&gt;">
+      junit.framework.AssertionFailedError: expected:&lt;20&gt; but was:&lt;10&gt;
+      at junit.framework.Assert.fail(Assert.java:47)
+      at junit.framework.Assert.failNotEquals(Assert.java:282)
+      at junit.framework.Assert.assertEquals(Assert.java:64)
+      at junit.framework.Assert.assertEquals(Assert.java:201)
+      at junit.framework.Assert.assertEquals(Assert.java:207)
+      at com.shape.CircleTest.testRadius(CircleTest.java:34)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </failure>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0.02" name="testProperties">
+    <error type="java.lang.ArithmeticException" message="/ by zero">java.lang.ArithmeticException: / by zero
+      at com.shape.CircleTest.testProperties(CircleTest.java:44)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </error>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0" name="testPI"/>
+  <testcase time="0.01" name="testCircumference"/>
+  <testcase time="0" name="testDiameter"/>
+</testsuite>
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/plugin-config.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/plugin-config.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/plugin-config.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,38 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <configuration>
+          <outputDirectory>${basedir}/target/site/unit/basic-surefire-report-reporting-null</outputDirectory>
+          <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub2"/>
+          <showSuccess>true</showSuccess>
+          <reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-reporting-null/surefire-reports
+          </reportsDirectory>
+          <outputName>surefire-report</outputName>
+          <xrefLocation>${basedir}/target/site/unit/basic-surefire-report-test/xref-test</xrefLocation>
+          <linkXRef>true</linkXRef>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/surefire-reports/TEST-com.shape.CircleTest.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/surefire-reports/TEST-com.shape.CircleTest.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/surefire-reports/TEST-com.shape.CircleTest.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<testsuite errors="1" tests="8" time="0.201" failures="1" name="com.shape.CircleTest">
+  <properties>
+    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\bin" name="sun.boot.library.path"/>
+    <property value="1.5.0_04-b05" name="java.vm.version"/>
+    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+    <property value="http://java.sun.com/" name="java.vendor.url"/>
+    <property value=";" name="path.separator"/>
+    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+    <property value="sun.io" name="file.encoding.pkg"/>
+    <property value="US" name="user.country"/>
+    <property value="Service Pack 2" name="sun.os.patch.level"/>
+    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="user.dir"/>
+    <property value="1.5.0_04-b05" name="java.runtime.version"/>
+    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="basedir"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\endorsed" name="java.endorsed.dirs"/>
+    <property value="x86" name="os.arch"/>
+    <property value="C:\DOCUME~1\Jontri\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+    <property value="
+" name="line.separator"/>
+    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+    <property value="" name="user.variant"/>
+    <property value="Windows XP" name="os.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\bin\m2.conf" name="classworlds.conf"/>
+    <property value="Cp1252" name="sun.jnu.encoding"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\JApps\maven-2.0-beta-1\bin;C:\JApps\maven-1.0.2\bin;c:\BatchFile;C:\Program Files\cvsnt;C:\JApps\svn-1.1.4\bin;C:\JApps\ant-1.6.2\bin;"
+        name="java.library.path"/>
+    <property value="Java Platform API Specification" name="java.specification.name"/>
+    <property value="49.0" name="java.class.version"/>
+    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+    <property value="5.1" name="os.version"/>
+    <property value="C:\Documents and Settings\Jontri" name="user.home"/>
+    <property value="Asia/Shanghai" name="user.timezone"/>
+    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+    <property value="Cp1252" name="file.encoding"/>
+    <property value="1.5" name="java.specification.version"/>
+    <property value="Jontri" name="user.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\core\boot\classworlds-1.1-alpha-2.jar" name="java.class.path"/>
+    <property value="1.0" name="java.vm.specification.version"/>
+    <property value="32" name="sun.arch.data.model"/>
+    <property value="c:\japps\jdk1.5.0_04\jre" name="java.home"/>
+    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+    <property value="en" name="user.language"/>
+    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+    <property value="mixed mode, sharing" name="java.vm.info"/>
+    <property value="1.5.0_04" name="java.version"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\ext" name="java.ext.dirs"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\jre\lib\rt.jar;c:\japps\jdk1.5.0_04\jre\lib\i18n.jar;c:\japps\jdk1.5.0_04\jre\lib\sunrsasign.jar;c:\japps\jdk1.5.0_04\jre\lib\jsse.jar;c:\japps\jdk1.5.0_04\jre\lib\jce.jar;c:\japps\jdk1.5.0_04\jre\lib\charsets.jar;c:\japps\jdk1.5.0_04\jre\classes"
+        name="sun.boot.class.path"/>
+    <property value="Sun Microsystems Inc." name="java.vendor"/>
+    <property value="C:\JApps\maven-2.0-beta-1" name="maven.home"/>
+    <property value="C:\Documents and Settings\Jontri\.m2\repository" name="localRepository"/>
+    <property value="\" name="file.separator"/>
+    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+    <property value="little" name="sun.cpu.endian"/>
+    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+    <property value="windows" name="sun.desktop"/>
+    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
+  </properties>
+  <testcase time="0.01" name="testX"/>
+  <testcase time="0" name="testY"/>
+  <testcase time="0" name="testXY"/>
+  <testcase time="0.01" name="testRadius">
+    <failure type="junit.framework.AssertionFailedError" message="expected:&lt;20&gt; but was:&lt;10&gt;">
+      junit.framework.AssertionFailedError: expected:&lt;20&gt; but was:&lt;10&gt;
+      at junit.framework.Assert.fail(Assert.java:47)
+      at junit.framework.Assert.failNotEquals(Assert.java:282)
+      at junit.framework.Assert.assertEquals(Assert.java:64)
+      at junit.framework.Assert.assertEquals(Assert.java:201)
+      at junit.framework.Assert.assertEquals(Assert.java:207)
+      at com.shape.CircleTest.testRadius(CircleTest.java:34)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </failure>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0.02" name="testProperties">
+    <error type="java.lang.ArithmeticException" message="/ by zero">java.lang.ArithmeticException: / by zero
+      at com.shape.CircleTest.testProperties(CircleTest.java:44)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </error>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0" name="testPI"/>
+  <testcase time="0.01" name="testCircumference"/>
+  <testcase time="0" name="testDiameter"/>
+</testsuite>
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/plugin-config.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/plugin-config.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/plugin-config.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,38 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <configuration>
+          <outputDirectory>${basedir}/target/site/unit/basic-surefire-report-success-false</outputDirectory>
+          <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+          <showSuccess>false</showSuccess>
+          <reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-success-false/surefire-reports
+          </reportsDirectory>
+          <outputName>surefire-report</outputName>
+          <xrefLocation>${basedir}/target/site/unit/basic-surefire-report-success-false/xref-test</xrefLocation>
+          <linkXRef>true</linkXRef>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/surefire-reports/TEST-com.shape.CircleTest.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/surefire-reports/TEST-com.shape.CircleTest.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/surefire-reports/TEST-com.shape.CircleTest.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<testsuite errors="1" tests="8" time="0.201" failures="1" name="com.shape.CircleTest">
+  <properties>
+    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\bin" name="sun.boot.library.path"/>
+    <property value="1.5.0_04-b05" name="java.vm.version"/>
+    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+    <property value="http://java.sun.com/" name="java.vendor.url"/>
+    <property value=";" name="path.separator"/>
+    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+    <property value="sun.io" name="file.encoding.pkg"/>
+    <property value="US" name="user.country"/>
+    <property value="Service Pack 2" name="sun.os.patch.level"/>
+    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="user.dir"/>
+    <property value="1.5.0_04-b05" name="java.runtime.version"/>
+    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="basedir"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\endorsed" name="java.endorsed.dirs"/>
+    <property value="x86" name="os.arch"/>
+    <property value="C:\DOCUME~1\Jontri\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+    <property value="
+" name="line.separator"/>
+    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+    <property value="" name="user.variant"/>
+    <property value="Windows XP" name="os.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\bin\m2.conf" name="classworlds.conf"/>
+    <property value="Cp1252" name="sun.jnu.encoding"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\JApps\maven-2.0-beta-1\bin;C:\JApps\maven-1.0.2\bin;c:\BatchFile;C:\Program Files\cvsnt;C:\JApps\svn-1.1.4\bin;C:\JApps\ant-1.6.2\bin;"
+        name="java.library.path"/>
+    <property value="Java Platform API Specification" name="java.specification.name"/>
+    <property value="49.0" name="java.class.version"/>
+    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+    <property value="5.1" name="os.version"/>
+    <property value="C:\Documents and Settings\Jontri" name="user.home"/>
+    <property value="Asia/Shanghai" name="user.timezone"/>
+    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+    <property value="Cp1252" name="file.encoding"/>
+    <property value="1.5" name="java.specification.version"/>
+    <property value="Jontri" name="user.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\core\boot\classworlds-1.1-alpha-2.jar" name="java.class.path"/>
+    <property value="1.0" name="java.vm.specification.version"/>
+    <property value="32" name="sun.arch.data.model"/>
+    <property value="c:\japps\jdk1.5.0_04\jre" name="java.home"/>
+    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+    <property value="en" name="user.language"/>
+    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+    <property value="mixed mode, sharing" name="java.vm.info"/>
+    <property value="1.5.0_04" name="java.version"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\ext" name="java.ext.dirs"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\jre\lib\rt.jar;c:\japps\jdk1.5.0_04\jre\lib\i18n.jar;c:\japps\jdk1.5.0_04\jre\lib\sunrsasign.jar;c:\japps\jdk1.5.0_04\jre\lib\jsse.jar;c:\japps\jdk1.5.0_04\jre\lib\jce.jar;c:\japps\jdk1.5.0_04\jre\lib\charsets.jar;c:\japps\jdk1.5.0_04\jre\classes"
+        name="sun.boot.class.path"/>
+    <property value="Sun Microsystems Inc." name="java.vendor"/>
+    <property value="C:\JApps\maven-2.0-beta-1" name="maven.home"/>
+    <property value="C:\Documents and Settings\Jontri\.m2\repository" name="localRepository"/>
+    <property value="\" name="file.separator"/>
+    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+    <property value="little" name="sun.cpu.endian"/>
+    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+    <property value="windows" name="sun.desktop"/>
+    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
+  </properties>
+  <testcase time="0.01" name="testX"/>
+  <testcase time="0" name="testY"/>
+  <testcase time="0" name="testXY"/>
+  <testcase time="0.01" name="testRadius">
+    <failure type="junit.framework.AssertionFailedError" message="expected:&lt;20&gt; but was:&lt;10&gt;">
+      junit.framework.AssertionFailedError: expected:&lt;20&gt; but was:&lt;10&gt;
+      at junit.framework.Assert.fail(Assert.java:47)
+      at junit.framework.Assert.failNotEquals(Assert.java:282)
+      at junit.framework.Assert.assertEquals(Assert.java:64)
+      at junit.framework.Assert.assertEquals(Assert.java:201)
+      at junit.framework.Assert.assertEquals(Assert.java:207)
+      at com.shape.CircleTest.testRadius(CircleTest.java:34)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </failure>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0.02" name="testProperties">
+    <error type="java.lang.ArithmeticException" message="/ by zero">java.lang.ArithmeticException: / by zero
+      at com.shape.CircleTest.testProperties(CircleTest.java:44)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </error>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0" name="testPI"/>
+  <testcase time="0.01" name="testCircumference"/>
+  <testcase time="0" name="testDiameter"/>
+</testsuite>
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/plugin-config.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/plugin-config.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/plugin-config.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,38 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <configuration>
+          <outputDirectory>${basedir}/target/site/unit/basic-surefire-report-test</outputDirectory>
+          <project implementation="org.apache.maven.plugins.surefire.report.stubs.SurefireRepMavenProjectStub"/>
+          <showSuccess>true</showSuccess>
+          <reportsDirectory>${basedir}/src/test/resources/unit/basic-surefire-report-test/surefire-reports
+          </reportsDirectory>
+          <outputName>surefire-report</outputName>
+          <xrefLocation>${basedir}/target/site/unit/basic-surefire-report-test/xref-test</xrefLocation>
+          <linkXRef>true</linkXRef>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/surefire-reports/TEST-com.shape.CircleTest.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/surefire-reports/TEST-com.shape.CircleTest.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/surefire-reports/TEST-com.shape.CircleTest.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<testsuite errors="1" tests="8" time="0.201" failures="1" name="com.shape.CircleTest">
+  <properties>
+    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\bin" name="sun.boot.library.path"/>
+    <property value="1.5.0_04-b05" name="java.vm.version"/>
+    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+    <property value="http://java.sun.com/" name="java.vendor.url"/>
+    <property value=";" name="path.separator"/>
+    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+    <property value="sun.io" name="file.encoding.pkg"/>
+    <property value="US" name="user.country"/>
+    <property value="Service Pack 2" name="sun.os.patch.level"/>
+    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="user.dir"/>
+    <property value="1.5.0_04-b05" name="java.runtime.version"/>
+    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+    <property value="C:\JAppsCode\mergere-maven\plugins\sample-projects\junit-report-tester" name="basedir"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\endorsed" name="java.endorsed.dirs"/>
+    <property value="x86" name="os.arch"/>
+    <property value="C:\DOCUME~1\Jontri\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+    <property value="
+" name="line.separator"/>
+    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+    <property value="" name="user.variant"/>
+    <property value="Windows XP" name="os.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\bin\m2.conf" name="classworlds.conf"/>
+    <property value="Cp1252" name="sun.jnu.encoding"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\JApps\maven-2.0-beta-1\bin;C:\JApps\maven-1.0.2\bin;c:\BatchFile;C:\Program Files\cvsnt;C:\JApps\svn-1.1.4\bin;C:\JApps\ant-1.6.2\bin;"
+        name="java.library.path"/>
+    <property value="Java Platform API Specification" name="java.specification.name"/>
+    <property value="49.0" name="java.class.version"/>
+    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+    <property value="5.1" name="os.version"/>
+    <property value="C:\Documents and Settings\Jontri" name="user.home"/>
+    <property value="Asia/Shanghai" name="user.timezone"/>
+    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+    <property value="Cp1252" name="file.encoding"/>
+    <property value="1.5" name="java.specification.version"/>
+    <property value="Jontri" name="user.name"/>
+    <property value="C:\JApps\maven-2.0-beta-1\core\boot\classworlds-1.1-alpha-2.jar" name="java.class.path"/>
+    <property value="1.0" name="java.vm.specification.version"/>
+    <property value="32" name="sun.arch.data.model"/>
+    <property value="c:\japps\jdk1.5.0_04\jre" name="java.home"/>
+    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+    <property value="en" name="user.language"/>
+    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+    <property value="mixed mode, sharing" name="java.vm.info"/>
+    <property value="1.5.0_04" name="java.version"/>
+    <property value="c:\japps\jdk1.5.0_04\jre\lib\ext" name="java.ext.dirs"/>
+    <property
+        value="c:\japps\jdk1.5.0_04\jre\lib\rt.jar;c:\japps\jdk1.5.0_04\jre\lib\i18n.jar;c:\japps\jdk1.5.0_04\jre\lib\sunrsasign.jar;c:\japps\jdk1.5.0_04\jre\lib\jsse.jar;c:\japps\jdk1.5.0_04\jre\lib\jce.jar;c:\japps\jdk1.5.0_04\jre\lib\charsets.jar;c:\japps\jdk1.5.0_04\jre\classes"
+        name="sun.boot.class.path"/>
+    <property value="Sun Microsystems Inc." name="java.vendor"/>
+    <property value="C:\JApps\maven-2.0-beta-1" name="maven.home"/>
+    <property value="C:\Documents and Settings\Jontri\.m2\repository" name="localRepository"/>
+    <property value="\" name="file.separator"/>
+    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+    <property value="little" name="sun.cpu.endian"/>
+    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+    <property value="windows" name="sun.desktop"/>
+    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
+  </properties>
+  <testcase time="0.01" name="testX"/>
+  <testcase time="0" name="testY"/>
+  <testcase time="0" name="testXY"/>
+  <testcase time="0.01" name="testRadius">
+    <failure type="junit.framework.AssertionFailedError" message="expected:&lt;20&gt; but was:&lt;10&gt;">
+      junit.framework.AssertionFailedError: expected:&lt;20&gt; but was:&lt;10&gt;
+      at junit.framework.Assert.fail(Assert.java:47)
+      at junit.framework.Assert.failNotEquals(Assert.java:282)
+      at junit.framework.Assert.assertEquals(Assert.java:64)
+      at junit.framework.Assert.assertEquals(Assert.java:201)
+      at junit.framework.Assert.assertEquals(Assert.java:207)
+      at com.shape.CircleTest.testRadius(CircleTest.java:34)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </failure>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0.02" name="testProperties">
+    <error type="java.lang.ArithmeticException" message="/ by zero">java.lang.ArithmeticException: / by zero
+      at com.shape.CircleTest.testProperties(CircleTest.java:44)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at junit.framework.TestCase.runTest(TestCase.java:154)
+      at junit.framework.TestCase.runBare(TestCase.java:127)
+      at junit.framework.TestResult$1.protect(TestResult.java:106)
+      at junit.framework.TestResult.runProtected(TestResult.java:124)
+      at junit.framework.TestResult.run(TestResult.java:109)
+      at junit.framework.TestCase.run(TestCase.java:118)
+      at junit.framework.TestSuite.runTest(TestSuite.java:208)
+      at junit.framework.TestSuite.run(TestSuite.java:203)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
+      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
+      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:203)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:152)
+      at org.codehaus.surefire.Surefire.run(Surefire.java:76)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
+      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:241)
+      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:357)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:479)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:452)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:438)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
+      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:131)
+      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
+      at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
+      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+      at java.lang.reflect.Method.invoke(Method.java:585)
+      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
+      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
+      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
+      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
+    </error>
+    <system-out>[OUT] : Getting the diameter
+    </system-out>
+    <system-err>[ERR] : Getting the Circumference
+    </system-err>
+  </testcase>
+  <testcase time="0" name="testPI"/>
+  <testcase time="0.01" name="testCircumference"/>
+  <testcase time="0" name="testDiameter"/>
+</testsuite>
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,192 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>maven-parent</artifactId>
+    <groupId>org.apache.maven</groupId>
+    <version>5</version>
+    <relativePath>../pom/maven/pom.xml</relativePath>
+  </parent>
+  <groupId>org.apache.maven.surefire</groupId>
+  <artifactId>surefire</artifactId>
+  <packaging>pom</packaging>
+  <name>SureFire</name>
+  <version>2.4-SNAPSHOT</version>
+  <description>Surefire is a test framework project.</description>
+  <url>http://maven.apache.org/surefire</url>
+  <issueManagement>
+    <system>jira</system>
+    <url>http://jira.codehaus.org/browse/SUREFIRE</url>
+  </issueManagement>
+  <inceptionYear>2004</inceptionYear>
+  <mailingLists>
+    <mailingList>
+      <name>Surefire User List</name>
+      <subscribe>surefire-users-subscribe at maven.apache.org</subscribe>
+      <unsubscribe>surefire-users-unsubscribe at maven.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-surefire-users/</archive>
+    </mailingList>
+    <mailingList>
+      <name>Surefire Developer List</name>
+      <subscribe>surefire-dev-subscribe at maven.apache.org</subscribe>
+      <unsubscribe>surfire-dev-unsubscribe at maven.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-surefire-dev/</archive>
+    </mailingList>
+    <mailingList>
+      <name>Surefire Commits List</name>
+      <subscribe>surefire-commits-subscribe at maven.apache.org</subscribe>
+      <unsubscribe>surefire-commits-unsubscribe at maven.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-surefire-commits/</archive>
+    </mailingList>
+  </mailingLists>
+  <contributors>
+    <contributor>
+      <name>Jesse Kuhnert</name>
+    </contributor>
+    <contributor>
+      <name>Vincent Siveton</name>
+      <email>vincent.siveton at gmail.com</email>
+      <organization>ASF</organization>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+    </contributor>
+  </contributors>
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/maven/surefire/trunk/</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/surefire/trunk/</developerConnection>
+    <url>http://svn.apache.org/viewcvs.cgi/maven/surefire/trunk</url>
+  </scm>
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.apache.maven.surefire</groupId>
+        <artifactId>surefire-api</artifactId>
+        <version>2.4-SNAPSHOT</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.maven.surefire</groupId>
+        <artifactId>surefire-booter</artifactId>
+        <version>2.4-SNAPSHOT</version>
+      </dependency>
+      <dependency>
+        <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-utils</artifactId>
+        <version>1.4.5</version>
+      </dependency>
+      <dependency>
+        <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-archiver</artifactId>
+        <version>1.0-alpha-7</version>
+      </dependency>      
+    </dependencies>
+  </dependencyManagement>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>jmock</groupId>
+      <artifactId>jmock</artifactId>
+      <version>1.0.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-site-plugin</artifactId>
+        <version>2.0-beta-5</version>
+      </plugin>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.3</source>
+          <target>1.3</target>
+        </configuration>
+      </plugin>
+    </plugins>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.3</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-release-plugin</artifactId>
+          <configuration>
+            <tagBase>https://svn.apache.org/repos/asf/maven/surefire/tags</tagBase>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+  <modules>
+    <module>surefire-api</module>
+    <module>surefire-booter</module>
+    <module>surefire-providers</module>
+    <module>maven-surefire-plugin</module>
+    <module>maven-surefire-report-plugin</module>
+  </modules>
+
+  <profiles>
+    <!-- use preinstalled JDK 1.3 to build and test -->
+    <profile>
+      <id>jdk1.3</id>
+      <build>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <artifactId>maven-compiler-plugin</artifactId>
+              <configuration>
+                <fork>true</fork>
+                <compilerVersion>1.3</compilerVersion>
+                <executable>${JAVA_1_3_HOME}/bin/javac</executable>
+              </configuration>
+            </plugin>
+            <plugin>
+              <artifactId>maven-surefire-plugin</artifactId>
+              <configuration>
+                <forkMode>once</forkMode>
+                <childDelegation>true</childDelegation>
+                <jvm>${JAVA_1_3_HOME}/bin/java</jvm>
+              </configuration>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+    </profile>
+  </profiles>
+  <repositories>
+    <repository>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <id>codehaus.snapshots</id>
+      <name>Codehaus Snapshot Development Repository</name>
+      <url>http://snapshots.repository.codehaus.org</url>
+    </repository>
+  </repositories>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/src/site/apt/maven-surefire-plugin/index.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/src/site/apt/maven-surefire-plugin/index.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/src/site/apt/maven-surefire-plugin/index.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,31 @@
+  ~~ Licensed to the Apache Software Foundation (ASF) under one
+  ~~ or more contributor license agreements.  See the NOTICE file
+  ~~ distributed with this work for additional information
+  ~~ regarding copyright ownership.  The ASF licenses this file
+  ~~ to you under the Apache License, Version 2.0 (the
+  ~~ "License"); you may not use this file except in compliance
+  ~~ with the License.  You may obtain a copy of the License at
+  ~~
+  ~~   http://www.apache.org/licenses/LICENSE-2.0
+  ~~
+  ~~ Unless required by applicable law or agreed to in writing,
+  ~~ software distributed under the License is distributed on an
+  ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~~ KIND, either express or implied.  See the License for the
+  ~~ specific language governing permissions and limitations
+  ~~ under the License.
+
+ ---------------------
+ Maven Surefire Plugin
+ ---------------------
+ The Maven Team
+ ---------------------
+ February 8, 2007
+ ---------------------
+
+Maven Surefire Plugin
+
+  For documentation on the Maven Surefire Plugin, follow this link:
+
+  {{{http://maven.apache.org/plugins/maven-surefire-plugin}
+  http://maven.apache.org/plugins/maven-surefire-plugin}}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/src/site/apt/maven-surefire-report-plugin/index.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/src/site/apt/maven-surefire-report-plugin/index.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/src/site/apt/maven-surefire-report-plugin/index.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,31 @@
+  ~~ Licensed to the Apache Software Foundation (ASF) under one
+  ~~ or more contributor license agreements.  See the NOTICE file
+  ~~ distributed with this work for additional information
+  ~~ regarding copyright ownership.  The ASF licenses this file
+  ~~ to you under the Apache License, Version 2.0 (the
+  ~~ "License"); you may not use this file except in compliance
+  ~~ with the License.  You may obtain a copy of the License at
+  ~~
+  ~~   http://www.apache.org/licenses/LICENSE-2.0
+  ~~
+  ~~ Unless required by applicable law or agreed to in writing,
+  ~~ software distributed under the License is distributed on an
+  ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~~ KIND, either express or implied.  See the License for the
+  ~~ specific language governing permissions and limitations
+  ~~ under the License.
+
+  ---------------------
+  Maven Surefire Report Plugin
+  ---------------------
+  The Maven Team
+  ---------------------
+  February 8, 2007
+  ---------------------
+ 
+Maven Surefire Report Plugin
+
+  For documentation on the Maven Surefire Report Plugin, follow this link:
+
+  {{{http://maven.apache.org/plugins/maven-surefire-report-plugin}
+  http://maven.apache.org/plugins/maven-surefire-report-plugin}}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/src/site/site.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/src/site/site.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/src/site/site.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+~ Licensed to the Apache Software Foundation (ASF) under one
+~ or more contributor license agreements.  See the NOTICE file
+~ distributed with this work for additional information
+~ regarding copyright ownership.  The ASF licenses this file
+~ to you under the Apache License, Version 2.0 (the
+~ "License"); you may not use this file except in compliance
+~ with the License.  You may obtain a copy of the License at
+~
+~     http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing,
+~ software distributed under the License is distributed on an
+~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~ KIND, either express or implied.  See the License for the
+~ specific language governing permissions and limitations
+~ under the License.
+-->
+
+<project name="Surefire">
+  <!-- TODO: banners, skin, publish date, version should be inherited from Maven itself -->
+  <bannerLeft>
+    <name>${project.name}</name>
+    <src>http://maven.apache.org/images/apache-maven-project-2.png</src>
+    <href>http://maven.apache.org/surefire</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://maven.apache.org/images/maven-logo-2.gif</src>
+  </bannerRight>
+  <skin>
+    <groupId>org.apache.maven.skins</groupId>
+    <artifactId>maven-stylus-skin</artifactId>
+  </skin>
+  <publishDate format="dd MMM yyyy" position="left"/>
+  <version position="left"/>
+  <body>
+    <!-- TODO: Link, head, reports should be inherited -->
+    <!-- TODO: use breadcrumbs more structure, links for links, and inherit subprojects as a menu or not at all -->
+    <links>
+      <item name="Apache" href="http://www.apache.org/"/>
+      <item name="Maven 1.x" href="http://maven.apache.org/maven-1.x"/>
+      <item name="Maven 2.x" href="http://maven.apache.org/"/>
+      <item name="Maven 2.x Plugins" href="http://maven.apache.org/plugins/"/>
+      <item name="Continuum" href="http://maven.apache.org/continuum"/>
+      <item name="SCM" href="http://maven.apache.org/scm"/>
+      <item name="Wagon" href="http://maven.apache.org/wagon"/>
+      <item name="JXR" href="http://maven.apache.org/jxr"/>
+      <item name="Doxia" href="http://maven.apache.org/doxia"/>
+    </links>
+    <head>
+      <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+      </script>
+      <script type="text/javascript">
+        _uacct = "UA-140879-1";
+        urchinTracker();
+      </script>
+    </head>
+    <menu ref="modules"/>
+    <menu ref="reports" inherit="bottom"/>
+  </body>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,40 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>surefire</artifactId>
+    <groupId>org.apache.maven.surefire</groupId>
+    <version>2.4-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>surefire-api</artifactId>
+  <name>SureFire API</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.1</version>
+    </dependency>
+  </dependencies>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/appended-resources/META-INF/NOTICE
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/appended-resources/META-INF/NOTICE	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/appended-resources/META-INF/NOTICE	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,3 @@
+
+This product includes software developed by the Spring Framework
+Project (http://www.springframework.org).

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/Surefire.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/Surefire.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/Surefire.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,263 @@
+package org.apache.maven.surefire;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.Reporter;
+import org.apache.maven.surefire.report.ReporterException;
+import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.suite.SurefireTestSuite;
+import org.apache.maven.surefire.testset.TestSetFailedException;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.ResourceBundle;
+
+/**
+ * @author Jason van Zyl
+ * @version $Id$
+ */
+public class Surefire
+{
+    private ResourceBundle bundle = ResourceBundle.getBundle( SUREFIRE_BUNDLE_NAME );
+
+    public static final String SUREFIRE_BUNDLE_NAME = "org.apache.maven.surefire.surefire";
+
+    public boolean run( List reportDefinitions, Object[] testSuiteDefinition, String testSetName,
+                        ClassLoader surefireClassLoader, ClassLoader testsClassLoader )
+        throws ReporterException, TestSetFailedException
+    {
+        return run( reportDefinitions, testSuiteDefinition, testSetName, surefireClassLoader, testsClassLoader, null );
+    }
+
+    public boolean run( List reportDefinitions, Object[] testSuiteDefinition, String testSetName,
+                        ClassLoader surefireClassLoader, ClassLoader testsClassLoader, Properties results )
+        throws ReporterException, TestSetFailedException
+    {
+        ReporterManager reporterManager =
+            new ReporterManager( instantiateReports( reportDefinitions, surefireClassLoader ) );
+
+        if ( results != null )
+        {
+            reporterManager.initResultsFromProperties( results );
+        }
+
+        int totalTests = 0;
+
+        SurefireTestSuite suite =
+            createSuiteFromDefinition( testSuiteDefinition, surefireClassLoader, testsClassLoader );
+
+        int testCount = suite.getNumTests();
+        if ( testCount > 0 )
+        {
+            totalTests += testCount;
+        }
+
+        reporterManager.runStarting( totalTests );
+
+        if ( totalTests == 0 )
+        {
+            reporterManager.writeMessage( "There are no tests to run." );
+        }
+        else
+        {
+            suite.execute( testSetName, reporterManager, testsClassLoader );
+        }
+
+        reporterManager.runCompleted();
+
+        if ( results != null )
+        {
+            reporterManager.updateResultsProperties( results );
+        }
+
+        return reporterManager.getNumErrors() == 0 && reporterManager.getNumFailures() == 0;
+    }
+
+    public boolean run( List reportDefinitions, List testSuiteDefinitions, ClassLoader surefireClassLoader,
+                        ClassLoader testsClassLoader )
+        throws ReporterException, TestSetFailedException
+    {
+        ReporterManager reporterManager =
+            new ReporterManager( instantiateReports( reportDefinitions, surefireClassLoader ) );
+
+        List suites = new ArrayList();
+
+        int totalTests = 0;
+        for ( Iterator i = testSuiteDefinitions.iterator(); i.hasNext(); )
+        {
+            Object[] definition = (Object[]) i.next();
+
+            SurefireTestSuite suite = createSuiteFromDefinition( definition, surefireClassLoader, testsClassLoader );
+
+            int testCount = suite.getNumTests();
+            if ( testCount > 0 )
+            {
+                suites.add( suite );
+                totalTests += testCount;
+            }
+        }
+
+        reporterManager.runStarting( totalTests );
+
+        if ( totalTests == 0 )
+        {
+            reporterManager.writeMessage( "There are no tests to run." );
+        }
+        else
+        {
+            for ( Iterator i = suites.iterator(); i.hasNext(); )
+            {
+                SurefireTestSuite suite = (SurefireTestSuite) i.next();
+                suite.execute( reporterManager, testsClassLoader );
+            }
+        }
+
+        reporterManager.runCompleted();
+
+        return reporterManager.getNumErrors() == 0 && reporterManager.getNumFailures() == 0;
+    }
+
+    private SurefireTestSuite createSuiteFromDefinition( Object[] definition, ClassLoader surefireClassLoader,
+                                                         ClassLoader testsClassLoader )
+        throws TestSetFailedException
+    {
+        String suiteClass = (String) definition[0];
+        Object[] params = (Object[]) definition[1];
+
+        SurefireTestSuite suite = instantiateSuite( suiteClass, params, surefireClassLoader );
+
+        suite.locateTestSets( testsClassLoader );
+
+        return suite;
+    }
+
+    private List instantiateReports( List reportDefinitions, ClassLoader classLoader )
+        throws TestSetFailedException
+    {
+        List reports = new ArrayList();
+
+        for ( Iterator i = reportDefinitions.iterator(); i.hasNext(); )
+        {
+            Object[] definition = (Object[]) i.next();
+
+            String className = (String) definition[0];
+            Object[] params = (Object[]) definition[1];
+
+            Reporter report = instantiateReport( className, params, classLoader );
+
+            reports.add( report );
+        }
+
+        return reports;
+    }
+
+    private static Reporter instantiateReport( String className, Object[] params, ClassLoader classLoader )
+        throws TestSetFailedException
+    {
+        try
+        {
+            return (Reporter) instantiateObject( className, params, classLoader );
+        }
+        catch ( ClassNotFoundException e )
+        {
+            throw new TestSetFailedException( "Unable to find class to create report '" + className + "'", e );
+        }
+        catch ( NoSuchMethodException e )
+        {
+            throw new TestSetFailedException(
+                "Unable to find appropriate constructor to create report: " + e.getMessage(), e );
+        }
+    }
+
+    public static Object instantiateObject( String className, Object[] params, ClassLoader classLoader )
+        throws TestSetFailedException, ClassNotFoundException, NoSuchMethodException
+    {
+        Class clazz = classLoader.loadClass( className );
+
+        Object object;
+        try
+        {
+            if ( params != null )
+            {
+                Class[] paramTypes = new Class[params.length];
+
+                for ( int j = 0; j < params.length; j++ )
+                {
+                    if ( params[j] == null )
+                    {
+                        paramTypes[j] = String.class;
+                    }
+                    else
+                    {
+                        paramTypes[j] = params[j].getClass();
+                    }
+                }
+
+                Constructor constructor = clazz.getConstructor( paramTypes );
+
+                object = constructor.newInstance( params );
+            }
+            else
+            {
+                object = clazz.newInstance();
+            }
+        }
+        catch ( IllegalAccessException e )
+        {
+            throw new TestSetFailedException( "Unable to instantiate object: " + e.getMessage(), e );
+        }
+        catch ( InvocationTargetException e )
+        {
+            throw new TestSetFailedException( e.getTargetException().getMessage(), e.getTargetException() );
+        }
+        catch ( InstantiationException e )
+        {
+            throw new TestSetFailedException( "Unable to instantiate object: " + e.getMessage(), e );
+        }
+        return object;
+    }
+
+    private static SurefireTestSuite instantiateSuite( String suiteClass, Object[] params, ClassLoader classLoader )
+        throws TestSetFailedException
+    {
+        try
+        {
+            return (SurefireTestSuite) instantiateObject( suiteClass, params, classLoader );
+        }
+        catch ( ClassNotFoundException e )
+        {
+            throw new TestSetFailedException( "Unable to find class to create suite '" + suiteClass + "'", e );
+        }
+        catch ( NoSuchMethodException e )
+        {
+            throw new TestSetFailedException(
+                "Unable to find appropriate constructor to create suite: " + e.getMessage(), e );
+        }
+    }
+
+    public String getResourceString( String key )
+    {
+        return bundle.getString( key );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/ComparisonTool.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/ComparisonTool.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/ComparisonTool.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,126 @@
+package org.apache.maven.surefire.assertion;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Utilities for displaying comparison failures.
+ */
+public class ComparisonTool
+{
+    private ComparisonTool()
+    {
+    }
+
+    /**
+     * Returns "..." in place of common prefix and "..." in
+     * place of common suffix between expected and actual.
+     * <p/>
+     * Inspired by a patch from Alex Chaffee mailto:alex at purpletech.com
+     *
+     * @param message  the message to go along with the comparison
+     * @param expected the expected value
+     * @param actual   the actual value
+     * @return the reduced comparison
+     */
+    static String trimComparison( String message, String expected, String actual )
+    {
+        String actualValue;
+        String expectedValue;
+
+        if ( expected == null && actual == null )
+        {
+            throw new IllegalArgumentException( "Cannot pass both expected and actual as null" );
+        }
+        else if ( expected == null || actual == null )
+        {
+            actualValue = actual;
+            expectedValue = expected;
+        }
+        else
+        {
+            int end = Math.min( expected.length(), actual.length() );
+
+            int i = 0;
+            for ( ; i < end; i++ )
+            {
+                if ( expected.charAt( i ) != actual.charAt( i ) )
+                {
+                    break;
+                }
+            }
+            int j = expected.length() - 1;
+            int k = actual.length() - 1;
+            for ( ; k >= i && j >= i; k--, j-- )
+            {
+                if ( expected.charAt( j ) != actual.charAt( k ) )
+                {
+                    break;
+                }
+            }
+
+            // equal strings
+            if ( j < i && k < i )
+            {
+                throw new IllegalArgumentException( "expected and actual cannot be the same" );
+            }
+            else
+            {
+                expectedValue = expected.substring( i, j + 1 );
+                actualValue = actual.substring( i, k + 1 );
+                if ( i <= end && i > 0 )
+                {
+                    expectedValue = "..." + expectedValue;
+                    actualValue = "..." + actualValue;
+                }
+
+                if ( j < expected.length() - 1 )
+                {
+                    expectedValue = expectedValue + "...";
+                }
+                if ( k < actual.length() - 1 )
+                {
+                    actualValue = actualValue + "...";
+                }
+            }
+        }
+        return formatMismatch( message, expectedValue, actualValue );
+    }
+
+    /**
+     * Format a message for a comparison failure.
+     *
+     * @param message  the message to go with the failure
+     * @param expected the expected value
+     * @param actual   the actual value
+     * @return the formatted string
+     */
+    static String formatMismatch( String message, Object expected, Object actual )
+    {
+        String formatted = "";
+
+        if ( message != null )
+        {
+            formatted = message + " ";
+        }
+
+        // TODO! i18n
+        return formatted + "expected:<" + expected + "> but was:<" + actual + ">";
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireAssert.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireAssert.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireAssert.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,317 @@
+package org.apache.maven.surefire.assertion;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public class SurefireAssert
+{
+    private SurefireAssert()
+    {
+        // No touchy.
+    }
+
+    public static void fail()
+    {
+        throw new SurefireAssertionFailedException();
+    }
+
+    public static void fail( String message )
+    {
+        if ( message == null )
+        {
+            throw new NullPointerException( "message is null" );
+        }
+        throw new SurefireAssertionFailedException( message );
+    }
+
+    public static void fail( String message, Throwable cause )
+    {
+        if ( message == null )
+        {
+            throw new NullPointerException( "message is null" );
+        }
+
+        if ( cause == null )
+        {
+            throw new NullPointerException( "cause is null" );
+        }
+
+        throw new SurefireAssertionFailedException( message, cause );
+    }
+
+    public static void fail( Throwable cause )
+    {
+        if ( cause == null )
+        {
+            throw new NullPointerException( "cause is null" );
+        }
+
+        throw new SurefireAssertionFailedException( cause );
+    }
+
+    // ----------------------------------------------------------------------
+    // JUnit type assertions
+    // ----------------------------------------------------------------------
+
+    public static void assertTrue( String message, boolean condition )
+    {
+        if ( !condition )
+        {
+            if ( message != null )
+            {
+                fail( message );
+            }
+            else
+            {
+                fail();
+            }
+        }
+    }
+
+    public static void assertTrue( boolean condition )
+    {
+        assertTrue( null, condition );
+    }
+
+    public static void assertFalse( String message, boolean condition )
+    {
+        assertTrue( message, !condition );
+    }
+
+    public static void assertFalse( boolean condition )
+    {
+        assertFalse( null, condition );
+    }
+
+    public static void assertEquals( String message, Object expected, Object actual )
+    {
+        if ( expected != null || actual != null )
+        {
+            if ( expected == null || !expected.equals( actual ) )
+            {
+                failNotEquals( message, expected, actual );
+            }
+        }
+    }
+
+    public static void assertEquals( Object expected, Object actual )
+    {
+        assertEquals( null, expected, actual );
+    }
+
+    public static void assertEquals( String message, String expected, String actual )
+    {
+        if ( expected != null || actual != null )
+        {
+            if ( expected == null || !expected.equals( actual ) )
+            {
+                throw new SurefireComparisonFailureException( message, expected, actual );
+            }
+        }
+    }
+
+    public static void assertEquals( String expected, String actual )
+    {
+        assertEquals( null, expected, actual );
+    }
+
+    public static void assertEquals( String message, double expected, double actual, double delta )
+    {
+        // handle infinity specially since subtracting to infinite values gives NaN and the
+        // the following test fails
+        if ( Double.isInfinite( expected ) )
+        {
+            if ( !Double.isInfinite( actual ) )
+            {
+                failNotEquals( message, new Double( expected ), new Double( actual ) );
+            }
+        }
+        else if ( !( Math.abs( expected - actual ) <= delta ) ) // Because comparison with NaN always returns false
+        {
+            failNotEquals( message, new Double( expected ), new Double( actual ) );
+        }
+    }
+
+    public static void assertEquals( double expected, double actual, double delta )
+    {
+        assertEquals( null, expected, actual, delta );
+    }
+
+    public static void assertEquals( String message, float expected, float actual, float delta )
+    {
+        // handle infinity specially since subtracting to infinite values gives NaN and the
+        // the following test fails
+        if ( Float.isInfinite( expected ) )
+        {
+            if ( !Float.isInfinite( actual ) )
+            {
+                failNotEquals( message, new Float( expected ), new Float( actual ) );
+            }
+
+        }
+        else if ( !( Math.abs( expected - actual ) <= delta ) )
+        {
+            failNotEquals( message, new Float( expected ), new Float( actual ) );
+        }
+    }
+
+    public static void assertEquals( float expected, float actual, float delta )
+    {
+        assertEquals( null, expected, actual, delta );
+    }
+
+    public static void assertEquals( String message, long expected, long actual )
+    {
+        assertEquals( message, new Long( expected ), new Long( actual ) );
+    }
+
+    public static void assertEquals( long expected, long actual )
+    {
+        assertEquals( null, expected, actual );
+    }
+
+    public static void assertEquals( String message, boolean expected, boolean actual )
+    {
+        assertEquals( message, expected ? Boolean.TRUE : Boolean.FALSE, actual ? Boolean.TRUE : Boolean.FALSE );
+    }
+
+    public static void assertEquals( boolean expected, boolean actual )
+    {
+        assertEquals( null, expected, actual );
+    }
+
+    public static void assertEquals( String message, byte expected, byte actual )
+    {
+        assertEquals( message, new Byte( expected ), new Byte( actual ) );
+    }
+
+    public static void assertEquals( byte expected, byte actual )
+    {
+        assertEquals( null, expected, actual );
+    }
+
+    public static void assertEquals( String message, char expected, char actual )
+    {
+        assertEquals( message, new Character( expected ), new Character( actual ) );
+    }
+
+    public static void assertEquals( char expected, char actual )
+    {
+        assertEquals( null, expected, actual );
+    }
+
+    public static void assertEquals( String message, short expected, short actual )
+    {
+        assertEquals( message, new Short( expected ), new Short( actual ) );
+    }
+
+    public static void assertEquals( short expected, short actual )
+    {
+        assertEquals( null, expected, actual );
+    }
+
+    public static void assertEquals( String message, int expected, int actual )
+    {
+        assertEquals( message, new Integer( expected ), new Integer( actual ) );
+    }
+
+    public static void assertEquals( int expected, int actual )
+    {
+        assertEquals( null, expected, actual );
+    }
+
+    public static void assertNotNull( Object object )
+    {
+        assertNotNull( null, object );
+    }
+
+    public static void assertNotNull( String message, Object object )
+    {
+        assertTrue( message, object != null );
+    }
+
+    public static void assertNull( Object object )
+    {
+        assertNull( null, object );
+    }
+
+    public static void assertNull( String message, Object object )
+    {
+        assertTrue( message, object == null );
+    }
+
+    public static void assertSame( String message, Object expected, Object actual )
+    {
+        //noinspection ObjectEquality
+        if ( expected != actual )
+        {
+            failNotSame( message, expected, actual );
+        }
+    }
+
+    public static void assertSame( Object expected, Object actual )
+    {
+        assertSame( null, expected, actual );
+    }
+
+    public static void assertNotSame( String message, Object expected, Object actual )
+    {
+        //noinspection ObjectEquality
+        if ( expected == actual )
+        {
+            failSame( message );
+        }
+    }
+
+    public static void assertNotSame( Object expected, Object actual )
+    {
+        assertNotSame( null, expected, actual );
+    }
+
+    private static void failSame( String message )
+    {
+        String formatted = "";
+
+        if ( message != null )
+        {
+            formatted = message + " ";
+        }
+
+        // TODO! i18n
+        fail( formatted + "expected not same" );
+    }
+
+    private static void failNotSame( String message, Object expected, Object actual )
+    {
+        String formatted = "";
+
+        if ( message != null )
+        {
+            formatted = message + " ";
+        }
+
+        // TODO! i18n
+        fail( formatted + "expected same:<" + expected + "> was not:<" + actual + ">" );
+    }
+
+    private static void failNotEquals( String message, Object expected, Object actual )
+    {
+        fail( ComparisonTool.formatMismatch( message, expected, actual ) );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireAssertionFailedException.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireAssertionFailedException.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireAssertionFailedException.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,48 @@
+package org.apache.maven.surefire.assertion;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.util.NestedRuntimeException;
+
+/**
+ * @noinspection UncheckedExceptionClass
+ */
+public class SurefireAssertionFailedException
+    extends NestedRuntimeException
+{
+    public SurefireAssertionFailedException()
+    {
+    }
+
+    public SurefireAssertionFailedException( String message )
+    {
+        super( message );
+    }
+
+    public SurefireAssertionFailedException( Throwable cause )
+    {
+        super( cause );
+    }
+
+    public SurefireAssertionFailedException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+}
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireComparisonFailureException.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireComparisonFailureException.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireComparisonFailureException.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,41 @@
+package org.apache.maven.surefire.assertion;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Thrown when an assertion equals for Strings failed.
+ *
+ * @noinspection UncheckedExceptionClass
+ */
+public class SurefireComparisonFailureException
+    extends SurefireAssertionFailedException
+{
+    /**
+     * Constructs a comparison failure.
+     *
+     * @param message  the identifying message or null
+     * @param expected the expected string value
+     * @param actual   the actual string value
+     */
+    public SurefireComparisonFailureException( String message, String expected, String actual )
+    {
+        super( ComparisonTool.trimComparison( message, expected, actual ) );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,159 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.BufferedOutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+
+/**
+ * Base class for console reporters.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ */
+public abstract class AbstractConsoleReporter
+    extends AbstractTextReporter
+{
+    private static final String TEST_SET_STARTING_PREFIX = "Running ";
+
+    private static final String TEST_SET_STARTING_GROUP_PREFIX = " (of ";
+
+    private static final String TEST_SET_STARTING_GROUP_SUFIX = ")";
+
+    protected static final int BUFFER_SIZE = 4096;
+
+    protected AbstractConsoleReporter( String format, Boolean trimStackTrace )
+    {
+        // TODO: use logger
+        super( new PrintWriter( new OutputStreamWriter( new BufferedOutputStream( System.out, BUFFER_SIZE ) ) ), format,
+               trimStackTrace );
+    }
+
+    public void testSetStarting( ReportEntry report )
+        throws ReporterException
+    {
+        super.testSetStarting( report );
+
+        writeMessage( getTestSetStartingMessage( report ) );
+    }
+
+    public void runStarting( int testCount )
+    {
+        writeHeading( "" );
+        writeHeading( "-------------------------------------------------------" );
+        writeHeading( " T E S T S" );
+        writeHeading( "-------------------------------------------------------" );
+    }
+
+    public void writeHeading( String message )
+    {
+        writer.println( message );
+        writer.flush();
+    }
+
+    public void runAborted( ReportEntry report )
+    {
+        printAbortionError( "RUN ABORTED", report );
+    }
+
+    public void testSetAborted( ReportEntry report )
+    {
+        printAbortionError( "TEST SET ABORTED", report );
+    }
+
+    private void printAbortionError( String msg, ReportEntry report )
+    {
+        writer.println( msg );
+        writer.println( report.getSource().getClass().getName() );
+        writer.println( report.getName() );
+        writer.println( report.getMessage() );
+        writer.println( getStackTrace( report ) );
+        writer.flush();
+    }
+
+    /**
+     * Get the test set starting message for a report.
+     * eg. "Running org.foo.BarTest ( of group )"
+     *
+     * @param report report whose test set is starting
+     * @return the message
+     * @todo internationalize
+     */
+    public static String getTestSetStartingMessage( ReportEntry report )
+    {
+        StringBuffer message = new StringBuffer();
+        message.append( TEST_SET_STARTING_PREFIX );
+        message.append( report.getName() );
+
+        if ( report.getGroup() != null && !report.getName().equals( report.getGroup() ) )
+        {
+            message.append( TEST_SET_STARTING_GROUP_PREFIX );
+            message.append( report.getGroup() );
+            message.append( TEST_SET_STARTING_GROUP_SUFIX );
+        }
+        return message.toString();
+    }
+
+    /**
+     * Parses a Surefire test set starting message into a {@link ReportEntry} object.
+     * Only name and group will be set if applicable.
+     *
+     * @param message
+     * @return the parsed {@link ReportEntry}
+     */
+    public static ReportEntry parseTestSetStartingMessage( String message )
+    {
+        ReportEntry reportEntry = new ReportEntry();
+        int i = message.indexOf( TEST_SET_STARTING_GROUP_PREFIX );
+        int j;
+        if ( i >= 0 )
+        {
+            j = message.indexOf( TEST_SET_STARTING_GROUP_SUFIX );
+            if ( j <= 0 )
+            {
+                throw new RuntimeException( "Message provided can not be parsed" );
+            }
+            reportEntry.setGroup( message.substring( i + TEST_SET_STARTING_GROUP_PREFIX.length(), j ) );
+        }
+        else
+        {
+            i = message.length();
+            if ( i <= 0 )
+            {
+                throw new RuntimeException( "Message provided can not be parsed" );
+            }
+        }
+        reportEntry.setName( message.substring( TEST_SET_STARTING_PREFIX.length(), i ) );
+        return reportEntry;
+    }
+
+    /**
+     * Check if the String passed as argument is a "test starting" message.
+     * If so it can be passed to {@link #parseTestSetStartingMessage(String)}
+     *
+     * @param message the message to check
+     * @return true if it is a "test starting" message
+     */
+    public static boolean isTestSetStartingMessage( String message )
+    {
+        return message.startsWith( TEST_SET_STARTING_PREFIX );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractFileReporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractFileReporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractFileReporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,84 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+/**
+ * Base class for file reporters.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ */
+public abstract class AbstractFileReporter
+    extends AbstractTextReporter
+{
+    private File reportsDirectory;
+
+    protected AbstractFileReporter( File reportsDirectory, String format, Boolean trimStackTrace )
+    {
+        super( format, trimStackTrace );
+
+        this.reportsDirectory = reportsDirectory;
+    }
+
+    public void testSetStarting( ReportEntry report )
+        throws ReporterException
+    {
+        super.testSetStarting( report );
+
+        File reportFile = new File( reportsDirectory, report.getName() + ".txt" );
+
+        File reportDir = reportFile.getParentFile();
+
+        reportDir.mkdirs();
+
+        try
+        {
+            PrintWriter writer = new PrintWriter( new FileWriter( reportFile ) );
+
+            writer.println( "-------------------------------------------------------------------------------" );
+
+            writer.println( "Test set: " + report.getName() );
+
+            writer.println( "-------------------------------------------------------------------------------" );
+
+            setWriter( writer );
+        }
+        catch ( IOException e )
+        {
+            throw new ReporterException( "Unable to create file for report: " + e.getMessage(), e );
+        }
+    }
+
+    public void testSetCompleted( ReportEntry report )
+        throws ReporterException
+    {
+        super.testSetCompleted( report );
+
+        writer.flush();
+
+        writer.close();
+
+        writer = null;
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,234 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.text.NumberFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:jason at maven.org">Jason van Zyl</a>
+ * @version $Id$
+ */
+public abstract class AbstractReporter
+    implements Reporter
+{
+    protected int completedCount;
+
+    protected int errors;
+
+    /**
+     * Holds the source(s) that causes the error(s).
+     */
+    private Collection errorSources = new ArrayList();
+
+    protected int failures;
+
+    /**
+     * Holds the source(s) that causes the failure(s).
+     */
+    private Collection failureSources = new ArrayList();
+
+    protected long startTime;
+
+    protected long endTime;
+
+    private NumberFormat numberFormat = NumberFormat.getInstance( Locale.ENGLISH );
+
+    protected static final String NL = System.getProperty( "line.separator" );
+
+    private static final int MS_PER_SEC = 1000;
+
+    protected long testSetStartTime;
+
+    protected int skipped;
+
+    private boolean trimStackTrace;
+
+    // ----------------------------------------------------------------------
+    // Report interface
+    // ----------------------------------------------------------------------
+
+
+    protected AbstractReporter( Boolean trimStackTrace )
+    {
+        this.trimStackTrace = trimStackTrace.booleanValue();
+    }
+
+    public void writeFooter( String footer )
+    {
+        writeMessage( footer );
+    }
+
+    public void runStarting( int testCount )
+    {
+    }
+
+    public void runCompleted()
+    {
+    }
+
+    public void runStopped()
+    {
+    }
+
+    public void runAborted( ReportEntry report )
+    {
+    }
+
+    public void testSetStarting( ReportEntry report )
+        throws ReporterException
+    {
+        testSetStartTime = System.currentTimeMillis();
+    }
+
+    public void testSetCompleted( ReportEntry report )
+        throws ReporterException
+    {
+    }
+
+    public void testSetAborted( ReportEntry report )
+    {
+    }
+
+    /**
+     * @see org.apache.maven.surefire.report.Reporter#getFailureSources()
+     */
+    public Collection getFailureSources()
+    {
+        return this.failureSources;
+    }
+
+    /**
+     * @see org.apache.maven.surefire.report.Reporter#getErrorSources()
+     */
+    public Collection getErrorSources()
+    {
+        return this.errorSources;
+    }
+
+    // ----------------------------------------------------------------------
+    // Test
+    // ----------------------------------------------------------------------
+
+    public void testStarting( ReportEntry report )
+    {
+        startTime = System.currentTimeMillis();
+    }
+
+    public void testSucceeded( ReportEntry report )
+    {
+        endTest();
+    }
+
+    public void testSkipped( ReportEntry report )
+    {
+        ++skipped;
+
+        endTest();
+    }
+
+    public void testError( ReportEntry report, String stdOut, String stdErr )
+    {
+        ++errors;
+        errorSources.add( report.getName() );
+        endTest();
+    }
+
+    public void testFailed( ReportEntry report, String stdOut, String stdErr )
+    {
+        ++failures;
+        failureSources.add( report.getName() );
+        endTest();
+    }
+
+    private void endTest()
+    {
+        ++completedCount;
+
+        endTime = System.currentTimeMillis();
+    }
+
+    // ----------------------------------------------------------------------
+    // Counters
+    // ----------------------------------------------------------------------
+
+    public int getNumErrors()
+    {
+        return errors;
+    }
+
+    public int getNumSkipped()
+    {
+        return skipped;
+    }
+
+    public int getNumFailures()
+    {
+        return failures;
+    }
+
+    public int getNumTests()
+    {
+        return completedCount;
+    }
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    public void reset()
+    {
+        errors = 0;
+
+        skipped = 0;
+
+        failures = 0;
+
+        completedCount = 0;
+
+        this.failureSources = new ArrayList();
+
+        this.errorSources = new ArrayList();
+
+    }
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    protected String elapsedTimeAsString( long runTime )
+    {
+        return numberFormat.format( (double) runTime / MS_PER_SEC );
+    }
+
+    /**
+     * Returns stacktrace as String.
+     *
+     * @param report ReportEntry object.
+     * @return stacktrace as string.
+     */
+    protected String getStackTrace( ReportEntry report )
+    {
+        return trimStackTrace ? report.getStackTraceWriter().writeTrimmedTraceToString()
+            : report.getStackTraceWriter().writeTraceToString();
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractTextReporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractTextReporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractTextReporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,199 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Text based reporter.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ */
+public abstract class AbstractTextReporter
+    extends AbstractReporter
+{
+    protected static final String BRIEF = "brief";
+
+    protected static final String PLAIN = "plain";
+
+    protected static final String SUMMARY = "summary";
+
+    protected PrintWriter writer;
+
+    private static final String TEST_SET_COMPLETED_PREFIX = "Tests run: ";
+
+    private final String format;
+
+    private List testResults;
+
+    protected AbstractTextReporter( String format, Boolean trimStackTrace )
+    {
+        super( trimStackTrace );
+
+        this.format = format;
+    }
+
+    protected AbstractTextReporter( PrintWriter writer, String format, Boolean trimStackTrace )
+    {
+        super( trimStackTrace );
+
+        this.writer = writer;
+
+        this.format = format;
+    }
+
+    public void setWriter( PrintWriter writer )
+    {
+        this.writer = writer;
+    }
+
+    public void writeMessage( String message )
+    {
+        if ( writer != null )
+        {
+            writer.println( message );
+
+            writer.flush();
+        }
+    }
+
+    public void testSucceeded( ReportEntry report )
+    {
+        super.testSucceeded( report );
+
+        if ( PLAIN.equals( format ) )
+        {
+            testResults.add( getElapsedTimeSummary( report ) );
+        }
+    }
+
+    public void testSkipped( ReportEntry report )
+    {
+        super.testSkipped( report );
+
+        if ( PLAIN.equals( format ) )
+        {
+            testResults.add( report.getName() + " skipped" );
+        }
+    }
+
+    public void testError( ReportEntry report, String stdOut, String stdErr )
+    {
+        super.testError( report, stdOut, stdErr );
+
+        testResults.add( getOutput( report, "ERROR" ) );
+    }
+
+    public void testFailed( ReportEntry report, String stdOut, String stdErr )
+    {
+        super.testFailed( report, stdOut, stdErr );
+
+        testResults.add( getOutput( report, "FAILURE" ) );
+    }
+
+    public void testSetStarting( ReportEntry report )
+        throws ReporterException
+    {
+        super.testSetStarting( report );
+
+        testResults = new ArrayList();
+    }
+
+    public void testSetCompleted( ReportEntry report )
+        throws ReporterException
+    {
+        super.testSetCompleted( report );
+
+        writeMessage( getTestSetSummary() );
+
+        if ( format.equals( BRIEF ) || format.equals( PLAIN ) )
+        {
+            for ( Iterator i = testResults.iterator(); i.hasNext(); )
+            {
+                writeMessage( (String) i.next() );
+            }
+        }
+    }
+
+    protected String getTestSetSummary()
+    {
+        StringBuffer buf = new StringBuffer();
+
+        buf.append( TEST_SET_COMPLETED_PREFIX );
+        buf.append( completedCount );
+        buf.append( ", Failures: " );
+        buf.append( failures );
+        buf.append( ", Errors: " );
+        buf.append( errors );
+        buf.append( ", Skipped: " );
+        buf.append( skipped );
+        buf.append( ", Time elapsed: " );
+        buf.append( elapsedTimeAsString( System.currentTimeMillis() - testSetStartTime ) );
+        buf.append( " sec" );
+
+        if ( failures > 0 || errors > 0 )
+        {
+            buf.append( " <<< FAILURE!" );
+        }
+
+        return buf.toString();
+    }
+
+    protected String getElapsedTimeSummary( ReportEntry report )
+    {
+        StringBuffer reportContent = new StringBuffer();
+        long runTime = this.endTime - this.startTime;
+
+        reportContent.append( report.getName() );
+        reportContent.append( "  Time elapsed: " );
+        reportContent.append( elapsedTimeAsString( runTime ) );
+        reportContent.append( " sec" );
+
+        return reportContent.toString();
+    }
+
+    protected String getOutput( ReportEntry report, String msg )
+    {
+        StringBuffer buf = new StringBuffer();
+
+        buf.append( getElapsedTimeSummary( report ) );
+
+        buf.append( "  <<< " ).append( msg ).append( "!" ).append( NL );
+
+        buf.append( getStackTrace( report ) );
+
+        return buf.toString();
+    }
+
+    /**
+     * Check if the String passed as argument is a "test set completed" message.
+     *
+     * @param message the message to check
+     * @return true if it is a "test set completed" message
+     */
+    public static boolean isTestSetCompletedMessage( String message )
+    {
+        return message.startsWith( TEST_SET_COMPLETED_PREFIX );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefConsoleReporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefConsoleReporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefConsoleReporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,36 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Brief format console reporter.
+ *
+ * @author <a href="mailto:jruiz at exist.com">Johnny R. Ruiz III</a>
+ * @version $Id$
+ */
+
+public class BriefConsoleReporter
+    extends AbstractConsoleReporter
+{
+    public BriefConsoleReporter( Boolean trimStackTrace )
+    {
+        super( BRIEF, trimStackTrace );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefFileReporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefFileReporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefFileReporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,37 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+
+/**
+ * Brief format file reporter.
+ *
+ * @author <a href="mailto:jruiz at exist.com">Johnny R. Ruiz III</a>
+ * @version $Id$
+ */
+public class BriefFileReporter
+    extends AbstractFileReporter
+{
+    public BriefFileReporter( File reportsDirectory, Boolean trimStackTrace )
+    {
+        super( reportsDirectory, BRIEF, trimStackTrace );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleReporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleReporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleReporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,35 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Console reporter.
+ *
+ * @author <a href="mailto:jruiz at exist.com">Johnny R. Ruiz III</a>
+ * @version $Id$
+ */
+public class ConsoleReporter
+    extends AbstractConsoleReporter
+{
+    public ConsoleReporter( Boolean trimStackTrace )
+    {
+        super( SUMMARY, trimStackTrace );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DetailedConsoleReporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DetailedConsoleReporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DetailedConsoleReporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,35 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Detailed console reporter.
+ *
+ * @author <a href="mailto:jruiz at exist.com">Johnny R. Ruiz III</a>
+ * @version $Id$
+ */
+public class DetailedConsoleReporter
+    extends AbstractConsoleReporter
+{
+    public DetailedConsoleReporter( Boolean trimStackTrace )
+    {
+        super( PLAIN, trimStackTrace );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/FileReporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/FileReporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/FileReporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,37 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+
+/**
+ * Text file reporter.
+ *
+ * @author <a href="mailto:jruiz at exist.com">Johnny R. Ruiz III</a>
+ * @version $Id$
+ */
+public class FileReporter
+    extends AbstractFileReporter
+{
+    public FileReporter( File reportsDirectory, Boolean trimStackTrace )
+    {
+        super( reportsDirectory, PLAIN, trimStackTrace );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ForkingConsoleReporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ForkingConsoleReporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ForkingConsoleReporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,81 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Surefire reporter that will prefix surefire output to make it easier to parse when forking tests
+ *
+ * @version $Id$
+ */
+public class ForkingConsoleReporter
+    extends ConsoleReporter
+{
+    /**
+     * Surefire output lines not part of header or footer, nor test output will start with this value.
+     * eg. "Running org.foo.BarTest" or "Tests run: ..."
+     */
+    public static final String FORKING_PREFIX_STANDARD = "@SL";
+
+    /**
+     * Surefire output lines part of the header will start with this value
+     */
+    public static final String FORKING_PREFIX_HEADING = "@HL";
+
+    /**
+     * Surefire output lines part of the footer will start with this value
+     */
+    public static final String FORKING_PREFIX_FOOTER = "@FL";
+
+    public ForkingConsoleReporter( Boolean trimStackTrace )
+    {
+        super( trimStackTrace );
+    }
+
+    /**
+     * Write a header line prepending {@link #FORKING_PREFIX_HEADING}
+     */
+    public void writeHeading( String message )
+    {
+        writer.print( FORKING_PREFIX_HEADING );
+
+        super.writeHeading( message );
+    }
+
+    /**
+     * Write a footer line prepending {@link #FORKING_PREFIX_FOOTER}
+     */
+    public void writeFooter( String footer )
+    {
+        writer.print( FORKING_PREFIX_FOOTER );
+
+        // Deliberately set to writeMessage
+        super.writeMessage( footer );
+    }
+
+    /**
+     * Write a surefire message line prepending {@link #FORKING_PREFIX_STANDARD}
+     */
+    public void writeMessage( String message )
+    {
+        writer.print( FORKING_PREFIX_STANDARD );
+
+        super.writeMessage( message );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/PojoStackTraceWriter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/PojoStackTraceWriter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/PojoStackTraceWriter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,102 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.codehaus.plexus.util.StringUtils;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+/**
+ * Write the trace out for a POJO test.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ */
+public class PojoStackTraceWriter
+    implements StackTraceWriter
+{
+    private final Throwable t;
+
+    protected final String testClass;
+
+    protected final String testMethod;
+
+    public PojoStackTraceWriter( String testClass, String testMethod, Throwable t )
+    {
+        this.testClass = testClass;
+        this.testMethod = testMethod;
+        this.t = t;
+    }
+
+    public String writeTraceToString()
+    {
+        StringWriter w = new StringWriter();
+        t.printStackTrace( new PrintWriter( w ) );
+        w.flush();
+        return w.toString();
+    }
+
+    public String writeTrimmedTraceToString()
+    {
+        String text = writeTraceToString();
+
+        String marker = "at " + testClass + "." + testMethod;
+
+        String[] lines = StringUtils.split( text, "\n" );
+        int lastLine = lines.length - 1;
+        // skip first
+        for ( int i = 1; i < lines.length; i++ )
+        {
+            if ( lines[i].trim().startsWith( marker ) )
+            {
+                lastLine = i;
+            }
+        }
+
+        StringBuffer trace = new StringBuffer();
+        for ( int i = 0; i <= lastLine; i++ )
+        {
+            trace.append( lines[i] );
+            trace.append( "\n" );
+        }
+
+        for ( int i = lastLine; i < lines.length; i++ )
+        {
+            if ( lines[i].trim().startsWith( "Caused by" ) )
+            {
+                lastLine = i;
+                break;
+            }
+        }
+
+        for ( int i = lastLine; i < lines.length; i++ )
+        {
+            trace.append( lines[i] );
+            trace.append( "\n" );
+        }
+
+        return trace.toString();
+    }
+
+    public Throwable getThrowable()
+    {
+        return t;
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,178 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+public class ReportEntry
+{
+    private Object source;
+
+    private String name;
+
+    private String group;
+
+    private String message;
+
+    private StackTraceWriter stackTraceWriter;
+
+    public ReportEntry()
+    {
+    }
+
+    public ReportEntry( Object source, String name, String message )
+    {
+        this( source, name, null, message );
+    }
+
+    public ReportEntry( Object source, String name, String group, String message )
+    {
+        this( source, name, group, message, null );
+    }
+
+    public ReportEntry( Object source, String name, String message, StackTraceWriter stackTraceWriter )
+    {
+        this( source, name, null, message, stackTraceWriter );
+    }
+
+    public ReportEntry( Object source, String name, String group, String message, StackTraceWriter stackTraceWriter )
+    {
+        if ( source == null )
+        {
+            throw new NullPointerException( "source is null" );
+        }
+        if ( name == null )
+        {
+            throw new NullPointerException( "name is null" );
+        }
+        if ( message == null )
+        {
+            throw new NullPointerException( "message is null" );
+        }
+
+        this.setSource( source );
+
+        this.setName( name );
+
+        this.setGroup( group );
+
+        this.setMessage( message );
+
+        this.setStackTraceWriter( stackTraceWriter );
+    }
+
+    public void setSource( Object source )
+    {
+        this.source = source;
+    }
+
+    public Object getSource()
+    {
+        return source;
+    }
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setGroup( String group )
+    {
+        this.group = group;
+    }
+
+    public String getGroup()
+    {
+        return group;
+    }
+
+    public void setMessage( String message )
+    {
+        this.message = message;
+    }
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public void setStackTraceWriter( StackTraceWriter stackTraceWriter )
+    {
+        this.stackTraceWriter = stackTraceWriter;
+    }
+
+    public StackTraceWriter getStackTraceWriter()
+    {
+        return stackTraceWriter;
+    }
+
+    public boolean equals( Object obj )
+    {
+        if ( obj instanceof ReportEntry == false )
+        {
+            return false;
+        }
+        if ( this == obj )
+        {
+            return true;
+        }
+        ReportEntry rhs = (ReportEntry) obj;
+        return new EqualsBuilder()
+            .append( getSource(), rhs.getSource() )
+            .append( getName(), rhs.getName() )
+            .append( getGroup(), rhs.getGroup() )
+            .append( getMessage(), rhs.getMessage() )
+            .append( getStackTraceWriter(), rhs.getStackTraceWriter() )
+            .isEquals();
+    }
+
+    public String toString()
+    {
+        return new ToStringBuilder( this )
+            .append( "source", getSource() )
+            .append( "name", getName() )
+            .append( "group", getGroup() )
+            .append( "message", getMessage() )
+            .append( "stackTraceWriter", getStackTraceWriter() )
+            .toString();
+    }
+
+    public int hashCode()
+    {
+        // you pick a hard-coded, randomly chosen, non-zero, odd number
+        // ideally different for each class
+        // good resource at http://primes.utm.edu/lists/small/1000.txt
+        return new HashCodeBuilder( 5897, 6653 )
+            .append( getSource() )
+            .append( getName() )
+            .append( getGroup() )
+            .append( getMessage() )
+            .append( getStackTraceWriter() )
+            .toHashCode();
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,133 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Collection;
+
+/**
+ * Contract between the different implementations of the Surefire reporters
+ *
+ * @version $Id$
+ */
+public interface Reporter
+{
+    void writeMessage( String message );
+
+    void writeFooter( String footer );
+
+    // The entire run
+    void runStarting( int testCount );
+
+    void runCompleted();
+
+    void runStopped();
+
+    void runAborted( ReportEntry report );
+
+    // Test Sets
+    void testSetStarting( ReportEntry report )
+        throws ReporterException;
+
+    void testSetCompleted( ReportEntry report )
+        throws ReporterException;
+
+    void testSetAborted( ReportEntry report );
+
+    // Tests
+
+    /**
+     * Event fired when a test is about to start
+     *
+     * @param report
+     */
+    void testStarting( ReportEntry report );
+
+    /**
+     * Event fired when a test ended successfully
+     *
+     * @param report
+     */
+    void testSucceeded( ReportEntry report );
+
+    /**
+     * Event fired when a test ended with an error (non anticipated problem)
+     *
+     * @param report
+     * @param stdOut standard output from the test case
+     * @param stdErr error output from the test case
+     */
+    void testError( ReportEntry report, String stdOut, String stdErr );
+
+    /**
+     * Event fired when a test ended with a failure (anticipated problem)
+     *
+     * @param report
+     * @param stdOut standard output from the test case
+     * @param stdErr error output from the test case
+     */
+    void testFailed( ReportEntry report, String stdOut, String stdErr );
+
+    void testSkipped( ReportEntry report );
+
+    // Counters
+    void reset();
+
+    /**
+     * Get the number of errors
+     *
+     * @return
+     */
+    int getNumErrors();
+
+    /**
+     * Get the number of failures
+     *
+     * @return
+     */
+    int getNumFailures();
+
+    /**
+     * Get the number of tests
+     *
+     * @return
+     */
+    int getNumTests();
+
+    /**
+     * Get the number of tests skipped
+     *
+     * @return
+     */
+    int getNumSkipped();
+
+    /**
+     * Gives the source(s) that causes the error(s).
+     *
+     * @return The source(s).
+     */
+    Collection getErrorSources();
+
+    /**
+     * Gives the source(s) that causes the failures(s).
+     *
+     * @return The source(s).
+     */
+    Collection getFailureSources();
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterException.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterException.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterException.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,36 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.util.NestedCheckedException;
+
+/**
+ * Exception occurring during report generation.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ */
+public class ReporterException
+    extends NestedCheckedException
+{
+    public ReporterException( String message, Exception nested )
+    {
+        super( message, nested );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,416 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.util.TeeStream;
+import org.codehaus.plexus.util.IOUtil;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+
+public class ReporterManager
+{
+    private int completedCount;
+
+    private int errors;
+
+    /**
+     * Holds the sources of the error.
+     */
+    private Collection errorSources = new ArrayList();
+
+    private int failures;
+
+    /**
+     * Holds the sources of the failures.
+     */
+    private Collection failureSources = new ArrayList();
+
+    private List reports;
+
+    private PrintStream oldOut;
+
+    private PrintStream oldErr;
+
+    private PrintStream newErr;
+
+    private PrintStream newOut;
+
+    private int skipped;
+
+    private static final String RESULTS_ERRORS = "errors";
+
+    private static final String RESULTS_COMPLETED_COUNT = "completedCount";
+
+    private static final String RESULTS_FAILURES = "failures";
+
+    private static final String RESULTS_SKIPPED = "skipped";
+
+    public ReporterManager( List reports )
+    {
+        this.reports = reports;
+    }
+
+    public void addReporter( Reporter reporter )
+    {
+        if ( reporter == null )
+        {
+            throw new NullPointerException();
+        }
+
+        if ( !reports.contains( reporter ) )
+        {
+            reports.add( reporter );
+        }
+    }
+
+    public void removeReport( Reporter report )
+    {
+        if ( report == null )
+        {
+            throw new NullPointerException();
+        }
+
+        if ( reports.contains( report ) )
+        {
+            reports.remove( report );
+        }
+    }
+
+    public List getReports()
+    {
+        return reports;
+    }
+
+    public void writeMessage( String message )
+    {
+        for ( Iterator i = reports.iterator(); i.hasNext(); )
+        {
+            Reporter report = (Reporter) i.next();
+
+            report.writeMessage( message );
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    // Run
+    // ----------------------------------------------------------------------
+
+    public void runStarting( int testCount )
+    {
+        if ( testCount < 0 )
+        {
+            throw new IllegalArgumentException( "testCount is less than zero" );
+        }
+
+        for ( Iterator i = reports.iterator(); i.hasNext(); )
+        {
+            Reporter report = (Reporter) i.next();
+
+            report.runStarting( testCount );
+        }
+    }
+
+    public void runStopped()
+    {
+        for ( Iterator it = reports.iterator(); it.hasNext(); )
+        {
+            Reporter reporter = (Reporter) it.next();
+
+            reporter.runStopped();
+        }
+    }
+
+    public void runAborted( ReportEntry report )
+    {
+        if ( report == null )
+        {
+            throw new NullPointerException();
+        }
+
+        for ( Iterator it = reports.iterator(); it.hasNext(); )
+        {
+            Reporter reporter = (Reporter) it.next();
+
+            reporter.runAborted( report );
+        }
+
+        ++errors;
+    }
+
+    public void runCompleted()
+    {
+        for ( Iterator it = reports.iterator(); it.hasNext(); )
+        {
+            Reporter reporter = (Reporter) it.next();
+
+            reporter.runCompleted();
+        }
+
+        writeFooter( "" );
+        writeFooter( "Results :" );
+        writeFooter( "" );
+        if ( failures > 0 )
+        {
+            writeFooter( "Failed tests: " );
+            for ( Iterator iterator = this.failureSources.iterator(); iterator.hasNext(); )
+            {
+                writeFooter( "  " + iterator.next() );
+            }
+            writeFooter( "" );
+        }
+        if ( errors > 0 )
+        {
+            writeFooter( "Tests in error: " );
+            for ( Iterator iterator = this.errorSources.iterator(); iterator.hasNext(); )
+            {
+                writeFooter( "  " + iterator.next() );
+            }
+            writeFooter( "" );
+        }
+        writeFooter( "Tests run: " + completedCount + ", Failures: " + failures + ", Errors: " + errors +
+            ", Skipped: " + skipped );
+        writeFooter( "" );
+    }
+
+    private void writeFooter( String footer )
+    {
+        for ( Iterator i = reports.iterator(); i.hasNext(); )
+        {
+            Reporter report = (Reporter) i.next();
+
+            report.writeFooter( footer );
+        }
+    }
+
+    private ByteArrayOutputStream stdOut;
+
+    private ByteArrayOutputStream stdErr;
+
+    public void testSetStarting( ReportEntry report )
+        throws ReporterException
+    {
+        for ( Iterator it = reports.iterator(); it.hasNext(); )
+        {
+            Reporter reporter = (Reporter) it.next();
+
+            reporter.testSetStarting( report );
+        }
+    }
+
+    public void testSetCompleted( ReportEntry report )
+    {
+        if ( !reports.isEmpty() )
+        {
+            Reporter reporter = (Reporter) reports.get( 0 );
+
+            skipped += reporter.getNumSkipped();
+
+            errors += reporter.getNumErrors();
+            errorSources.addAll( reporter.getErrorSources() );
+
+            failures += reporter.getNumFailures();
+            failureSources.addAll( reporter.getFailureSources() );
+
+            completedCount += reporter.getNumTests();
+        }
+
+        for ( Iterator it = reports.iterator(); it.hasNext(); )
+        {
+            Reporter reporter = (Reporter) it.next();
+
+            try
+            {
+                reporter.testSetCompleted( report );
+            }
+            catch ( Exception e )
+            {
+            }
+        }
+    }
+
+    public void testSetAborted( ReportEntry report )
+    {
+        for ( Iterator it = reports.iterator(); it.hasNext(); )
+        {
+            Reporter reporter = (Reporter) it.next();
+
+            reporter.testSetAborted( report );
+        }
+
+        ++errors;
+    }
+
+    // ----------------------------------------------------------------------
+    // Test
+    // ----------------------------------------------------------------------
+
+    public void testStarting( ReportEntry report )
+    {
+        stdOut = new ByteArrayOutputStream();
+
+        newOut = new PrintStream( stdOut );
+
+        oldOut = System.out;
+
+        TeeStream tee = new TeeStream( oldOut, newOut );
+        System.setOut( tee );
+
+        stdErr = new ByteArrayOutputStream();
+
+        newErr = new PrintStream( stdErr );
+
+        oldErr = System.err;
+
+        tee = new TeeStream( oldErr, newErr );
+        System.setErr( tee );
+
+        for ( Iterator it = reports.iterator(); it.hasNext(); )
+        {
+            Reporter reporter = (Reporter) it.next();
+
+            reporter.testStarting( report );
+        }
+    }
+
+    public void testSucceeded( ReportEntry report )
+    {
+        resetStreams();
+
+        for ( Iterator it = reports.iterator(); it.hasNext(); )
+        {
+            Reporter reporter = (Reporter) it.next();
+
+            reporter.testSucceeded( report );
+        }
+    }
+
+    public void testError( ReportEntry reportEntry )
+    {
+        testFailed( reportEntry, "error" );
+    }
+
+    public void testFailed( ReportEntry reportEntry )
+    {
+        testFailed( reportEntry, "failure" );
+    }
+
+    private void testFailed( ReportEntry reportEntry, String typeError )
+    {
+        // Note that the fields can be null if the test hasn't even started yet (an early error)
+        String stdOutLog = stdOut != null ? stdOut.toString() : "";
+
+        String stdErrLog = stdErr != null ? stdErr.toString() : "";
+
+        resetStreams();
+
+        for ( Iterator it = reports.iterator(); it.hasNext(); )
+        {
+            Reporter reporter = (Reporter) it.next();
+
+            if ( "failure".equals( typeError ) )
+            {
+                reporter.testFailed( reportEntry, stdOutLog, stdErrLog );
+            }
+            else
+            {
+                reporter.testError( reportEntry, stdOutLog, stdErrLog );
+            }
+        }
+    }
+
+    private void resetStreams()
+    {
+        // Note that the fields can be null if the test hasn't even started yet (an early error)
+        if ( oldOut != null )
+        {
+            System.setOut( oldOut );
+        }
+        if ( oldErr != null )
+        {
+            System.setErr( oldErr );
+        }
+
+        IOUtil.close( newOut );
+        IOUtil.close( newErr );
+    }
+
+    public void reset()
+    {
+        for ( Iterator it = reports.iterator(); it.hasNext(); )
+        {
+            Reporter report = (Reporter) it.next();
+
+            report.reset();
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    // Counters
+    // ----------------------------------------------------------------------
+
+    public int getNumErrors()
+    {
+        return errors;
+    }
+
+    public int getNumFailures()
+    {
+        return failures;
+    }
+
+    public int getNbTests()
+    {
+        return completedCount;
+    }
+
+    public void testSkipped( ReportEntry report )
+    {
+        resetStreams();
+
+        for ( Iterator it = reports.iterator(); it.hasNext(); )
+        {
+            Reporter reporter = (Reporter) it.next();
+
+            reporter.testSkipped( report );
+        }
+    }
+
+    public void initResultsFromProperties( Properties results )
+    {
+        errors = Integer.valueOf( results.getProperty( RESULTS_ERRORS, "0" ) ).intValue();
+        skipped = Integer.valueOf( results.getProperty( RESULTS_SKIPPED, "0" ) ).intValue();
+        failures = Integer.valueOf( results.getProperty( RESULTS_FAILURES, "0" ) ).intValue();
+        completedCount = Integer.valueOf( results.getProperty( RESULTS_COMPLETED_COUNT, "0" ) ).intValue();
+    }
+
+    public void updateResultsProperties( Properties results )
+    {
+        results.setProperty( RESULTS_ERRORS, String.valueOf( errors ) );
+        results.setProperty( RESULTS_COMPLETED_COUNT, String.valueOf( completedCount ) );
+        results.setProperty( RESULTS_FAILURES, String.valueOf( failures ) );
+        results.setProperty( RESULTS_SKIPPED, String.valueOf( skipped ) );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/StackTraceWriter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/StackTraceWriter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/StackTraceWriter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,49 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Ability to write a stack trace, filtered to omit locations inside Surefire and Maven.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ */
+public interface StackTraceWriter
+{
+    /**
+     * Write the throwable to a string, without trimming.
+     *
+     * @return the trace
+     */
+    String writeTraceToString();
+
+    /**
+     * Write the throwable to a string, trimming extra locations.
+     *
+     * @return the trace
+     */
+    String writeTrimmedTraceToString();
+
+    /**
+     * Retrieve the throwable for this writer.
+     *
+     * @return the throwable
+     */
+    Throwable getThrowable();
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/XMLReporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/XMLReporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/XMLReporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,292 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.util.PrettyPrintXMLWriter;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+import org.codehaus.plexus.util.xml.Xpp3DomWriter;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+
+/**
+ * XML format reporter.
+ *
+ * @author <a href="mailto:jruiz at exist.com">Johnny R. Ruiz III</a>
+ * @version $Id$
+ */
+public class XMLReporter
+    extends AbstractReporter
+{
+    private static final String LS = System.getProperty( "line.separator" );
+
+    private File reportsDirectory;
+
+    private List results = Collections.synchronizedList( new ArrayList() );
+
+    public XMLReporter( File reportsDirectory, Boolean trimStackTrace )
+    {
+        super( trimStackTrace );
+
+        this.reportsDirectory = reportsDirectory;
+    }
+
+    public void writeMessage( String message )
+    {
+    }
+
+    public void testSetCompleted( ReportEntry report )
+        throws ReporterException
+    {
+        super.testSetCompleted( report );
+
+        long runTime = System.currentTimeMillis() - testSetStartTime;
+
+        Xpp3Dom testSuite = createTestElement( "testsuite", report, runTime );
+
+        showProperties( testSuite );
+
+        testSuite.setAttribute( "tests", String.valueOf( this.getNumTests() ) );
+
+        testSuite.setAttribute( "errors", String.valueOf( this.getNumErrors() ) );
+
+        testSuite.setAttribute( "skipped", String.valueOf( this.getNumSkipped() ) );
+
+        testSuite.setAttribute( "failures", String.valueOf( this.getNumFailures() ) );
+
+        for ( Iterator i = results.iterator(); i.hasNext(); )
+        {
+            Xpp3Dom testcase = (Xpp3Dom) i.next();
+            testSuite.addChild( testcase );
+        }
+
+        File reportFile = new File( reportsDirectory, "TEST-" + report.getName() + ".xml" );
+
+        File reportDir = reportFile.getParentFile();
+
+        reportDir.mkdirs();
+
+        PrintWriter writer = null;
+
+        try
+        {
+            writer = new PrintWriter(
+                new BufferedWriter( new OutputStreamWriter( new FileOutputStream( reportFile ), "UTF-8" ) ) );
+
+            writer.write( "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + LS );
+
+            Xpp3DomWriter.write( new PrettyPrintXMLWriter( writer ), testSuite );
+        }
+        catch ( UnsupportedEncodingException e )
+        {
+            throw new ReporterException( "Unable to use UTF-8 encoding", e );
+        }
+        catch ( FileNotFoundException e )
+        {
+            throw new ReporterException( "Unable to create file: " + e.getMessage(), e );
+        }
+
+        finally
+        {
+            IOUtil.close( writer );
+        }
+    }
+
+    private String getReportName( ReportEntry report )
+    {
+        String reportName;
+
+        if ( report.getName().indexOf( "(" ) > 0 )
+        {
+            reportName = report.getName().substring( 0, report.getName().indexOf( "(" ) );
+        }
+        else
+        {
+            reportName = report.getName();
+        }
+        return reportName;
+    }
+
+    public void testSucceeded( ReportEntry report )
+    {
+        super.testSucceeded( report );
+
+        long runTime = this.endTime - this.startTime;
+
+        Xpp3Dom testCase = createTestElement( "testcase", report, runTime );
+
+        results.add( testCase );
+    }
+
+    private Xpp3Dom createTestElement( String name, ReportEntry report, long runTime )
+    {
+        Xpp3Dom testCase = new Xpp3Dom( name );
+        testCase.setAttribute( "name", getReportName( report ) );
+        if ( report.getGroup() != null )
+        {
+            testCase.setAttribute( "group", report.getGroup() );
+        }
+        testCase.setAttribute( "time", elapsedTimeAsString( runTime ) );
+        return testCase;
+    }
+
+    public void testError( ReportEntry report, String stdOut, String stdErr )
+    {
+        super.testError( report, stdOut, stdErr );
+
+        writeTestProblems( report, stdOut, stdErr, "error" );
+    }
+
+    public void testFailed( ReportEntry report, String stdOut, String stdErr )
+    {
+        super.testFailed( report, stdOut, stdErr );
+
+        writeTestProblems( report, stdOut, stdErr, "failure" );
+    }
+
+    private void writeTestProblems( ReportEntry report, String stdOut, String stdErr, String name )
+    {
+        long runTime = endTime - startTime;
+
+        Xpp3Dom testCase = createTestElement( "testcase", report, runTime );
+
+        Xpp3Dom element = createElement( testCase, name );
+
+        String stackTrace = getStackTrace( report );
+
+        Throwable t = report.getStackTraceWriter().getThrowable();
+
+        if ( t != null )
+        {
+
+            String message = t.getMessage();
+
+            if ( message != null && message.trim().length() > 0 )
+            {
+                element.setAttribute( "message", escapeAttribute( message ) );
+
+                element.setAttribute( "type", ( stackTrace.indexOf( ":" ) > -1 ? stackTrace.substring( 0,
+                                                                                                       stackTrace.indexOf(
+                                                                                                           ":" ) )
+                    : stackTrace ) );
+            }
+            else
+            {
+                element.setAttribute( "type", new StringTokenizer( stackTrace ).nextToken() );
+            }
+        }
+
+        element.setValue( stackTrace );
+
+        addOutputStreamElement( stdOut, "system-out", testCase );
+
+        addOutputStreamElement( stdErr, "system-err", testCase );
+
+        results.add( testCase );
+    }
+
+    private void addOutputStreamElement( String stdOut, String name, Xpp3Dom testCase )
+    {
+        if ( stdOut != null && stdOut.trim().length() > 0 )
+        {
+            createElement( testCase, name ).setValue( stdOut );
+        }
+    }
+
+    private Xpp3Dom createElement( Xpp3Dom element, String name )
+    {
+        Xpp3Dom component = new Xpp3Dom( name );
+
+        element.addChild( component );
+
+        return component;
+    }
+
+    /**
+     * Adds system properties to the XML report.
+     *
+     * @param testSuite
+     */
+    private void showProperties( Xpp3Dom testSuite )
+    {
+        Xpp3Dom properties = createElement( testSuite, "properties" );
+
+        Properties systemProperties = System.getProperties();
+
+        if ( systemProperties != null )
+        {
+            Enumeration propertyKeys = systemProperties.propertyNames();
+
+            while ( propertyKeys.hasMoreElements() )
+            {
+                String key = (String) propertyKeys.nextElement();
+
+                String value = systemProperties.getProperty( key );
+
+                if ( value == null )
+                {
+                    value = "null";
+                }
+
+                Xpp3Dom property = createElement( properties, "property" );
+
+                property.setAttribute( "name", key );
+
+                property.setAttribute( "value", escapeAttribute( value ) );
+
+            }
+        }
+    }
+
+    private static String escapeAttribute( String attribute )
+    {
+        // Shouldn't Xpp3Dom do this itself?
+        String s = StringUtils.replace( attribute, "<", "&lt;" );
+        s = StringUtils.replace( s, ">", "&gt;" );
+        return s;
+
+    }
+
+    public Iterator getResults()
+    {
+        return results.iterator();
+    }
+
+    public void reset()
+    {
+        results.clear();
+        super.reset();
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/AbstractDirectoryTestSuite.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/AbstractDirectoryTestSuite.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/AbstractDirectoryTestSuite.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,218 @@
+package org.apache.maven.surefire.suite;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.Surefire;
+import org.apache.maven.surefire.report.ReportEntry;
+import org.apache.maven.surefire.report.ReporterException;
+import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.testset.SurefireTestSet;
+import org.apache.maven.surefire.testset.TestSetFailedException;
+import org.codehaus.plexus.util.DirectoryScanner;
+import org.codehaus.plexus.util.StringUtils;
+
+import java.io.File;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+public abstract class AbstractDirectoryTestSuite
+    implements SurefireTestSuite
+{
+    protected ResourceBundle bundle = ResourceBundle.getBundle( Surefire.SUREFIRE_BUNDLE_NAME );
+
+    private static final String FS = System.getProperty( "file.separator" );
+
+    private File basedir;
+
+    private List includes;
+
+    private List excludes;
+
+    protected Map testSets;
+
+    private int totalTests;
+
+    private static final String[] EMPTY_STRING_ARRAY = new String[0];
+
+    protected AbstractDirectoryTestSuite( File basedir, List includes, List excludes )
+    {
+        this.basedir = basedir;
+
+        this.includes = new ArrayList( includes );
+
+        this.excludes = new ArrayList( excludes );
+    }
+
+    public Map locateTestSets( ClassLoader classLoader )
+        throws TestSetFailedException
+    {
+        if ( testSets != null )
+        {
+            throw new IllegalStateException( "You can't call locateTestSets twice" );
+        }
+        testSets = new HashMap();
+
+        String[] tests = collectTests( basedir, includes, excludes );
+
+        for ( int i = 0; i < tests.length; i++ )
+        {
+            String className = tests[i];
+
+            Class testClass;
+            try
+            {
+                testClass = classLoader.loadClass( className );
+            }
+            catch ( ClassNotFoundException e )
+            {
+                throw new TestSetFailedException( "Unable to create test class '" + className + "'", e );
+            }
+
+            if ( !Modifier.isAbstract( testClass.getModifiers() ) )
+            {
+                SurefireTestSet testSet = createTestSet( testClass, classLoader );
+
+                if ( testSets.containsKey( testSet.getName() ) )
+                {
+                    throw new TestSetFailedException( "Duplicate test set '" + testSet.getName() + "'" );
+                }
+                testSets.put( testSet.getName(), testSet );
+
+                totalTests += testSet.getTestCount();
+            }
+        }
+
+        return Collections.unmodifiableMap( testSets );
+    }
+
+    protected abstract SurefireTestSet createTestSet( Class testClass, ClassLoader classLoader )
+        throws TestSetFailedException;
+
+    public void execute( ReporterManager reporterManager, ClassLoader classLoader )
+        throws ReporterException, TestSetFailedException
+    {
+        if ( testSets == null )
+        {
+            throw new IllegalStateException( "You must call locateTestSets before calling execute" );
+        }
+        for ( Iterator i = testSets.values().iterator(); i.hasNext(); )
+        {
+            SurefireTestSet testSet = (SurefireTestSet) i.next();
+
+            executeTestSet( testSet, reporterManager, classLoader );
+        }
+    }
+
+    private void executeTestSet( SurefireTestSet testSet, ReporterManager reporterManager, ClassLoader classLoader )
+        throws ReporterException, TestSetFailedException
+    {
+        String rawString = bundle.getString( "testSetStarting" );
+
+        ReportEntry report = new ReportEntry( this, testSet.getName(), rawString );
+
+        reporterManager.testSetStarting( report );
+
+        testSet.execute( reporterManager, classLoader );
+
+        rawString = bundle.getString( "testSetCompletedNormally" );
+
+        report = new ReportEntry( this, testSet.getName(), rawString );
+
+        reporterManager.testSetCompleted( report );
+
+        reporterManager.reset();
+    }
+
+    public void execute( String testSetName, ReporterManager reporterManager, ClassLoader classLoader )
+        throws ReporterException, TestSetFailedException
+    {
+        if ( testSets == null )
+        {
+            throw new IllegalStateException( "You must call locateTestSets before calling execute" );
+        }
+        SurefireTestSet testSet = (SurefireTestSet) testSets.get( testSetName );
+
+        if ( testSet == null )
+        {
+            throw new TestSetFailedException( "Unable to find test set '" + testSetName + "' in suite" );
+        }
+
+        executeTestSet( testSet, reporterManager, classLoader );
+    }
+
+    public int getNumTests()
+    {
+        if ( testSets == null )
+        {
+            throw new IllegalStateException( "You must call locateTestSets before calling getNumTests" );
+        }
+        return totalTests;
+    }
+
+    private String[] collectTests( File basedir, List includes, List excludes )
+    {
+        String[] tests = EMPTY_STRING_ARRAY;
+        if ( basedir.exists() )
+        {
+            DirectoryScanner scanner = new DirectoryScanner();
+
+            scanner.setBasedir( basedir );
+
+            if ( includes != null )
+            {
+                scanner.setIncludes( processIncludesExcludes( includes ) );
+            }
+
+            if ( excludes != null )
+            {
+                scanner.setExcludes( processIncludesExcludes( excludes ) );
+            }
+
+            scanner.scan();
+
+            tests = scanner.getIncludedFiles();
+            for ( int i = 0; i < tests.length; i++ )
+            {
+                String test = tests[i];
+                test = test.substring( 0, test.indexOf( "." ) );
+                tests[i] = test.replace( FS.charAt( 0 ), '.' );
+            }
+        }
+        return tests;
+    }
+
+    private static String[] processIncludesExcludes( List list )
+    {
+        String[] incs = new String[list.size()];
+
+        for ( int i = 0; i < incs.length; i++ )
+        {
+            incs[i] = StringUtils.replace( (String) list.get( i ), "java", "class" );
+
+        }
+        return incs;
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/SurefireTestSuite.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/SurefireTestSuite.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/SurefireTestSuite.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,45 @@
+package org.apache.maven.surefire.suite;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.ReporterException;
+import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.testset.TestSetFailedException;
+
+import java.util.Map;
+
+/**
+ * A complete test suite that contains one or more test sets.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ */
+public interface SurefireTestSuite
+{
+    void execute( ReporterManager reporterManager, ClassLoader classLoader )
+        throws ReporterException, TestSetFailedException;
+
+    void execute( String testSetName, ReporterManager reporterManager, ClassLoader classLoader )
+        throws ReporterException, TestSetFailedException;
+
+    int getNumTests();
+
+    Map locateTestSets( ClassLoader classLoader )
+        throws TestSetFailedException;
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/AbstractTestSet.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/AbstractTestSet.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/AbstractTestSet.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,49 @@
+package org.apache.maven.surefire.testset;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Base test class.
+ */
+public abstract class AbstractTestSet
+    implements SurefireTestSet
+{
+    private Class testClass;
+
+    protected AbstractTestSet( Class testClass )
+    {
+        if ( testClass == null )
+        {
+            throw new NullPointerException( "testClass is null" );
+        }
+
+        this.testClass = testClass;
+    }
+
+    public String getName()
+    {
+        return testClass.getName();
+    }
+
+    public Class getTestClass()
+    {
+        return testClass;
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/PojoTestSet.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/PojoTestSet.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/PojoTestSet.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,299 @@
+package org.apache.maven.surefire.testset;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.Surefire;
+import org.apache.maven.surefire.report.PojoStackTraceWriter;
+import org.apache.maven.surefire.report.ReportEntry;
+import org.apache.maven.surefire.report.ReporterManager;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ResourceBundle;
+
+public class PojoTestSet
+    extends AbstractTestSet
+{
+    private ResourceBundle bundle = ResourceBundle.getBundle( Surefire.SUREFIRE_BUNDLE_NAME );
+
+    private static final String TEST_METHOD_PREFIX = "test";
+
+    private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
+
+    private Object testObject;
+
+    protected List testMethods;
+
+    public PojoTestSet( Class testClass )
+        throws TestSetFailedException
+    {
+        super( testClass );
+
+        try
+        {
+            testObject = testClass.newInstance();
+        }
+        catch ( InstantiationException e )
+        {
+            throw new TestSetFailedException( "Unable to instantiate POJO '" + testClass + "'", e );
+        }
+        catch ( IllegalAccessException e )
+        {
+            throw new TestSetFailedException( "Unable to instantiate POJO '" + testClass + "'", e );
+        }
+    }
+
+    public void execute( ReporterManager reportManager, ClassLoader loader )
+        throws TestSetFailedException
+    {
+        if ( reportManager == null )
+        {
+            throw new NullPointerException( "reportManager is null" );
+        }
+
+        executeTestMethods( reportManager );
+    }
+
+    protected void executeTestMethods( ReporterManager reportManager )
+    {
+        if ( reportManager == null )
+        {
+            throw new NullPointerException( "reportManager is null" );
+        }
+
+        if ( testMethods == null )
+        {
+            discoverTestMethods();
+        }
+
+        boolean abort = false;
+
+        for ( int i = 0; i < testMethods.size() && !abort; ++i )
+        {
+            abort = executeTestMethod( (Method) testMethods.get( i ), EMPTY_OBJECT_ARRAY, reportManager );
+        }
+    }
+
+    /**
+     * @noinspection CatchGenericClass,OverlyBroadCatchBlock,MethodWithMultipleReturnPoints
+     */
+    protected boolean executeTestMethod( Method method, Object[] args, ReporterManager reportManager )
+    {
+        if ( method == null || args == null || reportManager == null )
+        {
+            throw new NullPointerException();
+        }
+
+        String userFriendlyMethodName = method.getName() + '(';
+
+        if ( args.length != 0 )
+        {
+            userFriendlyMethodName += "Reporter";
+        }
+
+        userFriendlyMethodName += ')';
+
+        ReportEntry report = new ReportEntry( testObject, getTestName( userFriendlyMethodName ), getName() );
+
+        reportManager.testStarting( report );
+
+        try
+        {
+            setUpFixture();
+        }
+        catch ( Exception e )
+        {
+            // Treat any exception from setUpFixture as a failure of the test.
+            String rawString = bundle.getString( "setupFixtureFailed" );
+
+            MessageFormat msgFmt = new MessageFormat( rawString );
+
+            Object[] stringArgs = {method.getName()};
+
+            String stringToPrint = msgFmt.format( stringArgs );
+
+            report = new ReportEntry( testObject, getTestName( userFriendlyMethodName ), stringToPrint,
+                                      new PojoStackTraceWriter( testObject.getClass().getName(), method.getName(),
+                                                                e ) );
+
+            reportManager.testFailed( report );
+
+            // A return value of true indicates to this class's executeTestMethods
+            // method that it should abort and not attempt to execute
+            // any other test methods. The other caller of this method,
+            // TestRerunner.rerun, ignores this return value, because it is
+            // only running one test.
+            return true;
+        }
+
+        // Make sure that tearDownFixture
+        try
+        {
+            method.invoke( testObject, args );
+
+            report = new ReportEntry( testObject, getTestName( userFriendlyMethodName ), getName() );
+
+            reportManager.testSucceeded( report );
+        }
+        catch ( InvocationTargetException ite )
+        {
+            Throwable t = ite.getTargetException();
+
+            String msg = t.getMessage();
+
+            if ( msg == null )
+            {
+                msg = t.toString();
+            }
+
+            report = new ReportEntry( testObject, getTestName( userFriendlyMethodName ), msg, new PojoStackTraceWriter(
+                testObject.getClass().getName(), method.getName(), t ) );
+
+            reportManager.testFailed( report );
+            // Don't return  here, because tearDownFixture should be called even
+            // if the test method throws an exception.
+        }
+        catch ( Throwable t )
+        {
+            String msg = t.getMessage();
+
+            if ( msg == null )
+            {
+                msg = t.toString();
+            }
+
+            report = new ReportEntry( testObject, getTestName( userFriendlyMethodName ), msg, new PojoStackTraceWriter(
+                testObject.getClass().getName(), method.getName(), t ) );
+
+            reportManager.testFailed( report );
+            // Don't return  here, because tearDownFixture should be called even
+            // if the test method throws an exception.
+        }
+
+        try
+        {
+            tearDownFixture();
+        }
+        catch ( Throwable t )
+        {
+            // Treat any exception from tearDownFixture as a failure of the test.
+            String rawString = bundle.getString( "cleanupFixtureFailed" );
+
+            MessageFormat msgFmt = new MessageFormat( rawString );
+
+            Object[] stringArgs = {method.getName()};
+
+            String stringToPrint = msgFmt.format( stringArgs );
+
+            report = new ReportEntry( testObject, getTestName( userFriendlyMethodName ), stringToPrint,
+                                      new PojoStackTraceWriter( testObject.getClass().getName(), method.getName(),
+                                                                t ) );
+
+            reportManager.testFailed( report );
+
+            // A return value of true indicates to this class's executeTestMethods
+            // method that it should abort and not attempt to execute
+            // any other test methods. The other caller of this method,
+            // TestRerunner.rerun, ignores this return value, because it is
+            // only running one test.
+            return true;
+        }
+
+        // A return value of false indicates to this class's executeTestMethods
+        // method that it should keep plowing ahead and invoke more test methods.
+        // The other caller of this method,
+        // TestRerunner.rerun, ignores this return value, because it is
+        // only running one test.
+        return false;
+    }
+
+    public String getTestName( String testMethodName )
+    {
+        if ( testMethodName == null )
+        {
+            throw new NullPointerException( "testMethodName is null" );
+        }
+
+        return getTestClass().getName() + "." + testMethodName;
+    }
+
+    public void setUpFixture()
+    {
+    }
+
+    public void tearDownFixture()
+    {
+    }
+
+    public int getTestCount()
+        throws TestSetFailedException
+    {
+        discoverTestMethods();
+
+        return testMethods.size();
+    }
+
+    private void discoverTestMethods()
+    {
+        if ( testMethods == null )
+        {
+            testMethods = new ArrayList();
+
+            Method[] methods = getTestClass().getMethods();
+
+            for ( int i = 0; i < methods.length; ++i )
+            {
+                Method m = methods[i];
+
+                if ( isValidTestMethod( m ) )
+                {
+                    String simpleName = m.getName();
+
+                    // name must have 5 or more chars
+                    if ( simpleName.length() > 4 )
+                    {
+                        String firstFour = simpleName.substring( 0, 4 );
+
+                        // name must start with "test"
+                        if ( firstFour.equals( TEST_METHOD_PREFIX ) )
+                        {
+                            testMethods.add( m );
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    private static boolean isValidTestMethod( Method m )
+    {
+        boolean isInstanceMethod = !Modifier.isStatic( m.getModifiers() );
+
+        boolean returnsVoid = m.getReturnType().equals( void.class );
+
+        boolean hasNoParams = m.getParameterTypes().length == 0;
+
+        return isInstanceMethod && returnsVoid && hasNoParams;
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/SurefireTestSet.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/SurefireTestSet.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/SurefireTestSet.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,35 @@
+package org.apache.maven.surefire.testset;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.ReporterManager;
+
+public interface SurefireTestSet
+{
+    void execute( ReporterManager reportManager, ClassLoader loader )
+        throws TestSetFailedException;
+
+    int getTestCount()
+        throws TestSetFailedException;
+
+    String getName();
+
+    Class getTestClass();
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/TestSetFailedException.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/TestSetFailedException.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/TestSetFailedException.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,77 @@
+package org.apache.maven.surefire.testset;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.util.NestedCheckedException;
+
+/**
+ * Exception that indicates a test failed.
+ *
+ * @author Bill Venners
+ */
+public class TestSetFailedException
+    extends NestedCheckedException
+{
+    /**
+     * Create a <code>TestFailedException</code> with no detail message.
+     */
+    public TestSetFailedException()
+    {
+    }
+
+    /**
+     * Create a <code>TestFailedException</code> with a detail message.
+     *
+     * @param message A detail message for this <code>TestFailedException</code>, or
+     *                <code>null</code>. If <code>null</code> is passed, the <code>getMessage</code>
+     *                method will return an empty <code>String</code>.
+     */
+    public TestSetFailedException( String message )
+    {
+        super( message );
+    }
+
+    /**
+     * Create a <code>TestFailedException</code> with the specified detail
+     * message and cause.
+     * <p/>
+     * <p>Note that the detail message associated with cause is
+     * <em>not</em> automatically incorporated in this throwable's detail
+     * message.
+     *
+     * @param message A detail message for this <code>TestFailedException</code>, or <code>null</code>.
+     * @param cause   the cause, which is saved for later retrieval by the <code>getCause</code> method.
+     *                (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
+     */
+    public TestSetFailedException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+
+    /**
+     * Create a <code>TestFailedException</code> with the specified cause.  The
+     * <code>getMessage</code> method of this exception object will return
+     * <code>(cause == null ? "" : cause.toString())</code>.
+     */
+    public TestSetFailedException( Throwable cause )
+    {
+        super( cause == null ? "" : cause.toString(), cause );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedCheckedException.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedCheckedException.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedCheckedException.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,223 @@
+package org.apache.maven.surefire.util;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*
+ * Copyright 2002-2005 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+/**
+ * <p>Copied from Spring framework to keep Java 1.3 compatability.</p>
+ * <p/>
+ * <p>Handy class for wrapping checked Exceptions with a root cause.</p>
+ * <p/>
+ * <p>This time-honored technique is no longer necessary in Java 1.4, which
+ * finally provides built-in support for exception nesting. Thus exceptions in
+ * applications written to use Java 1.4 need not extend this class. To ease
+ * migration, this class mirrors Java 1.4's nested exceptions as closely as possible.
+ * <p/>
+ * <p>Abstract to force the programmer to extend the class. <code>getMessage</code>
+ * will include nested exception information; <code>printStackTrace</code> etc will
+ * delegate to the wrapped exception, if any.
+ * <p/>
+ * <p>The similarity between this class and the NestedRuntimeException class is
+ * unavoidable, as Java forces these two classes to have different superclasses
+ * (ah, the inflexibility of concrete inheritance!).
+ * <p/>
+ * <p>As discussed in
+ * <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/">Expert One-On-One J2EE Design and Development</a>,
+ * runtime exceptions are often a better alternative to checked exceptions.
+ * However, all exceptions should preserve their stack trace, if caused by a
+ * lower-level exception.
+ *
+ * @author Rod Johnson
+ * @author Juergen Hoeller
+ * @see #getMessage
+ * @see #printStackTrace
+ * @see NestedRuntimeException
+ */
+public class NestedCheckedException
+    extends Exception
+{
+
+    /**
+     * Root cause of this nested exception
+     */
+    private Throwable cause;
+
+    /**
+     * Construct a <code>NestedCheckedException</code> with no message or exception
+     */
+    public NestedCheckedException()
+    {
+        super();
+    }
+
+    /**
+     * Construct a <code>NestedCheckedException</code> with the specified detail message.
+     *
+     * @param msg the detail message
+     */
+    public NestedCheckedException( String msg )
+    {
+        super( msg );
+    }
+
+    /**
+     * Construct a <code>NestedCheckedException</code> with the specified detail message
+     * and nested exception.
+     *
+     * @param msg the detail message
+     * @param ex  the nested exception
+     */
+    public NestedCheckedException( String msg, Throwable ex )
+    {
+        super( msg );
+        this.cause = ex;
+    }
+
+    /**
+     * Construct a <code>NestedCheckedException</code> with the specified nested exception.
+     *
+     * @param ex the nested exception
+     */
+    public NestedCheckedException( Throwable ex )
+    {
+        super();
+        this.cause = ex;
+    }
+
+    /**
+     * Return the nested cause, or <code>null</code> if none.
+     */
+    public Throwable getCause()
+    {
+        // Even if you cannot set the cause of this exception other than through
+        // the constructor, we check for the cause being "this" here, as the cause
+        // could still be set to "this" via reflection: for example, by a remoting
+        // deserializer like Hessian's.
+        return ( this.cause == this ? null : this.cause );
+    }
+
+    /**
+     * Return the detail message, including the message from the nested exception
+     * if there is one.
+     */
+    public String getMessage()
+    {
+        if ( getCause() == null )
+        {
+            return super.getMessage();
+        }
+        else
+        {
+            return super.getMessage() + "; nested exception is " + getCause().getClass().getName() + ": " +
+                getCause().getMessage();
+        }
+    }
+
+    /**
+     * Print the composite message and the embedded stack trace to the specified stream.
+     *
+     * @param ps the print stream
+     */
+    public void printStackTrace( PrintStream ps )
+    {
+        if ( getCause() == null )
+        {
+            super.printStackTrace( ps );
+        }
+        else
+        {
+            ps.println( this );
+            getCause().printStackTrace( ps );
+        }
+    }
+
+    /**
+     * Print the composite message and the embedded stack trace to the specified print writer.
+     *
+     * @param pw the print writer
+     */
+    public void printStackTrace( PrintWriter pw )
+    {
+        if ( getCause() == null )
+        {
+            super.printStackTrace( pw );
+        }
+        else
+        {
+            pw.println( this );
+            getCause().printStackTrace( pw );
+        }
+    }
+
+    /**
+     * Check whether this exception contains an exception of the given class:
+     * either it is of the given class itself or it contains a nested cause
+     * of the given class.
+     * <p>Currently just traverses NestedCheckedException causes. Will use
+     * the JDK 1.4 exception cause mechanism once Spring requires JDK 1.4.
+     *
+     * @param exClass the exception class to look for
+     */
+    public boolean contains( Class exClass )
+    {
+        if ( exClass == null )
+        {
+            return false;
+        }
+        Throwable ex = this;
+        while ( ex != null )
+        {
+            if ( exClass.isInstance( ex ) )
+            {
+                return true;
+            }
+            if ( ex instanceof NestedCheckedException )
+            {
+                // Cast is necessary on JDK 1.3, where Throwable does not
+                // provide a "getCause" method itself.
+                ex = ( (NestedCheckedException) ex ).getCause();
+            }
+            else
+            {
+                ex = null;
+            }
+        }
+        return false;
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedRuntimeException.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedRuntimeException.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedRuntimeException.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,241 @@
+package org.apache.maven.surefire.util;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*
+ * Copyright 2002-2005 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+/**
+ * <p>Copied from Spring framework to keep Java 1.3 compatability.</p>
+ * <p/>
+ * <p>Handy class for wrapping runtime Exceptions with a root cause.</p>
+ * <p/>
+ * <p>This time-honoured technique is no longer necessary in Java 1.4, which
+ * finally provides built-in support for exception nesting. Thus exceptions in
+ * applications written to use Java 1.4 need not extend this class. To ease
+ * migration, this class mirrors Java 1.4's nested exceptions as closely as possible.
+ * <p/>
+ * <p>Abstract to force the programmer to extend the class. <code>getMessage</code>
+ * will include nested exception information; <code>printStackTrace</code> etc will
+ * delegate to the wrapped exception, if any.
+ * <p/>
+ * <p>The similarity between this class and the NestedCheckedException class is
+ * unavoidable, as Java forces these two classes to have different superclasses
+ * (ah, the inflexibility of concrete inheritance!).
+ * <p/>
+ * <p>As discussed in
+ * <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/">Expert One-On-One J2EE Design and Development</a>,
+ * runtime exceptions are often a better alternative to checked exceptions.
+ * However, all exceptions should preserve their stack trace, if caused by a
+ * lower-level exception.
+ *
+ * @author Rod Johnson
+ * @author Juergen Hoeller
+ * @see #getMessage
+ * @see #printStackTrace
+ * @see NestedCheckedException
+ */
+public class NestedRuntimeException
+    extends RuntimeException
+{
+
+    /**
+     * Root cause of this nested exception
+     */
+    private Throwable cause;
+
+    /**
+     * Construct a <code>NestedRuntimeException</code> with no message or exception
+     */
+    public NestedRuntimeException()
+    {
+        super();
+    }
+
+    /**
+     * Construct a <code>NestedRuntimeException</code> with the specified detail message.
+     *
+     * @param msg the detail message
+     */
+    public NestedRuntimeException( String msg )
+    {
+        super( msg );
+    }
+
+    /**
+     * Construct a <code>NestedRuntimeException</code> with the specified detail message
+     * and nested exception.
+     *
+     * @param msg the detail message
+     * @param ex  the nested exception
+     */
+    public NestedRuntimeException( String msg, Throwable ex )
+    {
+        super( msg );
+        this.cause = ex;
+    }
+
+    /**
+     * Construct a <code>NestedRuntimeException</code> with the specified nested exception.
+     *
+     * @param ex the nested exception
+     */
+    public NestedRuntimeException( Throwable ex )
+    {
+        super();
+        this.cause = ex;
+    }
+
+    /**
+     * Return the nested cause, or <code>null</code> if none.
+     * <p>Note that this will only check one level of nesting.
+     * Use <code>getRootCause()</code> to retrieve the innermost cause.
+     *
+     * @see #getRootCause()
+     */
+    public Throwable getCause()
+    {
+        // Even if you cannot set the cause of this exception other than through
+        // the constructor, we check for the cause being "this" here, as the cause
+        // could still be set to "this" via reflection: for example, by a remoting
+        // deserializer like Hessian's.
+        return ( this.cause == this ? null : this.cause );
+    }
+
+    /**
+     * Return the detail message, including the message from the nested exception
+     * if there is one.
+     */
+    public String getMessage()
+    {
+        if ( getCause() == null )
+        {
+            return super.getMessage();
+        }
+        else
+        {
+            return super.getMessage() + "; nested exception is " + getCause().getClass().getName() + ": " +
+                getCause().getMessage();
+        }
+    }
+
+    /**
+     * Print the composite message and the embedded stack trace to the specified stream.
+     *
+     * @param ps the print stream
+     */
+    public void printStackTrace( PrintStream ps )
+    {
+        if ( getCause() == null )
+        {
+            super.printStackTrace( ps );
+        }
+        else
+        {
+            ps.println( this );
+            getCause().printStackTrace( ps );
+        }
+    }
+
+    /**
+     * Print the composite message and the embedded stack trace to the specified writer.
+     *
+     * @param pw the print writer
+     */
+    public void printStackTrace( PrintWriter pw )
+    {
+        if ( getCause() == null )
+        {
+            super.printStackTrace( pw );
+        }
+        else
+        {
+            pw.println( this );
+            getCause().printStackTrace( pw );
+        }
+    }
+
+    /**
+     * Retrieve the innermost cause of this exception, if any.
+     * <p>Currently just traverses NestedRuntimeException causes. Will use
+     * the JDK 1.4 exception cause mechanism once Spring requires JDK 1.4.
+     *
+     * @return the innermost exception, or <code>null</code> if none
+     */
+    public Throwable getRootCause()
+    {
+        Throwable cause = getCause();
+        if ( cause instanceof NestedRuntimeException )
+        {
+            return ( (NestedRuntimeException) cause ).getRootCause();
+        }
+        else
+        {
+            return cause;
+        }
+    }
+
+    /**
+     * Check whether this exception contains an exception of the given class:
+     * either it is of the given class itself or it contains a nested cause
+     * of the given class.
+     * <p>Currently just traverses NestedRuntimeException causes. Will use
+     * the JDK 1.4 exception cause mechanism once Spring requires JDK 1.4.
+     *
+     * @param exClass the exception class to look for
+     */
+    public boolean contains( Class exClass )
+    {
+        if ( exClass == null )
+        {
+            return false;
+        }
+        if ( exClass.isInstance( this ) )
+        {
+            return true;
+        }
+        Throwable cause = getCause();
+        if ( cause instanceof NestedRuntimeException )
+        {
+            return ( (NestedRuntimeException) cause ).contains( exClass );
+        }
+        else
+        {
+            return ( cause != null && exClass.isInstance( cause ) );
+        }
+    }
+
+}
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/PrettyPrintXMLWriter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/PrettyPrintXMLWriter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/PrettyPrintXMLWriter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,253 @@
+package org.apache.maven.surefire.util;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.xml.XMLWriter;
+
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.util.LinkedList;
+
+public class PrettyPrintXMLWriter
+    implements XMLWriter
+{
+    private PrintWriter writer;
+
+    private LinkedList elementStack = new LinkedList();
+
+    private boolean tagInProgress;
+
+    private int depth;
+
+    private String lineIndenter;
+
+    private String encoding;
+
+    private String docType;
+
+    private boolean readyForNewLine;
+
+    private boolean tagIsEmpty;
+
+    public PrettyPrintXMLWriter( PrintWriter writer, String lineIndenter )
+    {
+        this( writer, lineIndenter, null, null );
+    }
+
+    public PrettyPrintXMLWriter( Writer writer, String lineIndenter )
+    {
+        this( new PrintWriter( writer ), lineIndenter );
+    }
+
+    public PrettyPrintXMLWriter( PrintWriter writer )
+    {
+        this( writer, null, null );
+    }
+
+    public PrettyPrintXMLWriter( Writer writer )
+    {
+        this( new PrintWriter( writer ) );
+    }
+
+    public PrettyPrintXMLWriter( PrintWriter writer, String lineIndenter, String encoding, String doctype )
+    {
+        this.writer = writer;
+
+        this.lineIndenter = lineIndenter;
+
+        this.encoding = encoding;
+
+        this.docType = doctype;
+
+        if ( docType != null || encoding != null )
+        {
+            writeDocumentHeaders();
+        }
+    }
+
+    public PrettyPrintXMLWriter( Writer writer, String lineIndenter, String encoding, String doctype )
+    {
+        this( new PrintWriter( writer ), lineIndenter, encoding, doctype );
+    }
+
+    public PrettyPrintXMLWriter( PrintWriter writer, String encoding, String doctype )
+    {
+        this( writer, "  ", encoding, doctype );
+    }
+
+    public PrettyPrintXMLWriter( Writer writer, String encoding, String doctype )
+    {
+        this( new PrintWriter( writer ), encoding, doctype );
+    }
+
+    public void startElement( String name )
+    {
+        tagIsEmpty = false;
+
+        finishTag();
+
+        write( "<" );
+
+        write( name );
+
+        elementStack.addLast( name );
+
+        tagInProgress = true;
+
+        depth++;
+
+        readyForNewLine = true;
+
+        tagIsEmpty = true;
+    }
+
+    public void writeText( String text )
+    {
+        writeText( text, true );
+    }
+
+    public void writeMarkup( String text )
+    {
+        writeText( text, false );
+    }
+
+    private void writeText( String text, boolean escapeXml )
+    {
+        readyForNewLine = false;
+
+        tagIsEmpty = false;
+
+        finishTag();
+
+        if ( escapeXml )
+        {
+            text = escapeXml( text );
+        }
+
+        write( text );
+    }
+
+    private static String escapeXml( String text )
+    {
+        text = StringUtils.replace( text, "&", "&amp;" );
+        text = StringUtils.replace( text, "<", "&amp;" );
+        text = StringUtils.replace( text, ">", "&amp;" );
+        text = StringUtils.replace( text, "\"", "&quot;" );
+        text = StringUtils.replace( text, "\'", "&apos;" );
+
+        return text;
+    }
+
+    public void addAttribute( String key, String value )
+    {
+        write( " " );
+
+        write( key );
+
+        write( "=\"" );
+
+        write( escapeXml( value ) );
+
+        write( "\"" );
+    }
+
+    public void endElement()
+    {
+        depth--;
+
+        if ( tagIsEmpty )
+        {
+            write( "/" );
+
+            readyForNewLine = false;
+
+            finishTag();
+
+            elementStack.removeLast();
+        }
+        else
+        {
+            finishTag();
+
+            write( "</" + elementStack.removeLast() + ">" );
+        }
+
+        readyForNewLine = true;
+    }
+
+    private void write( String str )
+    {
+        writer.write( str );
+    }
+
+    private void finishTag()
+    {
+        if ( tagInProgress )
+        {
+            write( ">" );
+        }
+
+        tagInProgress = false;
+
+        if ( readyForNewLine )
+        {
+            endOfLine();
+        }
+        readyForNewLine = false;
+
+        tagIsEmpty = false;
+    }
+
+    protected void endOfLine()
+    {
+        write( "\n" );
+
+        for ( int i = 0; i < depth; i++ )
+        {
+            write( lineIndenter );
+        }
+    }
+
+    private void writeDocumentHeaders()
+    {
+        write( "<?xml version=\"1.0\"" );
+
+        if ( encoding != null )
+        {
+            write( " encoding=\"" + encoding + "\"" );
+        }
+
+        write( "?>" );
+
+        endOfLine();
+
+        if ( docType != null )
+        {
+            write( "<!DOCTYPE " );
+
+            write( docType );
+
+            write( ">" );
+
+            endOfLine();
+        }
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TeeStream.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TeeStream.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TeeStream.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,61 @@
+package org.apache.maven.surefire.util;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.PrintStream;
+
+/**
+ * @author <a href="mailto:jason at maven.org">Jason van Zyl</a>
+ * @version $Id$
+ */
+public class TeeStream
+    extends PrintStream
+{
+    private PrintStream tee;
+
+    public TeeStream( PrintStream out1, PrintStream out2 )
+    {
+        super( out1 );
+
+        this.tee = out2;
+    }
+
+    public void write( byte[] buf, int off, int len )
+    {
+        super.write( buf, off, len );
+
+        tee.write( buf, off, len );
+    }
+
+    public void close()
+    {
+        super.close();
+
+        tee.close();
+    }
+
+    public void flush()
+    {
+        super.flush();
+
+        tee.flush();
+    }
+}
+

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/UrlUtils.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/UrlUtils.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/UrlUtils.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,94 @@
+package org.apache.maven.surefire.util;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.BitSet;
+
+/**
+ * Utility for dealing with URLs in pre-JDK 1.4.
+ */
+public class UrlUtils
+{
+    private static final BitSet UNRESERVED = new BitSet( Byte.MAX_VALUE - Byte.MIN_VALUE + 1 );
+
+    private static final int RADIX = 16;
+
+    private static final int MASK = 0xf;
+
+    private UrlUtils()
+    {
+    }
+
+    private static final String ENCODING = "US-ASCII";
+
+    static
+    {
+        try
+        {
+            byte[] bytes =
+                "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.!~*'():/".getBytes( ENCODING );
+            for ( int i = 0; i < bytes.length; i++ )
+            {
+                UNRESERVED.set( bytes[i] );
+            }
+        }
+        catch ( UnsupportedEncodingException e )
+        {
+            // can't happen as US-ASCII must be present
+        }
+    }
+
+    public static URL getURL( File file )
+        throws MalformedURLException
+    {
+        URL url = file.toURL();
+        // encode any characters that do not comply with RFC 2396
+        // this is primarily to handle Windows where the user's home directory contains spaces
+        try
+        {
+            byte[] bytes = url.toString().getBytes( ENCODING );
+            StringBuffer buf = new StringBuffer( bytes.length );
+            for ( int i = 0; i < bytes.length; i++ )
+            {
+                byte b = bytes[i];
+                if ( UNRESERVED.get( b ) )
+                {
+                    buf.append( (char) b );
+                }
+                else
+                {
+                    buf.append( '%' );
+                    buf.append( Character.forDigit( b >>> 4 & MASK, RADIX ) );
+                    buf.append( Character.forDigit( b & MASK, RADIX ) );
+                }
+            }
+            return new URL( buf.toString() );
+        }
+        catch ( UnsupportedEncodingException e )
+        {
+            // should not happen as US-ASCII must be present
+            throw new NestedRuntimeException( e );
+        }
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/resources/org/apache/maven/surefire/surefire.properties
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/resources/org/apache/maven/surefire/surefire.properties	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/main/resources/org/apache/maven/surefire/surefire.properties	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,27 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+setupFixtureFailed=Method setupFixture threw an exception prior to calling {0}.
+cleanupFixtureFailed=Method cleanupFixture threw an exception prior to calling {0}.
+testSetStarting=Test set starting.
+testSetCompletedNormally=Test set completed.
+testStarting=Test starting.
+executeException=Exception occurred.
+testSuccessful=Test succeeded.
+testSkipped=Test skipped.
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/site/apt/index.apt
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/site/apt/index.apt	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/site/apt/index.apt	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,33 @@
+ -----
+ Surefire API Design
+ -----
+ Brett Porter
+ -----
+ 3 March 2007
+ -----
+
+Surefire API
+
+* Definitions
+
+*-------------+-----------------------------------------------+
+| test method | individual test method within a class         |
+*-------------+-----------------------------------------------+
+| test        | 1..N test methods in 1 or more classes.       |
+*-------------+-----------------------------------------------+
+| suite       | 1..N tests.                                   |
+*-------------+-----------------------------------------------+
+| group       | A named subset of test methods within a test. |
+*-------------+-----------------------------------------------+
+
+  How each definition is applied depends on the provider, and the test suite being used.
+
+  Directory test suite: this constructs a single suite from a directory file set. Each discovered class is treated as a test.
+
+  TestNG XML test suite: this constructs a single suite from a testng.xml file. The definitions inside the file will match those above. 
+
+  JUnit 3.x: Groups are not supported.
+
+   See {{{providers/index.html}}} for more information on specific providers. |
+
+~~TODO: fix up URLs, move some to providers/javadoc.

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/assertion/ComparisonToolTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/assertion/ComparisonToolTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/assertion/ComparisonToolTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,130 @@
+package org.apache.maven.surefire.assertion;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.TestCase;
+
+/**
+ * Test the comparison tool string representations.
+ */
+public class ComparisonToolTest
+    extends TestCase
+{
+    public void testFormatMismatchNoMessage()
+    {
+        assertEquals( "expected:<foo> but was:<bar>", ComparisonTool.formatMismatch( null, "foo", "bar" ) );
+    }
+
+    public void testFormatMismatchWithMessage()
+    {
+        assertEquals( "msg expected:<foo> but was:<bar>", ComparisonTool.formatMismatch( "msg", "foo", "bar" ) );
+    }
+
+    public void testTrimComparisonActualNull()
+    {
+        assertEquals( "msg expected:<foo> but was:<null>", ComparisonTool.trimComparison( "msg", "foo", null ) );
+    }
+
+    public void testTrimComparisonExpectedNull()
+    {
+        assertEquals( "msg expected:<null> but was:<bar>", ComparisonTool.trimComparison( "msg", null, "bar" ) );
+    }
+
+    public void testTrimComparisonBothNull()
+    {
+        try
+        {
+            ComparisonTool.trimComparison( "msg", null, null );
+            fail( "Should fail to pass in equal values" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+            // correct
+        }
+    }
+
+    public void testTrimComparisonEqual()
+    {
+        try
+        {
+            ComparisonTool.trimComparison( "msg", "foo", "foo" );
+            fail( "Should fail to pass in equal values" );
+        }
+        catch ( IllegalArgumentException e )
+        {
+            // correct
+        }
+    }
+
+    public void testTrimComparisonNoMatch()
+    {
+        assertEquals( "msg expected:<foo> but was:<bar>", ComparisonTool.trimComparison( "msg", "foo", "bar" ) );
+    }
+
+    public void testTrimComparisonMatchStart()
+    {
+        assertEquals( "msg expected:<...rah> but was:<...bar>",
+                      ComparisonTool.trimComparison( "msg", "foorah", "foobar" ) );
+    }
+
+    public void testTrimComparisonMatchStartWholeExpected()
+    {
+        assertEquals( "msg expected:<...> but was:<...bar>", ComparisonTool.trimComparison( "msg", "foo", "foobar" ) );
+    }
+
+    public void testTrimComparisonMatchStartWholeActual()
+    {
+        assertEquals( "msg expected:<...rah> but was:<...>", ComparisonTool.trimComparison( "msg", "foorah", "foo" ) );
+    }
+
+    public void testTrimComparisonMatchEnd()
+    {
+        assertEquals( "msg expected:<bop...> but was:<foo...>",
+                      ComparisonTool.trimComparison( "msg", "bopbar", "foobar" ) );
+    }
+
+    public void testTrimComparisonMatchEndWholeExpected()
+    {
+        assertEquals( "msg expected:<...> but was:<foo...>", ComparisonTool.trimComparison( "msg", "bar", "foobar" ) );
+    }
+
+    public void testTrimComparisonMatchEndWholeActual()
+    {
+        assertEquals( "msg expected:<foo...> but was:<...>", ComparisonTool.trimComparison( "msg", "foorah", "rah" ) );
+    }
+
+    public void testTrimComparisonMatchStartAndEnd()
+    {
+        assertEquals( "msg expected:<...bar...> but was:<...foo...>",
+                      ComparisonTool.trimComparison( "msg", "foobarbaz", "foofoobaz" ) );
+    }
+
+    public void testTrimComparisonMatchStartAndEndWholeExpected()
+    {
+        assertEquals( "msg expected:<......> but was:<...def...>",
+                      ComparisonTool.trimComparison( "msg", "abcghi", "abcdefghi" ) );
+    }
+
+    public void testTrimComparisonMatchStartAndEndWholeActual()
+    {
+        assertEquals( "msg expected:<...def...> but was:<......>",
+                      ComparisonTool.trimComparison( "msg", "abcdefghi", "abcghi" ) );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/assertion/SurefireAssertTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/assertion/SurefireAssertTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/assertion/SurefireAssertTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,1068 @@
+package org.apache.maven.surefire.assertion;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.TestCase;
+
+/**
+ * Test the surefire assertion class.
+ *
+ * @noinspection ProhibitedExceptionCaught
+ */
+public class SurefireAssertTest
+    extends TestCase
+{
+    public void testFailWithNoMessage()
+    {
+        try
+        {
+            SurefireAssert.fail( (String) null );
+            fail( "Should have thrown a NullPointerException" );
+        }
+        catch ( NullPointerException e )
+        {
+            // expected
+        }
+    }
+
+    public void testFailWithNoCause()
+    {
+        try
+        {
+            SurefireAssert.fail( (Throwable) null );
+            fail( "Should have thrown a NullPointerException" );
+        }
+        catch ( NullPointerException e )
+        {
+            // expected
+        }
+    }
+
+
+    public void testFailWithMessageButNoCause()
+    {
+        try
+        {
+            SurefireAssert.fail( "msg", null );
+            fail( "Should have thrown a NullPointerException" );
+        }
+        catch ( NullPointerException e )
+        {
+            // expected
+        }
+    }
+
+    public void testFailWithCauseButNoMessage()
+    {
+        try
+        {
+            SurefireAssert.fail( null, new Exception( "msg" ) );
+            fail( "Should have thrown a NullPointerException" );
+        }
+        catch ( NullPointerException e )
+        {
+            // expected
+        }
+    }
+
+    public void testFailWithNoMessageOrCause()
+    {
+        try
+        {
+            SurefireAssert.fail();
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertNull( e.getMessage() );
+        }
+    }
+
+    public void testFailWithMessage()
+    {
+        try
+        {
+            SurefireAssert.fail( "msg" );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg", e.getMessage() );
+        }
+    }
+
+    public void testFailWithCause()
+    {
+        try
+        {
+            SurefireAssert.fail( new Exception( "nestedMsg" ) );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "null; nested exception is java.lang.Exception: nestedMsg", e.getMessage() );
+            assertEquals( "nestedMsg", e.getCause().getMessage() );
+        }
+    }
+
+    public void testFailWithMessageAndCause()
+    {
+        try
+        {
+            SurefireAssert.fail( "msg", new Exception( "nestedMsg" ) );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg; nested exception is java.lang.Exception: nestedMsg", e.getMessage() );
+            assertEquals( "nestedMsg", e.getCause().getMessage() );
+        }
+    }
+
+    public void testFailAssertTrueWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertTrue( "msg", false );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertTrueWithMessage()
+    {
+        SurefireAssert.assertTrue( "msg", true );
+    }
+
+    public void testFailAssertTrueWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertTrue( false );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertNull( e.getMessage() );
+        }
+    }
+
+    public void testPassAssertTrueWithoutMessage()
+    {
+        SurefireAssert.assertTrue( true );
+    }
+
+    public void testFailAssertFalseWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertFalse( "msg", true );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertFalseWithMessage()
+    {
+        SurefireAssert.assertFalse( "msg", false );
+    }
+
+    public void testFailAssertFalseWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertFalse( true );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertNull( e.getMessage() );
+        }
+    }
+
+    public void testPassAssertFalseWithoutMessage()
+    {
+        SurefireAssert.assertFalse( false );
+    }
+
+    public void testFailAssertEqualsStringWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", "foo", "bar" );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<foo> but was:<bar>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsStringExpectedNullWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", null, "bar" );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<null> but was:<bar>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsStringActualNullWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", "foo", null );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<foo> but was:<null>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsStringWithMessage()
+    {
+        SurefireAssert.assertEquals( "msg", "foo", "foo" );
+    }
+
+    public void testPassAssertEqualsStringBothNullWithMessage()
+    {
+        SurefireAssert.assertEquals( "msg", null, null );
+    }
+
+    public void testPassAssertEqualsStringWithoutMessage()
+    {
+        SurefireAssert.assertEquals( "foo", "foo" );
+    }
+
+    public void testFailAssertEqualsStringWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "foo", "bar" );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<foo> but was:<bar>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsObjectWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", new DummyObject( "foo" ), new DummyObject( "bar" ) );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<foo> but was:<bar>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsObjectDoesntTrim()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", new DummyObject( "foo" ), new DummyObject( "fobar" ) );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<foo> but was:<fobar>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsObjectExpectedNullWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", null, new DummyObject( "bar" ) );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<null> but was:<bar>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsObjectActualNullWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", new DummyObject( "foo" ), null );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<foo> but was:<null>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsObjectWithMessage()
+    {
+        SurefireAssert.assertEquals( "msg", new DummyObject( "foo" ), new DummyObject( "foo" ) );
+    }
+
+    public void testPassAssertEqualsObjectBothNullWithMessage()
+    {
+        SurefireAssert.assertEquals( "msg", null, null );
+    }
+
+    public void testPassAssertEqualsObjectWithoutMessage()
+    {
+        SurefireAssert.assertEquals( new DummyObject( "foo" ), new DummyObject( "foo" ) );
+    }
+
+    public void testFailAssertEqualsObjectWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( new DummyObject( "foo" ), new DummyObject( "bar" ) );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<foo> but was:<bar>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsIntWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", 1, 2 );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<1> but was:<2>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsIntWithMessage()
+    {
+        SurefireAssert.assertEquals( "msg", 1, 1 );
+    }
+
+    public void testPassAssertEqualsIntWithoutMessage()
+    {
+        SurefireAssert.assertEquals( 1, 1 );
+    }
+
+    public void testFailAssertEqualsIntWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( 1, 2 );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<1> but was:<2>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsLongWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", 1L, 2L );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<1> but was:<2>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsLongWithMessage()
+    {
+        SurefireAssert.assertEquals( "msg", 1L, 1L );
+    }
+
+    public void testPassAssertEqualsLongWithoutMessage()
+    {
+        SurefireAssert.assertEquals( 1L, 1L );
+    }
+
+    public void testFailAssertEqualsLongWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( 1L, 2L );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<1> but was:<2>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsFloatWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", 1.2f, 3.4f, 0.1f );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<1.2> but was:<3.4>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsFloatWithMessage()
+    {
+        SurefireAssert.assertEquals( "msg", 1.2f, 1.2f, 0.1f );
+    }
+
+    public void testPassAssertEqualsFloatWithoutMessage()
+    {
+        SurefireAssert.assertEquals( 1.2f, 1.2f, 0.1f );
+    }
+
+    public void testFailAssertEqualsFloatWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( 1.2f, 3.4f, 0.1f );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<1.2> but was:<3.4>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsFloatWithFudge()
+    {
+        SurefireAssert.assertEquals( 1.2f, 1.3f, 0.5f );
+    }
+
+    public void testFailAssertEqualsFloatWithoutFudge()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( 1.2f, 1.3f, 0.05f );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<1.2> but was:<1.3>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsFloatExpectedIsInfinite()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( Float.POSITIVE_INFINITY, 1.3f, 0.05f );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<Infinity> but was:<1.3>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsFloatActualIsInfinite()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( 1.2f, Float.POSITIVE_INFINITY, 0.05f );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<1.2> but was:<Infinity>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsFloatBothAreInfinite()
+    {
+        SurefireAssert.assertEquals( Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY, 0.05f );
+    }
+
+    public void testFailAssertEqualsDoubleWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", 1.2, 3.4, 0.1 );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<1.2> but was:<3.4>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsDoubleWithMessage()
+    {
+        SurefireAssert.assertEquals( "msg", 1.2, 1.2, 0.1 );
+    }
+
+    public void testPassAssertEqualsDoubleWithoutMessage()
+    {
+        SurefireAssert.assertEquals( 1.2, 1.2, 0.1 );
+    }
+
+    public void testFailAssertEqualsDoubleWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( 1.2, 3.4, 0.1 );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<1.2> but was:<3.4>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsDoubleWithFudge()
+    {
+        SurefireAssert.assertEquals( 1.2, 1.3, 0.5 );
+    }
+
+    public void testFailAssertEqualsDoubleWithoutFudge()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( 1.2, 1.3, 0.05 );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<1.2> but was:<1.3>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsDoubleExpectedIsInfinite()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( Double.POSITIVE_INFINITY, 1.3, 0.05 );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<Infinity> but was:<1.3>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsDoubleActualIsInfinite()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( 1.2, Double.POSITIVE_INFINITY, 0.05 );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<1.2> but was:<Infinity>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsDoubleBothAreInfinite()
+    {
+        SurefireAssert.assertEquals( Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, 0.05 );
+    }
+
+    public void testFailAssertEqualsByteWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", (byte) 1, (byte) 2 );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<1> but was:<2>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsByteWithMessage()
+    {
+        SurefireAssert.assertEquals( "msg", (byte) 1, (byte) 1 );
+    }
+
+    public void testPassAssertEqualsByteWithoutMessage()
+    {
+        SurefireAssert.assertEquals( (byte) 1, (byte) 1 );
+    }
+
+    public void testFailAssertEqualsByteWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( (byte) 1, (byte) 2 );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<1> but was:<2>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsBooleanWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", true, false );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<true> but was:<false>", e.getMessage() );
+        }
+        try
+        {
+            SurefireAssert.assertEquals( "msg", false, true );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<false> but was:<true>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsBooleanWithMessage()
+    {
+        SurefireAssert.assertEquals( "msg", true, true );
+        SurefireAssert.assertEquals( "msg", false, false );
+    }
+
+    public void testPassAssertEqualsBooleanWithoutMessage()
+    {
+        SurefireAssert.assertEquals( true, true );
+        SurefireAssert.assertEquals( false, false );
+    }
+
+    public void testFailAssertEqualsBooleanWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( true, false );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<true> but was:<false>", e.getMessage() );
+        }
+        try
+        {
+            SurefireAssert.assertEquals( false, true );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<false> but was:<true>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsCharWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", '1', '2' );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<1> but was:<2>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsCharWithMessage()
+    {
+        SurefireAssert.assertEquals( "msg", '1', '1' );
+    }
+
+    public void testPassAssertEqualsCharWithoutMessage()
+    {
+        SurefireAssert.assertEquals( '1', '1' );
+    }
+
+    public void testFailAssertEqualsCharWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( '1', '2' );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<1> but was:<2>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertEqualsShortWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( "msg", (short) 1, (short) 2 );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected:<1> but was:<2>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertEqualsShortWithMessage()
+    {
+        SurefireAssert.assertEquals( "msg", (short) 1, (short) 1 );
+    }
+
+    public void testPassAssertEqualsShortWithoutMessage()
+    {
+        SurefireAssert.assertEquals( (short) 1, (short) 1 );
+    }
+
+    public void testFailAssertEqualsShortWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertEquals( (short) 1, (short) 2 );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected:<1> but was:<2>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertNullWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertNull( "msg", new DummyObject( "foo" ) );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertNullWithMessage()
+    {
+        SurefireAssert.assertNull( "msg", null );
+    }
+
+    public void testFailAssertNullWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertNull( new DummyObject( "foo" ) );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertNull( e.getMessage() );
+        }
+    }
+
+    public void testPassAssertNullWithoutMessage()
+    {
+        SurefireAssert.assertNull( null );
+    }
+
+    public void testFailAssertNotNullWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertNotNull( "msg", null );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertNotNullWithMessage()
+    {
+        SurefireAssert.assertNotNull( "msg", new DummyObject( "foo" ) );
+    }
+
+    public void testFailAssertNotNullWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertNotNull( null );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertNull( e.getMessage() );
+        }
+    }
+
+    public void testPassAssertNotNullWithoutMessage()
+    {
+        SurefireAssert.assertNotNull( new DummyObject( "foo" ) );
+    }
+
+    public void testFailAssertSameWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertSame( "msg", new DummyObject( "foo" ), new DummyObject( "foo" ) );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected same:<foo> was not:<foo>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertSameDoesntTrim()
+    {
+        try
+        {
+            SurefireAssert.assertSame( "msg", new DummyObject( "foo" ), new DummyObject( "fobar" ) );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected same:<foo> was not:<fobar>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertSameExpectedNullWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertSame( "msg", null, new DummyObject( "bar" ) );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected same:<null> was not:<bar>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertSameActualNullWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertSame( "msg", new DummyObject( "foo" ), null );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected same:<foo> was not:<null>", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertSameWithMessage()
+    {
+        DummyObject value = new DummyObject( "foo" );
+        SurefireAssert.assertSame( "msg", value, value );
+    }
+
+    public void testPassAssertSameBothNullWithMessage()
+    {
+        SurefireAssert.assertSame( "msg", null, null );
+    }
+
+    public void testPassAssertSameWithoutMessage()
+    {
+        DummyObject value = new DummyObject( "foo" );
+        SurefireAssert.assertSame( value, value );
+    }
+
+    public void testFailAssertSameWithoutMessage()
+    {
+        try
+        {
+            SurefireAssert.assertSame( new DummyObject( "foo" ), new DummyObject( "foo" ) );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected same:<foo> was not:<foo>", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertNotSameWithMessage()
+    {
+        try
+        {
+            DummyObject value = new DummyObject( "foo" );
+            SurefireAssert.assertNotSame( "msg", value, value );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected not same", e.getMessage() );
+        }
+    }
+
+    public void testFailAssertNotSameExpectedNullWithMessage()
+    {
+        SurefireAssert.assertNotSame( "msg", null, new DummyObject( "bar" ) );
+    }
+
+    public void testFailAssertNotSameActualNullWithMessage()
+    {
+        SurefireAssert.assertNotSame( "msg", new DummyObject( "foo" ), null );
+    }
+
+    public void testPassAssertNotSameWithMessage()
+    {
+        SurefireAssert.assertNotSame( "msg", new DummyObject( "foo" ), new DummyObject( "foo" ) );
+    }
+
+    public void testPassAssertNotSameBothNullWithMessage()
+    {
+        try
+        {
+            SurefireAssert.assertNotSame( "msg", null, null );
+            fail( "Should not be the same" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "msg expected not same", e.getMessage() );
+        }
+    }
+
+    public void testPassAssertNotSameWithoutMessage()
+    {
+        SurefireAssert.assertNotSame( new DummyObject( "foo" ), new DummyObject( "foo" ) );
+    }
+
+    public void testFailAssertNotSameWithoutMessage()
+    {
+        try
+        {
+            DummyObject value = new DummyObject( "foo" );
+            SurefireAssert.assertNotSame( value, value );
+            fail( "Should have failed" );
+        }
+        catch ( SurefireAssertionFailedException e )
+        {
+            // expected
+            assertEquals( "expected not same", e.getMessage() );
+        }
+    }
+
+    private static class DummyObject
+    {
+        private final String value;
+
+        private DummyObject( String value )
+        {
+            this.value = value;
+        }
+
+        public boolean equals( Object obj )
+        {
+            if ( this == obj )
+            {
+                return true;
+            }
+            if ( obj == null || getClass() != obj.getClass() )
+            {
+                return false;
+            }
+
+            DummyObject that = (DummyObject) obj;
+
+            return !( value != null ? !value.equals( that.value ) : that.value != null );
+
+        }
+
+        public int hashCode()
+        {
+            return value != null ? value.hashCode() : 0;
+        }
+
+        public String toString()
+        {
+            return value;
+        }
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/AbstractConsoleReporterTestCase.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/AbstractConsoleReporterTestCase.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/AbstractConsoleReporterTestCase.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,100 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.TestCase;
+
+/**
+ * Test for AbstractConsoleReporter
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ */
+public abstract class AbstractConsoleReporterTestCase
+    extends TestCase
+{
+
+    private AbstractConsoleReporter consoleReporter;
+
+    private ReportEntry report;
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        report = new ReportEntry();
+        report.setGroup( "group" );
+        report.setName( "name" );
+    }
+
+    protected void setConsoleReporter( AbstractConsoleReporter consoleReporter )
+    {
+        this.consoleReporter = consoleReporter;
+    }
+
+    protected AbstractConsoleReporter getConsoleReporter()
+    {
+        return consoleReporter;
+    }
+
+    public void testTestSetStarting()
+        throws Exception
+    {
+        consoleReporter.testSetStarting( report );
+    }
+
+    public void testGetTestSetStartingMessage()
+        throws Exception
+    {
+        String message = AbstractConsoleReporter.getTestSetStartingMessage( report );
+        assertEquals( "Running name (of group)", message );
+
+        report.setGroup( null );
+        message = AbstractConsoleReporter.getTestSetStartingMessage( report );
+        assertEquals( "Running name", message );
+    }
+
+    public void testParseTestSetStartingMessage()
+        throws Exception
+    {
+        String message = "Running name (of group)";
+        ReportEntry actualReport = AbstractConsoleReporter.parseTestSetStartingMessage( message );
+        assertEquals( report, actualReport );
+
+        report.setGroup( null );
+        message = "Running name";
+        actualReport = AbstractConsoleReporter.parseTestSetStartingMessage( message );
+        assertEquals( report, actualReport );
+    }
+
+    public void testIsTestSetStartingMessage()
+        throws Exception
+    {
+        String message = "Running name (of group)";
+        assertTrue( AbstractConsoleReporter.isTestSetStartingMessage( message ) );
+
+        message = "Running name";
+        assertTrue( AbstractConsoleReporter.isTestSetStartingMessage( message ) );
+
+        message = "Xxxx";
+        assertFalse( AbstractConsoleReporter.isTestSetStartingMessage( message ) );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/ForkingConsoleReporterTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/ForkingConsoleReporterTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/ForkingConsoleReporterTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,40 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Test for {@link ForkingConsoleReporter}
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ */
+public class ForkingConsoleReporterTest
+    extends AbstractConsoleReporterTestCase
+{
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        ForkingConsoleReporter consoleReporter = new ForkingConsoleReporter( Boolean.TRUE );
+        setConsoleReporter( consoleReporter );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/XMLReporterTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/XMLReporterTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/XMLReporterTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,71 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.AssertionFailedError;
+import junit.framework.TestCase;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
+public class XMLReporterTest
+    extends TestCase
+{
+
+    private XMLReporter reporter;
+
+    private ReportEntry reportEntry;
+
+    private String message;
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        reporter = new XMLReporter( null, Boolean.TRUE );
+        message = "junit.framework.AssertionFailedError";
+        reportEntry = new ReportEntry( this, "XMLReporterTest", message,
+                                       new PojoStackTraceWriter( "", "", new AssertionFailedError() ) );
+    }
+
+    /*
+     * Test method for 'org.codehaus.surefire.report.XMLReporter.testError(ReportEntry, String, String)'
+     */
+    public void testTestError()
+    {
+        reporter.testError( reportEntry, "", "" );
+        assertResult( reporter, message );
+    }
+
+    /*
+     * Test method for 'org.codehaus.surefire.report.XMLReporter.testFailed(ReportEntry, String, String)'
+     */
+    public void testTestFailed()
+    {
+        reporter.testError( reportEntry, "", "" );
+        assertResult( reporter, message );
+    }
+
+    private void assertResult( XMLReporter reporter, String message )
+    {
+        Xpp3Dom result = (Xpp3Dom) reporter.getResults().next();
+        Xpp3Dom child = result.getChild( "error" );
+        assertEquals( message, child.getAttribute( "type" ) );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/util/UrlUtilsTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/util/UrlUtilsTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-api/src/test/java/org/apache/maven/surefire/util/UrlUtilsTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,69 @@
+package org.apache.maven.surefire.util;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.TestCase;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+/**
+ * Test the URL utilities.
+ */
+public class UrlUtilsTest
+    extends TestCase
+{
+    private String homeDir;
+
+    public void setUp()
+        throws Exception
+    {
+        super.setUp();
+        homeDir = System.getProperty( "user.dir" );
+        if ( !homeDir.startsWith( "/" ) )
+        {
+            homeDir = "/" + homeDir;
+        }
+    }
+
+    public void testTestNoSpecialCharacters()
+        throws IOException
+    {
+        File f = new File( homeDir, "foo.txt" );
+        assertEquals( new URL( "file:" + homeDir + "/foo.txt" ), UrlUtils.getURL( f ) );
+        f = new File( homeDir, "qwertyuiopasdfghjklzxcvbnm.txt" );
+        assertEquals( new URL( "file:" + homeDir + "/qwertyuiopasdfghjklzxcvbnm.txt" ), UrlUtils.getURL( f ) );
+        f = new File( homeDir, "QWERTYUIOPASDFGHJKLZXCVBNM.txt" );
+        assertEquals( new URL( "file:" + homeDir + "/QWERTYUIOPASDFGHJKLZXCVBNM.txt" ), UrlUtils.getURL( f ) );
+        f = new File( homeDir, "1234567890.txt" );
+        assertEquals( new URL( "file:" + homeDir + "/1234567890.txt" ), UrlUtils.getURL( f ) );
+        f = new File( homeDir, ")('*~!._-.txt" );
+        assertEquals( new URL( "file:" + homeDir + "/)('*~!._-.txt" ), UrlUtils.getURL( f ) );
+    }
+
+    public void testTestWithSpaces()
+        throws IOException
+    {
+        File f = new File( homeDir, "foo bar.txt" );
+        assertEquals( new URL( "file:" + homeDir + "/foo%20bar.txt" ), UrlUtils.getURL( f ) );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/name-output.txt
===================================================================

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,24 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>surefire</artifactId>
+    <groupId>org.apache.maven.surefire</groupId>
+    <version>2.4-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>surefire-booter</artifactId>
+  <name>SureFire Booter</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.surefire</groupId>
+      <artifactId>surefire-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-archiver</artifactId>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkConfiguration.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkConfiguration.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkConfiguration.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,271 @@
+package org.apache.maven.surefire.booter;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.util.UrlUtils;
+import org.codehaus.plexus.archiver.ArchiverException;
+import org.codehaus.plexus.archiver.jar.JarArchiver;
+import org.codehaus.plexus.archiver.jar.Manifest;
+import org.codehaus.plexus.archiver.jar.ManifestException;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.cli.Commandline;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * Configuration for forking tests.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ * @author <a href="mailto:kenney at apache.org">Kenney Westerhof</a>
+ */
+public class ForkConfiguration
+{
+    public static final String FORK_ONCE = "once";
+
+    public static final String FORK_ALWAYS = "always";
+
+    public static final String FORK_NEVER = "never";
+
+    private String forkMode;
+
+    private boolean useSystemClassLoader;
+
+    private Properties systemProperties;
+
+    private String jvmExecutable;
+
+    private String argLine;
+
+    private Map environmentVariables;
+
+    private File workingDirectory;
+
+    private boolean debug;
+
+    public void setForkMode( String forkMode )
+    {
+        if ( "pertest".equalsIgnoreCase( forkMode ) )
+        {
+            this.forkMode = FORK_ALWAYS;
+        }
+        else if ( "none".equalsIgnoreCase( forkMode ) )
+        {
+            this.forkMode = FORK_NEVER;
+        }
+        else if ( forkMode.equals( FORK_NEVER ) || forkMode.equals( FORK_ONCE ) || forkMode.equals( FORK_ALWAYS ) )
+        {
+            this.forkMode = forkMode;
+        }
+        else
+        {
+            throw new IllegalArgumentException( "Fork mode " + forkMode + " is not a legal value" );
+        }
+    }
+
+    public boolean isForking()
+    {
+        return !FORK_NEVER.equals( forkMode );
+    }
+
+    public void setUseSystemClassLoader( boolean useSystemClassLoader )
+    {
+        this.useSystemClassLoader = useSystemClassLoader;
+    }
+
+    public boolean isUseSystemClassLoader()
+    {
+        return useSystemClassLoader;
+    }
+
+    public void setSystemProperties( Properties systemProperties )
+    {
+        this.systemProperties = (Properties) systemProperties.clone();
+    }
+
+    public void setJvmExecutable( String jvmExecutable )
+    {
+        this.jvmExecutable = jvmExecutable;
+    }
+
+    public void setArgLine( String argLine )
+    {
+        this.argLine = argLine;
+    }
+
+    public void setEnvironmentVariables( Map environmentVariables )
+    {
+        this.environmentVariables = new HashMap( environmentVariables );
+    }
+
+    public void setWorkingDirectory( File workingDirectory )
+    {
+        this.workingDirectory = workingDirectory;
+    }
+
+    public String getForkMode()
+    {
+        return forkMode;
+    }
+
+    public Properties getSystemProperties()
+    {
+        return systemProperties;
+    }
+
+    /**
+     * @throws SurefireBooterForkException
+     * @deprecated use the 2-arg alternative.
+     */
+    public Commandline createCommandLine( List classPath )
+        throws SurefireBooterForkException
+    {
+        return createCommandLine( classPath, false );
+    }
+
+    public Commandline createCommandLine( List classPath, boolean useJar )
+        throws SurefireBooterForkException
+    {
+        Commandline cli = new Commandline();
+
+        cli.setExecutable( jvmExecutable );
+
+        if ( argLine != null )
+        {
+            cli.addArguments( StringUtils.split( argLine, " " ) );
+        }
+
+        if ( environmentVariables != null )
+        {
+            Iterator iter = environmentVariables.keySet().iterator();
+
+            while ( iter.hasNext() )
+            {
+                String key = (String) iter.next();
+
+                String value = (String) environmentVariables.get( key );
+
+                cli.addEnvironment( key, value );
+            }
+        }
+
+        if ( System.getProperty( "maven.surefire.debug" ) != null )
+        {
+            cli.createArgument().setLine(
+                "-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" );
+        }
+
+        if ( useJar )
+        {
+            File jarFile;
+            try
+            {
+                jarFile = createJar( classPath );
+            }
+            catch ( IOException e )
+            {
+                throw new SurefireBooterForkException( "Error creating archive file", e );
+            }
+            catch ( ManifestException e )
+            {
+                throw new SurefireBooterForkException( "Error creating manifest", e );
+            }
+            catch ( ArchiverException e )
+            {
+                throw new SurefireBooterForkException( "Error creating archive", e );
+            }
+
+            cli.createArgument().setValue( "-jar" );
+
+            cli.createArgument().setValue( jarFile.getAbsolutePath() );
+        }
+        else
+        {
+            cli.createArgument().setValue( "-classpath" );
+
+            cli.createArgument().setValue( StringUtils.join( classPath.iterator(), File.pathSeparator ) );
+
+            cli.createArgument().setValue( SurefireBooter.class.getName() );
+        }
+
+        cli.setWorkingDirectory( workingDirectory.getAbsolutePath() );
+
+        return cli;
+    }
+
+    /**
+     * Create a jar with just a manifest containing a Main-Class entry for SurefireBooter and a Class-Path entry
+     * for all classpath elements.
+     *
+     * @param classPath List&lt;String> of all classpath elements.
+     * @return
+     * @throws IOException
+     * @throws ManifestException
+     * @throws ArchiverException
+     */
+    private static File createJar( List classPath )
+        throws IOException, ManifestException, ArchiverException
+    {
+        JarArchiver jar = new JarArchiver();
+        jar.setCompress( false ); // for speed
+        File file = File.createTempFile( "surefirebooter", ".jar" );
+        file.deleteOnExit();
+        jar.setDestFile( file );
+
+        Manifest manifest = new Manifest();
+
+        // we can't use StringUtils.join here since we need to add a '/' to
+        // the end of directory entries - otherwise the jvm will ignore them.
+        String cp = "";
+        for ( Iterator it = classPath.iterator(); it.hasNext(); )
+        {
+            String el = (String) it.next();
+            // NOTE: if File points to a directory, this entry MUST end in '/'.
+            cp += UrlUtils.getURL( new File( el ) ).toExternalForm() + " ";
+        }
+
+        Manifest.Attribute attr = new Manifest.Attribute( "Class-Path", cp.trim() );
+        manifest.addConfiguredAttribute( attr );
+
+        attr = new Manifest.Attribute( "Main-Class", SurefireBooter.class.getName() );
+        manifest.addConfiguredAttribute( attr );
+
+        jar.addConfiguredManifest( manifest );
+
+        jar.createArchive();
+
+        return file;
+    }
+
+    public void setDebug( boolean debug )
+    {
+        this.debug = debug;
+    }
+
+    public boolean isDebug()
+    {
+        return debug;
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkingWriterStreamConsumer.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkingWriterStreamConsumer.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkingWriterStreamConsumer.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,91 @@
+package org.apache.maven.surefire.booter;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.booter.output.ForkingStreamConsumer;
+import org.apache.maven.surefire.report.ForkingConsoleReporter;
+import org.codehaus.plexus.util.cli.StreamConsumer;
+
+import java.io.PrintWriter;
+import java.io.Writer;
+
+/**
+ * @author Jason van Zyl
+ * @version $Revision$
+ * @deprecated use {@link ForkingStreamConsumer}
+ */
+public class ForkingWriterStreamConsumer
+    implements StreamConsumer
+{
+    private PrintWriter printWriter;
+
+    private int standardPrefixLength;
+
+    private int headingPrefixLength;
+
+    private boolean showHeading;
+
+    private int footerPrefixLength;
+
+    private boolean showFooter;
+
+    public ForkingWriterStreamConsumer( Writer writer, boolean showHeading, boolean showFooter )
+    {
+        this.showHeading = showHeading;
+
+        this.showFooter = showFooter;
+
+        printWriter = new PrintWriter( writer );
+
+        standardPrefixLength = ForkingConsoleReporter.FORKING_PREFIX_STANDARD.length();
+
+        headingPrefixLength = ForkingConsoleReporter.FORKING_PREFIX_HEADING.length();
+
+        footerPrefixLength = ForkingConsoleReporter.FORKING_PREFIX_FOOTER.length();
+    }
+
+    public void consumeLine( String line )
+    {
+        if ( line.startsWith( ForkingConsoleReporter.FORKING_PREFIX_HEADING ) )
+        {
+            if ( showHeading )
+            {
+                printWriter.println( line.substring( headingPrefixLength ) );
+            }
+        }
+        else if ( line.startsWith( ForkingConsoleReporter.FORKING_PREFIX_STANDARD ) )
+        {
+            printWriter.println( line.substring( standardPrefixLength ) );
+        }
+        else if ( line.startsWith( ForkingConsoleReporter.FORKING_PREFIX_FOOTER ) )
+        {
+            if ( showFooter )
+            {
+                printWriter.println( line.substring( footerPrefixLength ) );
+            }
+        }
+        else
+        {
+            // stdout
+            printWriter.println( line );
+        }
+        printWriter.flush();
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/IsolatedClassLoader.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/IsolatedClassLoader.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/IsolatedClassLoader.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,108 @@
+package org.apache.maven.surefire.booter;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @noinspection CustomClassloader
+ */
+public class IsolatedClassLoader
+    extends URLClassLoader
+{
+    private ClassLoader parent = ClassLoader.getSystemClassLoader();
+
+    private Set urls = new HashSet();
+
+    private boolean childDelegation = true;
+
+    private static final URL[] EMPTY_URL_ARRAY = new URL[0];
+
+    public IsolatedClassLoader()
+    {
+        super( EMPTY_URL_ARRAY, null );
+    }
+
+    public IsolatedClassLoader( ClassLoader parent, boolean childDelegation )
+    {
+        super( EMPTY_URL_ARRAY, parent );
+
+        this.childDelegation = childDelegation;
+    }
+
+    public IsolatedClassLoader( ClassLoader parent )
+    {
+        super( EMPTY_URL_ARRAY, parent );
+    }
+
+    public void addURL( URL url )
+    {
+        // avoid duplicates
+        if ( !urls.contains( url ) )
+        {
+            super.addURL( url );
+            urls.add( url );
+        }
+    }
+
+    public synchronized Class loadClass( String name )
+        throws ClassNotFoundException
+    {
+        Class c;
+
+        if ( childDelegation )
+        {
+            c = findLoadedClass( name );
+
+            ClassNotFoundException ex = null;
+
+            if ( c == null )
+            {
+                try
+                {
+                    c = findClass( name );
+                }
+                catch ( ClassNotFoundException e )
+                {
+                    ex = e;
+
+                    if ( parent != null )
+                    {
+                        c = parent.loadClass( name );
+                    }
+                }
+            }
+
+            if ( c == null )
+            {
+                throw ex;
+            }
+        }
+        else
+        {
+            c = super.loadClass( name );
+        }
+
+        return c;
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,956 @@
+package org.apache.maven.surefire.booter;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.Surefire;
+import org.apache.maven.surefire.booter.output.FileOutputConsumerProxy;
+import org.apache.maven.surefire.booter.output.ForkingStreamConsumer;
+import org.apache.maven.surefire.booter.output.OutputConsumer;
+import org.apache.maven.surefire.booter.output.StandardOutputConsumer;
+import org.apache.maven.surefire.booter.output.SupressFooterOutputConsumerProxy;
+import org.apache.maven.surefire.booter.output.SupressHeaderOutputConsumerProxy;
+import org.apache.maven.surefire.testset.TestSetFailedException;
+import org.apache.maven.surefire.util.NestedRuntimeException;
+import org.apache.maven.surefire.util.UrlUtils;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
+import org.codehaus.plexus.util.cli.Commandline;
+import org.codehaus.plexus.util.cli.StreamConsumer;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+/**
+ * @author Jason van Zyl
+ * @author Emmanuel Venisse
+ * @version $Id$
+ */
+public class SurefireBooter
+{
+    private static final String TEST_SUITE_PROPERTY_PREFIX = "testSuite.";
+    private static final String REPORT_PROPERTY_PREFIX = "report.";
+    private static final String PARAMS_SUFIX = ".params";
+    private static final String TYPES_SUFIX = ".types";
+
+    private List reports = new ArrayList();
+
+    private List classPathUrls = new ArrayList();
+
+    private List surefireClassPathUrls = new ArrayList();
+
+    private List surefireBootClassPathUrls = new ArrayList();
+
+    private List testSuites = new ArrayList();
+
+    private boolean redirectTestOutputToFile = false;
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    private ForkConfiguration forkConfiguration;
+
+    private static final int TESTS_SUCCEEDED_EXIT_CODE = 0;
+
+    private static final int TESTS_FAILED_EXIT_CODE = 255;
+
+    private static Method assertionStatusMethod;
+
+    /**
+     * @deprecated because the IsolatedClassLoader is really isolated - no parent.
+     */
+    private boolean childDelegation = true;
+
+    private File reportsDirectory;
+
+    /**
+     * This field is set to true if it's running from main. It's used to help decide what classloader to use.
+     */
+    private final boolean isForked;
+
+    /**
+     * Whether to enable assertions or not (can be affected by the fork arguments, and the ability to do so based on the
+     * JVM).
+     */
+    private boolean enableAssertions;
+
+    static
+    {
+        try
+        {
+            assertionStatusMethod =
+                ClassLoader.class.getMethod( "setDefaultAssertionStatus", new Class[] { boolean.class } );
+        }
+        catch ( NoSuchMethodException e )
+        {
+            assertionStatusMethod = null;
+        }
+    }
+
+    public SurefireBooter()
+    {
+        isForked = false;
+    }
+
+    private SurefireBooter( boolean isForked )
+    {
+        this.isForked = isForked;
+    }
+
+    // ----------------------------------------------------------------------
+    // Accessors
+    // ----------------------------------------------------------------------
+
+    public void addReport( String report )
+    {
+        addReport( report, null );
+    }
+
+    public void addReport( String report, Object[] constructorParams )
+    {
+        reports.add( new Object[] { report, constructorParams } );
+    }
+
+    public void addTestSuite( String suiteClassName, Object[] constructorParams )
+    {
+        testSuites.add( new Object[] { suiteClassName, constructorParams } );
+    }
+
+    public void addClassPathUrl( String path )
+    {
+        if ( !classPathUrls.contains( path ) )
+        {
+            classPathUrls.add( path );
+        }
+    }
+
+    public void addSurefireClassPathUrl( String path )
+    {
+        if ( !surefireClassPathUrls.contains( path ) )
+        {
+            surefireClassPathUrls.add( path );
+        }
+    }
+
+    public void addSurefireBootClassPathUrl( String path )
+    {
+        if ( !surefireBootClassPathUrls.contains( path ) )
+        {
+            surefireBootClassPathUrls.add( path );
+        }
+    }
+
+    /**
+     * When forking, setting this to true will make the test output to be saved in a file instead of showing it on the
+     * standard output
+     * 
+     * @param redirectTestOutputToFile
+     */
+    public void setRedirectTestOutputToFile( boolean redirectTestOutputToFile )
+    {
+        this.redirectTestOutputToFile = redirectTestOutputToFile;
+    }
+
+    /**
+     * Set the directory where reports will be saved
+     * 
+     * @param reportsDirectory the directory
+     */
+    public void setReportsDirectory( File reportsDirectory )
+    {
+        this.reportsDirectory = reportsDirectory;
+    }
+
+    /**
+     * Get the directory where reports will be saved
+     */
+    public File getReportsDirectory()
+    {
+        return reportsDirectory;
+    }
+
+    public void setForkConfiguration( ForkConfiguration forkConfiguration )
+    {
+        this.forkConfiguration = forkConfiguration;
+    }
+
+    public boolean run()
+        throws SurefireBooterForkException, SurefireExecutionException
+    {
+        boolean result;
+
+        if ( ForkConfiguration.FORK_NEVER.equals( forkConfiguration.getForkMode() ) )
+        {
+            result = runSuitesInProcess();
+        }
+        else if ( ForkConfiguration.FORK_ONCE.equals( forkConfiguration.getForkMode() ) )
+        {
+            result = runSuitesForkOnce();
+        }
+        else if ( ForkConfiguration.FORK_ALWAYS.equals( forkConfiguration.getForkMode() ) )
+        {
+            result = runSuitesForkPerTestSet();
+        }
+        else
+        {
+            throw new SurefireExecutionException( "Unknown forkmode: " + forkConfiguration.getForkMode(), null );
+        }
+        return result;
+    }
+
+    private boolean runSuitesInProcess( String testSet, Properties results )
+        throws SurefireExecutionException
+    {
+        if ( testSuites.size() != 1 )
+        {
+            throw new IllegalArgumentException( "Cannot only specify testSet for single test suites" );
+        }
+
+        // TODO: replace with plexus
+
+        // noinspection CatchGenericClass,OverlyBroadCatchBlock
+        ClassLoader oldContextClassLoader = Thread.currentThread().getContextClassLoader();
+        try
+        {
+            ClassLoader testsClassLoader =
+                useSystemClassLoader() ? ClassLoader.getSystemClassLoader() : createClassLoader( classPathUrls, null,
+                                                                                                 childDelegation );
+
+            // TODO: assertions = true shouldn't be required for this CL if we had proper separation (see TestNG)
+            ClassLoader surefireClassLoader = createClassLoader( surefireClassPathUrls, testsClassLoader );
+
+            Class surefireClass = surefireClassLoader.loadClass( Surefire.class.getName() );
+
+            Object surefire = surefireClass.newInstance();
+
+            Method run =
+                surefireClass.getMethod( "run", new Class[] { List.class, Object[].class, String.class,
+                    ClassLoader.class, ClassLoader.class, Properties.class } );
+
+            Thread.currentThread().setContextClassLoader( testsClassLoader );
+
+            Boolean result =
+                (Boolean) run.invoke( surefire, new Object[] { reports, testSuites.get( 0 ), testSet,
+                    surefireClassLoader, testsClassLoader, results } );
+
+            return result.booleanValue();
+        }
+        catch ( InvocationTargetException e )
+        {
+            throw new SurefireExecutionException( e.getTargetException().getMessage(), e.getTargetException() );
+        }
+        catch ( Exception e )
+        {
+            throw new SurefireExecutionException( "Unable to instantiate and execute Surefire", e );
+        }
+        finally
+        {
+            Thread.currentThread().setContextClassLoader( oldContextClassLoader );
+        }
+    }
+
+    private boolean runSuitesInProcess()
+        throws SurefireExecutionException
+    {
+        // TODO: replace with plexus
+
+        // noinspection CatchGenericClass,OverlyBroadCatchBlock
+        ClassLoader oldContextClassLoader = Thread.currentThread().getContextClassLoader();
+
+        try
+        {
+            // The test classloader must be constructed first to avoid issues with commons-logging until we properly
+            // separate the TestNG classloader
+            ClassLoader testsClassLoader = useSystemClassLoader() ? getClass().getClassLoader() // ClassLoader.getSystemClassLoader()
+                            : createClassLoader( classPathUrls, null, childDelegation );
+
+            ClassLoader surefireClassLoader = createClassLoader( surefireClassPathUrls, testsClassLoader );
+
+            Class surefireClass = surefireClassLoader.loadClass( Surefire.class.getName() );
+
+            Object surefire = surefireClass.newInstance();
+
+            Method run =
+                surefireClass.getMethod( "run", new Class[] { List.class, List.class, ClassLoader.class,
+                    ClassLoader.class } );
+
+            Thread.currentThread().setContextClassLoader( testsClassLoader );
+
+            Boolean result =
+                (Boolean) run.invoke( surefire, new Object[] { reports, testSuites, surefireClassLoader,
+                    testsClassLoader } );
+
+            return result.booleanValue();
+        }
+        catch ( InvocationTargetException e )
+        {
+            throw new SurefireExecutionException( e.getTargetException().getMessage(), e.getTargetException() );
+        }
+        catch ( Exception e )
+        {
+            throw new SurefireExecutionException( "Unable to instantiate and execute Surefire", e );
+        }
+        finally
+        {
+            Thread.currentThread().setContextClassLoader( oldContextClassLoader );
+        }
+    }
+
+    private boolean runSuitesForkOnce()
+        throws SurefireBooterForkException
+    {
+        return forkSuites( testSuites, true, true );
+    }
+
+    private boolean runSuitesForkPerTestSet()
+        throws SurefireBooterForkException
+    {
+        ClassLoader testsClassLoader;
+        ClassLoader surefireClassLoader;
+        try
+        {
+            testsClassLoader = createClassLoader( classPathUrls, null, false );
+            // TODO: assertions = true shouldn't be required if we had proper separation (see TestNG)
+            surefireClassLoader = createClassLoader( surefireClassPathUrls, testsClassLoader, false );
+        }
+        catch ( MalformedURLException e )
+        {
+            throw new SurefireBooterForkException( "Unable to create classloader to find test suites", e );
+        }
+
+        boolean failed = false;
+
+        boolean showHeading = true;
+        Properties properties = new Properties();
+        for ( Iterator i = testSuites.iterator(); i.hasNext(); )
+        {
+            Object[] testSuite = (Object[]) i.next();
+
+            Map testSets = getTestSets( testSuite, testsClassLoader, surefireClassLoader );
+
+            for ( Iterator j = testSets.keySet().iterator(); j.hasNext(); )
+            {
+                String testSet = (String) j.next();
+                boolean showFooter = !j.hasNext() && !i.hasNext();
+                boolean result = forkSuite( testSuite, testSet, showHeading, showFooter, properties );
+                if ( !result )
+                {
+                    failed = true;
+                }
+                showHeading = false;
+            }
+        }
+
+        return !failed;
+    }
+
+    private Map getTestSets( Object[] testSuite, ClassLoader testsClassLoader, ClassLoader surefireClassLoader )
+        throws SurefireBooterForkException
+    {
+        String className = (String) testSuite[0];
+
+        Object[] params = (Object[]) testSuite[1];
+
+        Object suite;
+        try
+        {
+            suite = Surefire.instantiateObject( className, params, surefireClassLoader );
+        }
+        catch ( TestSetFailedException e )
+        {
+            throw new SurefireBooterForkException( e.getMessage(), e.getCause() );
+        }
+        catch ( ClassNotFoundException e )
+        {
+            throw new SurefireBooterForkException( "Unable to find class for test suite '" + className + "'", e );
+        }
+        catch ( NoSuchMethodException e )
+        {
+            throw new SurefireBooterForkException( "Unable to find appropriate constructor for test suite '" +
+                className + "': " + e.getMessage(), e );
+        }
+
+        Map testSets;
+        try
+        {
+            Method m = suite.getClass().getMethod( "locateTestSets", new Class[] { ClassLoader.class } );
+
+            testSets = (Map) m.invoke( suite, new Object[] { testsClassLoader } );
+        }
+        catch ( IllegalAccessException e )
+        {
+            throw new SurefireBooterForkException( "Error obtaining test sets", e );
+        }
+        catch ( NoSuchMethodException e )
+        {
+            throw new SurefireBooterForkException( "Error obtaining test sets", e );
+        }
+        catch ( InvocationTargetException e )
+        {
+            throw new SurefireBooterForkException( e.getTargetException().getMessage(), e.getTargetException() );
+        }
+        return testSets;
+    }
+
+    private boolean forkSuites( List testSuites, boolean showHeading, boolean showFooter )
+        throws SurefireBooterForkException
+    {
+        Properties properties = new Properties();
+
+        setForkProperties( testSuites, properties );
+
+        return fork( properties, showHeading, showFooter );
+    }
+
+    private boolean forkSuite( Object[] testSuite, String testSet, boolean showHeading, boolean showFooter,
+                               Properties properties )
+        throws SurefireBooterForkException
+    {
+        setForkProperties( Collections.singletonList( testSuite ), properties );
+
+        properties.setProperty( "testSet", testSet );
+
+        return fork( properties, showHeading, showFooter );
+    }
+
+    private void setForkProperties( List testSuites, Properties properties )
+    {
+        addPropertiesForTypeHolder( reports, properties, REPORT_PROPERTY_PREFIX );
+        addPropertiesForTypeHolder( testSuites, properties, TEST_SUITE_PROPERTY_PREFIX );
+
+        for ( int i = 0; i < classPathUrls.size() && !useSystemClassLoader(); i++ )
+        {
+            String url = (String) classPathUrls.get( i );
+            properties.setProperty( "classPathUrl." + i, url );
+        }
+
+        for ( int i = 0; i < surefireClassPathUrls.size(); i++ )
+        {
+            String url = (String) surefireClassPathUrls.get( i );
+            properties.setProperty( "surefireClassPathUrl." + i, url );
+        }
+
+        properties.setProperty( "childDelegation", String.valueOf( childDelegation ) );
+        properties.setProperty( "enableAssertions", String.valueOf( enableAssertions ) );
+        properties.setProperty( "useSystemClassLoader", String.valueOf( useSystemClassLoader() ) );
+    }
+
+    private File writePropertiesFile( String name, Properties properties )
+        throws IOException
+    {
+        File file = File.createTempFile( name, "tmp" );
+        file.deleteOnExit();
+
+        writePropertiesFile( file, name, properties );
+
+        return file;
+    }
+
+    private void writePropertiesFile( File file, String name, Properties properties )
+        throws IOException
+    {
+        FileOutputStream out = new FileOutputStream( file );
+
+        try
+        {
+            properties.store( out, name );
+        }
+        finally
+        {
+            IOUtil.close( out );
+        }
+    }
+
+    private void addPropertiesForTypeHolder( List typeHolderList, Properties properties, String propertyPrefix )
+    {
+        for ( int i = 0; i < typeHolderList.size(); i++ )
+        {
+            Object[] report = (Object[]) typeHolderList.get( i );
+
+            String className = (String) report[0];
+            Object[] params = (Object[]) report[1];
+
+            properties.setProperty( propertyPrefix + i, className );
+
+            if ( params != null )
+            {
+                String paramProperty = convert( params[0] );
+                String typeProperty = params[0].getClass().getName();
+                for ( int j = 1; j < params.length; j++ )
+                {
+                    paramProperty += "|";
+                    typeProperty += "|";
+                    if ( params[j] != null )
+                    {
+                        paramProperty += convert( params[j] );
+                        typeProperty += params[j].getClass().getName();
+                    }
+                }
+                properties.setProperty( propertyPrefix + i + PARAMS_SUFIX, paramProperty );
+                properties.setProperty( propertyPrefix + i + TYPES_SUFIX, typeProperty );
+            }
+        }
+    }
+
+    private String convert( Object param )
+    {
+        if ( param instanceof File[] )
+        {
+            String s = "[";
+            File[] f = (File[]) param;
+            for ( int i = 0; i < f.length; i++ )
+            {
+                s += f[i];
+                if ( i > 0 )
+                {
+                    s += ",";
+                }
+            }
+            return s + "]";
+        }
+        else
+        {
+            return param.toString();
+        }
+    }
+
+    private final boolean useSystemClassLoader()
+    {
+        return forkConfiguration.isUseSystemClassLoader() && ( isForked || forkConfiguration.isForking() );
+    }
+
+    private boolean fork( Properties properties, boolean showHeading, boolean showFooter )
+        throws SurefireBooterForkException
+    {
+        File surefireProperties;
+        File systemProperties = null;
+        try
+        {
+            surefireProperties = writePropertiesFile( "surefire", properties );
+            if ( forkConfiguration.getSystemProperties() != null )
+            {
+                systemProperties = writePropertiesFile( "surefire", forkConfiguration.getSystemProperties() );
+            }
+        }
+        catch ( IOException e )
+        {
+            throw new SurefireBooterForkException( "Error creating properties files for forking", e );
+        }
+
+        List bootClasspath = new ArrayList( surefireBootClassPathUrls.size() + classPathUrls.size() );
+
+        bootClasspath.addAll( surefireBootClassPathUrls );
+
+        if ( useSystemClassLoader() )
+        {
+            bootClasspath.addAll( classPathUrls );
+        }
+
+        Commandline cli = forkConfiguration.createCommandLine( bootClasspath, useSystemClassLoader() );
+
+        cli.createArgument().setFile( surefireProperties );
+
+        if ( systemProperties != null )
+        {
+            cli.createArgument().setFile( systemProperties );
+        }
+
+        StreamConsumer out = getForkingStreamConsumer( showHeading, showFooter, redirectTestOutputToFile );
+
+        StreamConsumer err = getForkingStreamConsumer( showHeading, showFooter, redirectTestOutputToFile );
+
+        if ( forkConfiguration.isDebug() )
+        {
+            System.out.println( "Forking command line: " + cli );
+        }
+
+        int returnCode;
+
+        try
+        {
+            returnCode = CommandLineUtils.executeCommandLine( cli, out, err );
+        }
+        catch ( CommandLineException e )
+        {
+            throw new SurefireBooterForkException( "Error while executing forked tests.", e );
+        }
+
+        if ( surefireProperties != null && surefireProperties.exists() )
+        {
+            FileInputStream inStream = null;
+            try
+            {
+                inStream = new FileInputStream( surefireProperties );
+
+                properties.load( inStream );
+            }
+            catch ( FileNotFoundException e )
+            {
+                throw new SurefireBooterForkException( "Unable to reload properties file from forked process", e );
+            }
+            catch ( IOException e )
+            {
+                throw new SurefireBooterForkException( "Unable to reload properties file from forked process", e );
+            }
+            finally
+            {
+                IOUtil.close( inStream );
+            }
+        }
+
+        return returnCode == 0;
+    }
+
+    private ClassLoader createClassLoader( List classPathUrls, ClassLoader parent )
+        throws MalformedURLException
+    {
+        return createClassLoader( classPathUrls, parent, false );
+    }
+
+    private ClassLoader createClassLoader( List classPathUrls, ClassLoader parent, boolean childDelegation )
+        throws MalformedURLException
+    {
+        List urls = new ArrayList();
+
+        for ( Iterator i = classPathUrls.iterator(); i.hasNext(); )
+        {
+            String url = (String) i.next();
+
+            if ( url != null )
+            {
+                File f = new File( url );
+                urls.add( UrlUtils.getURL( f ) );
+            }
+        }
+
+        IsolatedClassLoader classLoader = new IsolatedClassLoader( parent, childDelegation );
+        if ( assertionStatusMethod != null )
+        {
+            try
+            {
+                Object[] args = new Object[] { enableAssertions ? Boolean.TRUE : Boolean.FALSE };
+                if ( parent != null )
+                {
+                    assertionStatusMethod.invoke( parent, args );
+                }
+                assertionStatusMethod.invoke( classLoader, args );
+            }
+            catch ( IllegalAccessException e )
+            {
+                throw new NestedRuntimeException( "Unable to access the assertion enablement method", e );
+            }
+            catch ( InvocationTargetException e )
+            {
+                throw new NestedRuntimeException( "Unable to invoke the assertion enablement method", e );
+            }
+        }
+        for ( Iterator iter = urls.iterator(); iter.hasNext(); )
+        {
+            URL url = (URL) iter.next();
+            classLoader.addURL( url );
+        }
+        return classLoader;
+    }
+
+    private static List processStringList( String stringList )
+    {
+        String sl = stringList;
+
+        if ( sl.startsWith( "[" ) && sl.endsWith( "]" ) )
+        {
+            sl = sl.substring( 1, sl.length() - 1 );
+        }
+
+        List list = new ArrayList();
+
+        String[] stringArray = StringUtils.split( sl, "," );
+
+        for ( int i = 0; i < stringArray.length; i++ )
+        {
+            list.add( stringArray[i].trim() );
+        }
+        return list;
+    }
+
+    private static Properties loadProperties( File file )
+        throws IOException
+    {
+        Properties p = new Properties();
+
+        if ( file != null && file.exists() )
+        {
+            FileInputStream inStream = new FileInputStream( file );
+            try
+            {
+                p.load( inStream );
+            }
+            finally
+            {
+                IOUtil.close( inStream );
+            }
+        }
+
+        return p;
+    }
+
+    private static void setSystemProperties( File file )
+        throws IOException
+    {
+        Properties p = loadProperties( file );
+
+        for ( Iterator i = p.keySet().iterator(); i.hasNext(); )
+        {
+            String key = (String) i.next();
+
+            System.setProperty( key, p.getProperty( key ) );
+        }
+    }
+
+    private static Object[] constructParamObjects( String paramProperty, String typeProperty )
+    {
+        Object[] paramObjects = null;
+        if ( paramProperty != null )
+        {
+            // bit of a glitch that it need sto be done twice to do an odd number of vertical bars (eg |||, |||||).
+            String[] params =
+                StringUtils.split(
+                                   StringUtils.replace( StringUtils.replace( paramProperty, "||", "| |" ), "||", "| |" ),
+                                   "|" );
+            String[] types =
+                StringUtils.split(
+                                   StringUtils.replace( StringUtils.replace( typeProperty, "||", "| |" ), "||", "| |" ),
+                                   "|" );
+
+            paramObjects = new Object[params.length];
+
+            for ( int i = 0; i < types.length; i++ )
+            {
+                if ( types[i].trim().length() == 0 )
+                {
+                    params[i] = null;
+                }
+                else if ( types[i].equals( String.class.getName() ) )
+                {
+                    paramObjects[i] = params[i];
+                }
+                else if ( types[i].equals( File.class.getName() ) )
+                {
+                    paramObjects[i] = new File( params[i] );
+                }
+                else if ( types[i].equals( File[].class.getName() ) )
+                {
+                    List stringList = processStringList( params[i] );
+                    File[] fileList = new File[stringList.size()];
+                    for ( int j = 0; j < stringList.size(); j++ )
+                    {
+                        fileList[j] = new File( (String) stringList.get( j ) );
+                    }
+                    paramObjects[i] = fileList;
+                }
+                else if ( types[i].equals( ArrayList.class.getName() ) )
+                {
+                    paramObjects[i] = processStringList( params[i] );
+                }
+                else if ( types[i].equals( Boolean.class.getName() ) )
+                {
+                    paramObjects[i] = Boolean.valueOf( params[i] );
+                }
+                else if ( types[i].equals( Integer.class.getName() ) )
+                {
+                    paramObjects[i] = Integer.valueOf( params[i] );
+                }
+                else
+                {
+                    // TODO: could attempt to construct with a String constructor if needed
+                    throw new IllegalArgumentException( "Unknown parameter type: " + types[i] );
+                }
+            }
+        }
+        return paramObjects;
+    }
+
+    /**
+     * This method is invoked when Surefire is forked - this method parses and organizes the arguments passed to it and
+     * then calls the Surefire class' run method. <p/> The system exit code will be 1 if an exception is thrown.
+     * 
+     * @param args
+     */
+    public static void main( String[] args )
+        throws Throwable
+    {
+        // noinspection CatchGenericClass,OverlyBroadCatchBlock
+        try
+        {
+            if ( args.length > 1 )
+            {
+                setSystemProperties( new File( args[1] ) );
+            }
+
+            File surefirePropertiesFile = new File( args[0] );
+            Properties p = loadProperties( surefirePropertiesFile );
+            
+            SortedMap classPathUrls = new TreeMap();
+            
+            SortedMap surefireClassPathUrls = new TreeMap();
+
+            SurefireBooter surefireBooter = new SurefireBooter( true );
+
+            ForkConfiguration forkConfiguration = new ForkConfiguration();
+            forkConfiguration.setForkMode( "never" );
+            surefireBooter.setForkConfiguration( forkConfiguration );
+
+            for ( Enumeration e = p.propertyNames(); e.hasMoreElements(); )
+            {
+                String name = (String) e.nextElement();
+
+                if ( name.startsWith( REPORT_PROPERTY_PREFIX ) && !name.endsWith( PARAMS_SUFIX ) && !name.endsWith( TYPES_SUFIX ) )
+                {
+                    String className = p.getProperty( name );
+
+                    String params = p.getProperty( name + PARAMS_SUFIX );
+                    String types = p.getProperty( name + TYPES_SUFIX );
+                    surefireBooter.addReport( className, constructParamObjects( params, types ) );
+                }
+                else if ( name.startsWith( TEST_SUITE_PROPERTY_PREFIX ) && !name.endsWith( PARAMS_SUFIX ) && !name.endsWith( TYPES_SUFIX ) )
+                {
+                    String className = p.getProperty( name );
+
+                    String params = p.getProperty( name + PARAMS_SUFIX );
+                    String types = p.getProperty( name + TYPES_SUFIX );
+                    surefireBooter.addTestSuite( className, constructParamObjects( params, types ) );
+                }
+                else if ( name.startsWith( "classPathUrl." ) )
+                {
+                    classPathUrls.put(Integer.valueOf(name.substring(name.indexOf('.') + 1)), p.getProperty( name ));
+                }
+                else if ( name.startsWith( "surefireClassPathUrl." ) )
+                {
+                    surefireClassPathUrls.put(Integer.valueOf(name.substring(name.indexOf('.') + 1)), p.getProperty( name ));
+                }
+                else if ( name.startsWith( "surefireBootClassPathUrl." ) )
+                {
+                    surefireBooter.addSurefireBootClassPathUrl( p.getProperty( name ) );
+                }
+                else if ( "childDelegation".equals( name ) )
+                {
+                    surefireBooter.childDelegation =
+                        Boolean.valueOf( p.getProperty( "childDelegation" ) ).booleanValue();
+                }
+                else if ( "enableAssertions".equals( name ) )
+                {
+                    surefireBooter.enableAssertions =
+                        Boolean.valueOf( p.getProperty( "enableAssertions" ) ).booleanValue();
+                }
+                else if ( "useSystemClassLoader".equals( name ) )
+                {
+                    surefireBooter.forkConfiguration.setUseSystemClassLoader( Boolean.valueOf(
+                                                                                               p.getProperty( "useSystemClassLoader" ) ).booleanValue() );
+                }
+            }
+            
+            for (Iterator cpi = classPathUrls.keySet().iterator(); cpi.hasNext();) 
+            {
+                String url = (String) classPathUrls.get(cpi.next());
+                surefireBooter.addClassPathUrl(url);
+            }
+
+            for (Iterator scpi = surefireClassPathUrls.keySet().iterator(); scpi.hasNext();) 
+            {
+                String url = (String) surefireClassPathUrls.get(scpi.next());
+                surefireBooter.addSurefireClassPathUrl(url);
+            }
+            
+
+            String testSet = p.getProperty( "testSet" );
+            boolean result;
+            if ( testSet != null )
+            {
+                result = surefireBooter.runSuitesInProcess( testSet, p );
+            }
+            else
+            {
+                result = surefireBooter.runSuitesInProcess();
+            }
+
+            surefireBooter.writePropertiesFile( surefirePropertiesFile, "surefire", p );
+
+            // noinspection CallToSystemExit
+            System.exit( result ? TESTS_SUCCEEDED_EXIT_CODE : TESTS_FAILED_EXIT_CODE );
+        }
+        catch ( Throwable t )
+        {
+            // Just throwing does getMessage() and a local trace - we want to call printStackTrace for a full trace
+            // noinspection UseOfSystemOutOrSystemErr
+            t.printStackTrace( System.err );
+            // noinspection ProhibitedExceptionThrown,CallToSystemExit
+            System.exit( 1 );
+        }
+    }
+
+    public void setChildDelegation( boolean childDelegation )
+    {
+        this.childDelegation = childDelegation;
+    }
+
+    private StreamConsumer getForkingStreamConsumer( boolean showHeading, boolean showFooter,
+                                                     boolean redirectTestOutputToFile )
+    {
+        OutputConsumer outputConsumer = new StandardOutputConsumer();
+
+        if ( redirectTestOutputToFile )
+        {
+            outputConsumer = new FileOutputConsumerProxy( outputConsumer, getReportsDirectory() );
+        }
+
+        if ( !showHeading )
+        {
+            outputConsumer = new SupressHeaderOutputConsumerProxy( outputConsumer );
+        }
+        if ( !showFooter )
+        {
+            outputConsumer = new SupressFooterOutputConsumerProxy( outputConsumer );
+        }
+
+        return new ForkingStreamConsumer( outputConsumer );
+    }
+
+    public void setEnableAssertions( boolean enableAssertions )
+    {
+        this.enableAssertions = enableAssertions;
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,46 @@
+package org.apache.maven.surefire.booter;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.util.NestedCheckedException;
+
+/**
+ * Encapsulates exceptions thrown during Surefire forking.
+ *
+ * @version $Id$
+ */
+public class SurefireBooterForkException
+    extends NestedCheckedException
+{
+    public SurefireBooterForkException( String message )
+    {
+        super( message );
+    }
+
+    public SurefireBooterForkException( Throwable cause )
+    {
+        super( cause );
+    }
+
+    public SurefireBooterForkException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireExecutionException.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireExecutionException.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireExecutionException.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,36 @@
+package org.apache.maven.surefire.booter;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.util.NestedCheckedException;
+
+/**
+ * An error occurring during the invocation of Surefire via an alternate class loader.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ */
+public class SurefireExecutionException
+    extends NestedCheckedException
+{
+    public SurefireExecutionException( String message, Throwable nested )
+    {
+        super( message, nested );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxy.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxy.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxy.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,148 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.ReportEntry;
+import org.apache.maven.surefire.util.NestedRuntimeException;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+/**
+ * Surefire output consumer proxy that writes test output to a {@link File} for each test suite.
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ * @since 2.1
+ */
+public class FileOutputConsumerProxy
+    extends OutputConsumerProxy
+{
+
+    private static final String USER_DIR = System.getProperty( "user.dir" );
+
+    private static final String LINE_SEPARATOR = System.getProperty( "line.separator" );
+
+    private File reportsDirectory;
+
+    private PrintWriter printWriter;
+
+    /**
+     * Create a consumer that will write to a {@link File} for each test.
+     * Files will be saved in working directory.
+     */
+    public FileOutputConsumerProxy( OutputConsumer outputConsumer )
+    {
+        this( outputConsumer, new File( USER_DIR ) );
+    }
+
+    /**
+     * Create a consumer that will write to a {@link File} for each test
+     *
+     * @param reportsDirectory directory where files will be saved
+     */
+    public FileOutputConsumerProxy( OutputConsumer outputConsumer, File reportsDirectory )
+    {
+        super( outputConsumer );
+        this.setReportsDirectory( reportsDirectory );
+    }
+
+    /**
+     * Set the directory where reports will be saved
+     *
+     * @param reportsDirectory the directory
+     */
+    public void setReportsDirectory( File reportsDirectory )
+    {
+        this.reportsDirectory = reportsDirectory;
+    }
+
+    /**
+     * Get the directory where reports will be saved
+     */
+    public File getReportsDirectory()
+    {
+        return reportsDirectory;
+    }
+
+    /**
+     * Set the {@link PrintWriter} used for the current test suite
+     *
+     * @param writer
+     */
+    public void setPrintWriter( PrintWriter writer )
+    {
+        this.printWriter = writer;
+    }
+
+    /**
+     * Get the {@link PrintWriter} used for the current test suite
+     */
+    public PrintWriter getPrintWriter()
+    {
+        return printWriter;
+    }
+
+    public void testSetStarting( ReportEntry reportEntry )
+    {
+        if ( getPrintWriter() != null )
+        {
+            throw new IllegalStateException( "testSetStarting called twice" );
+        }
+        File file = new File( getReportsDirectory(), reportEntry.getName() + "-output.txt" );
+        try
+        {
+            setPrintWriter( new PrintWriter( new BufferedWriter( new FileWriter( file ) ) ) );
+        }
+        catch ( IOException e )
+        {
+            throw new NestedRuntimeException( e );
+        }
+        super.testSetStarting( reportEntry );
+    }
+
+    public void testSetCompleted()
+    {
+        if ( getPrintWriter() == null )
+        {
+            throw new IllegalStateException( "testSetCompleted called before testSetStarting" );
+        }
+        getPrintWriter().close();
+        setPrintWriter( null );
+        super.testSetCompleted();
+    }
+
+    /**
+     * Write the output to the current test file
+     */
+    public void consumeOutputLine( String line )
+    {
+        if ( getPrintWriter() == null )
+        {
+            throw new IllegalStateException( "consumeOutputLine called before testSetStarting" );
+        }
+        getPrintWriter().write( line );
+        getPrintWriter().write( LINE_SEPARATOR );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumer.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumer.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumer.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,77 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.ForkingConsoleReporter;
+import org.codehaus.plexus.util.cli.StreamConsumer;
+
+/**
+ * {@link StreamConsumer} that understands Surefire output made by {@link ForkingConsoleReporter}
+ * and filters it depending on configuration options
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ * @since 2.1
+ */
+public class ForkingStreamConsumer
+    implements StreamConsumer
+{
+    private static int STANDARD_PREFIX_LENGTH = ForkingConsoleReporter.FORKING_PREFIX_STANDARD.length();
+
+    private static int HEADING_PREFIX_LENGTH = ForkingConsoleReporter.FORKING_PREFIX_HEADING.length();
+
+    private static int FOOTER_PREFIX_LENGTH = ForkingConsoleReporter.FORKING_PREFIX_FOOTER.length();
+
+    private OutputConsumer outputConsumer;
+
+    public ForkingStreamConsumer( OutputConsumer outputConsumer )
+    {
+        this.outputConsumer = outputConsumer;
+    }
+
+    public void consumeLine( String line )
+    {
+        if ( line.startsWith( ForkingConsoleReporter.FORKING_PREFIX_HEADING ) )
+        {
+            outputConsumer.consumeHeaderLine( line.substring( HEADING_PREFIX_LENGTH ) );
+        }
+        else if ( line.startsWith( ForkingConsoleReporter.FORKING_PREFIX_STANDARD ) )
+        {
+            String message = line.substring( STANDARD_PREFIX_LENGTH );
+            if ( ForkingConsoleReporter.isTestSetStartingMessage( message ) )
+            {
+                outputConsumer.testSetStarting( ForkingConsoleReporter.parseTestSetStartingMessage( message ) );
+            }
+            else if ( ForkingConsoleReporter.isTestSetCompletedMessage( message ) )
+            {
+                outputConsumer.testSetCompleted();
+            }
+            outputConsumer.consumeMessageLine( message );
+        }
+        else if ( line.startsWith( ForkingConsoleReporter.FORKING_PREFIX_FOOTER ) )
+        {
+            outputConsumer.consumeFooterLine( line.substring( FOOTER_PREFIX_LENGTH ) );
+        }
+        else
+        {
+            outputConsumer.consumeOutputLine( line );
+        }
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/OutputConsumer.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/OutputConsumer.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/OutputConsumer.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,75 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.ReportEntry;
+
+/**
+ * Surefire output consumer that will be called from Surefire when forking tests to process
+ * the lines of the surefire header, messages, footer and test output from the forked Surefire execution.
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ * @since 2.1
+ */
+public interface OutputConsumer
+{
+
+    /**
+     * Process a line from Surefire header
+     *
+     * @param line the line to process
+     */
+    void consumeHeaderLine( String line );
+
+    /**
+     * Process a line with a Surefire message (not part of test output)
+     *
+     * @param line the line to process
+     */
+    void consumeMessageLine( String line );
+
+    /**
+     * Process a line from Surefire footer
+     *
+     * @param line the line to process
+     */
+    void consumeFooterLine( String line );
+
+    /**
+     * Process a line from test output
+     *
+     * @param line the line to process
+     */
+    void consumeOutputLine( String line );
+
+    /**
+     * This method will be called when a test set starts, before consuming surefire message lines.
+     *
+     * @param reportEntry The {@link ReportEntry} with the name and group (optional) of the test that starts
+     */
+    void testSetStarting( ReportEntry reportEntry );
+
+    /**
+     * This method will be called when a test set ends, after consuming all its surefire message lines.
+     */
+    void testSetCompleted();
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/OutputConsumerProxy.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/OutputConsumerProxy.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/OutputConsumerProxy.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,115 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.ReportEntry;
+
+/**
+ * Surefire output consumer that will delegate to another {@link OutputConsumer}
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ * @since 2.1
+ */
+public class OutputConsumerProxy
+    implements OutputConsumer
+{
+
+    private OutputConsumer outputConsumer;
+
+    /**
+     * Create a output consumer that will delegate all calls to the proxied output consumer
+     *
+     * @param outputConsumer output consumer to delegate to
+     */
+    public OutputConsumerProxy( OutputConsumer outputConsumer )
+    {
+        this.setOutputConsumer( outputConsumer );
+    }
+
+    /**
+     * {@link OutputConsumer} that calls will be delegated to
+     *
+     * @param outputConsumer the proxied {@link OutputConsumer}
+     */
+    public void setOutputConsumer( OutputConsumer outputConsumer )
+    {
+        this.outputConsumer = outputConsumer;
+    }
+
+    /**
+     * {@link OutputConsumer} that calls will be delegated to
+     *
+     * @return the proxied {@link OutputConsumer}
+     */
+    public OutputConsumer getOutputConsumer()
+    {
+        return outputConsumer;
+    }
+
+    /**
+     * Delegate to proxied {@link OutputConsumer}
+     */
+    public void consumeHeaderLine( String line )
+    {
+        getOutputConsumer().consumeHeaderLine( line );
+    }
+
+    /**
+     * Delegate to proxied {@link OutputConsumer}
+     */
+    public void consumeMessageLine( String line )
+    {
+        getOutputConsumer().consumeMessageLine( line );
+    }
+
+    /**
+     * Delegate to proxied {@link OutputConsumer}
+     */
+    public void consumeFooterLine( String line )
+    {
+        getOutputConsumer().consumeFooterLine( line );
+    }
+
+    /**
+     * Delegate to proxied {@link OutputConsumer}
+     */
+    public void consumeOutputLine( String line )
+    {
+        getOutputConsumer().consumeOutputLine( line );
+    }
+
+    /**
+     * Delegate to proxied {@link OutputConsumer}
+     */
+    public void testSetStarting( ReportEntry reportEntry )
+    {
+        getOutputConsumer().testSetStarting( reportEntry );
+    }
+
+    /**
+     * Delegate to proxied {@link OutputConsumer}
+     */
+    public void testSetCompleted()
+    {
+        getOutputConsumer().testSetCompleted();
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/PrintWriterOutputConsumer.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/PrintWriterOutputConsumer.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/PrintWriterOutputConsumer.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,122 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.ReportEntry;
+
+import java.io.PrintWriter;
+import java.io.Writer;
+
+/**
+ * Surefire output consumer that writes everything to a {@link Writer}
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ * @since 2.1
+ */
+public class PrintWriterOutputConsumer
+    implements OutputConsumer
+{
+
+    private PrintWriter printWriter;
+
+    /**
+     * Create a consumer uninitialized, {@link #setPrintWriter(PrintWriter)} must be called before using it
+     */
+    public PrintWriterOutputConsumer()
+    {
+    }
+
+    /**
+     * Create a consumer that will write to the specified {@link Writer}
+     *
+     * @param writer where to write to
+     */
+    public PrintWriterOutputConsumer( Writer writer )
+    {
+        this.setPrintWriter( new PrintWriter( writer ) );
+    }
+
+    /**
+     * Set the {@link PrintWriter} used by this object
+     *
+     * @param writer
+     */
+    public void setPrintWriter( PrintWriter writer )
+    {
+        this.printWriter = writer;
+    }
+
+    /**
+     * Get the {@link PrintWriter} used by this object
+     */
+    public PrintWriter getPrintWriter()
+    {
+        return printWriter;
+    }
+
+    public void consumeHeaderLine( String line )
+    {
+        write( line );
+    }
+
+    public void consumeMessageLine( String line )
+    {
+        write( line );
+    }
+
+    public void consumeFooterLine( String line )
+    {
+        write( line );
+    }
+
+    public void consumeOutputLine( String line )
+    {
+        write( line );
+    }
+
+    /**
+     * Do nothing
+     */
+    public void testSetStarting( ReportEntry reportEntry )
+    {
+        // do nothing
+    }
+
+    /**
+     * Do nothing
+     */
+    public void testSetCompleted()
+    {
+        // do nothing
+    }
+
+    /**
+     * Write a line and flush
+     *
+     * @param line
+     */
+    private void write( String line )
+    {
+        getPrintWriter().println( line );
+        getPrintWriter().flush();
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/StandardOutputConsumer.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/StandardOutputConsumer.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/StandardOutputConsumer.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,43 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.PrintWriter;
+
+/**
+ * Surefire output consumer that writes everything to {@link System#out}
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ * @since 2.1
+ */
+public class StandardOutputConsumer
+    extends PrintWriterOutputConsumer
+{
+
+    /**
+     * Create a consumer that will write to {@link System#out}
+     */
+    public StandardOutputConsumer()
+    {
+        setPrintWriter( new PrintWriter( System.out ) );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/SupressFooterOutputConsumerProxy.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/SupressFooterOutputConsumerProxy.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/SupressFooterOutputConsumerProxy.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,51 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Surefire output consumer that will take out the surefire footer
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ * @since 2.1
+ */
+public class SupressFooterOutputConsumerProxy
+    extends OutputConsumerProxy
+{
+
+    /**
+     * Create a consumer that will delegate all calls to the next filter but {@link #consumeFooterLine(String)}
+     *
+     * @param nextFilter filter to delegate to
+     */
+    public SupressFooterOutputConsumerProxy( OutputConsumer nextFilter )
+    {
+        super( nextFilter );
+    }
+
+    /**
+     * Do nothing
+     */
+    public void consumeFooterLine( String line )
+    {
+        /* do nothing */
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/SupressHeaderOutputConsumerProxy.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/SupressHeaderOutputConsumerProxy.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/SupressHeaderOutputConsumerProxy.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,51 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Surefire output consumer that will take out the surefire header
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ * @since 2.1
+ */
+public class SupressHeaderOutputConsumerProxy
+    extends OutputConsumerProxy
+{
+
+    /**
+     * Create a consumer that will delegate all calls to the next filter but {@link #consumeHeaderLine(String)}
+     *
+     * @param nextFilter filter to delegate to
+     */
+    public SupressHeaderOutputConsumerProxy( OutputConsumer nextFilter )
+    {
+        super( nextFilter );
+    }
+
+    /**
+     * Do nothing
+     */
+    public void consumeHeaderLine( String line )
+    {
+        /* do nothing */
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/CmdShell.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/CmdShell.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/CmdShell.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,57 @@
+package org.apache.maven.surefire.booter.shell;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * <p/>
+ * Class with patches copied from plexus-utils with fix for PLX-161,
+ * as we can not upgrade plexus-utils until it's upgraded in core Maven
+ * </p>
+ * <p/>
+ * TODO deprecate when plexus-utils 1.2 can be used
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ */
+public class CmdShell
+    extends Shell
+{
+    public CmdShell()
+    {
+        setShellCommand( "cmd.exe" );
+        setShellArgs( new String[]{"/X", "/C"} );
+    }
+
+    /**
+     * Specific implementation that quotes the all the command line
+     */
+    public List getCommandLine( String executable, String[] arguments )
+    {
+        StringBuffer sb = new StringBuffer();
+        sb.append( "\"" );
+        sb.append( super.getCommandLine( executable, arguments ).get( 0 ) );
+        sb.append( "\"" );
+
+        return Arrays.asList( new String[]{sb.toString()} );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/CommandShell.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/CommandShell.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/CommandShell.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,41 @@
+package org.apache.maven.surefire.booter.shell;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * <p/>
+ * Class with patches copied from plexus-utils with fix for PLX-161,
+ * as we can not upgrade plexus-utils until it's upgraded in core Maven
+ * </p>
+ * <p/>
+ * TODO deprecate when plexus-utils 1.2 can be used
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ */
+public class CommandShell
+    extends Shell
+{
+    public CommandShell()
+    {
+        setShellCommand( "command.com" );
+        setShellArgs( new String[]{"/C"} );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/Shell.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/Shell.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/Shell.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,152 @@
+package org.apache.maven.surefire.booter.shell;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.util.NestedRuntimeException;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.Commandline;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * <p/>
+ * Class with patches copied from plexus-utils with fix for PLX-161,
+ * as we can not upgrade plexus-utils until it's upgraded in core Maven
+ * </p>
+ * <p/>
+ * TODO deprecate when plexus-utils 1.2 can be used
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ */
+public class Shell
+{
+    private String shellCommand;
+
+    private String[] shellArgs;
+
+    /**
+     * Set the command to execute the shell (eg. COMMAND.COM, /bin/bash,...)
+     *
+     * @param shellCommand
+     */
+    public void setShellCommand( String shellCommand )
+    {
+        this.shellCommand = shellCommand;
+    }
+
+    /**
+     * Get the command to execute the shell
+     *
+     * @return
+     */
+    public String getShellCommand()
+    {
+        return shellCommand;
+    }
+
+    /**
+     * Set the shell arguments when calling a command line (not the executable arguments)
+     * (eg. /X /C for CMD.EXE)
+     *
+     * @param shellArgs
+     */
+    public void setShellArgs( String[] shellArgs )
+    {
+        this.shellArgs = shellArgs;
+    }
+
+    /**
+     * Get the shell arguments
+     *
+     * @return
+     */
+    public String[] getShellArgs()
+    {
+        return shellArgs;
+    }
+
+    /**
+     * Get the command line for the provided executable and arguments in this shell
+     *
+     * @param executable executable that the shell has to call
+     * @param arguments  arguments for the executable, not the shell
+     * @return List with one String object with executable and arguments quoted as needed
+     */
+    public List getCommandLine( String executable, String[] arguments )
+    {
+
+        List commandLine = new ArrayList();
+        try
+        {
+            StringBuffer sb = new StringBuffer();
+
+            if ( executable != null )
+            {
+                sb.append( Commandline.quoteArgument( executable ) );
+            }
+            for ( int i = 0; i < arguments.length; i++ )
+            {
+                sb.append( " " );
+                sb.append( Commandline.quoteArgument( arguments[i] ) );
+            }
+
+            commandLine.add( sb.toString() );
+        }
+        catch ( CommandLineException e )
+        {
+            throw new NestedRuntimeException( e );
+        }
+
+        return commandLine;
+    }
+
+    /**
+     * Get the full command line to execute, including shell command, shell arguments,
+     * executable and executable arguments
+     *
+     * @param executable executable that the shell has to call
+     * @param arguments  arguments for the executable, not the shell
+     * @return List of String objects, whose array version is suitable to be used as argument
+     *         of Runtime.getRuntime().exec()
+     */
+    public List getShellCommandLine( String executable, String[] arguments )
+    {
+
+        List commandLine = new ArrayList();
+
+        if ( getShellCommand() != null )
+        {
+            commandLine.add( getShellCommand() );
+        }
+
+        if ( getShellArgs() != null )
+        {
+            commandLine.addAll( Arrays.asList( getShellArgs() ) );
+        }
+
+        commandLine.addAll( getCommandLine( executable, arguments ) );
+
+        return commandLine;
+
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/AbstractOutputConsumerTestCase.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/AbstractOutputConsumerTestCase.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/AbstractOutputConsumerTestCase.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,120 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.TestCase;
+import org.apache.maven.surefire.report.ReportEntry;
+
+/**
+ * Test for {@link OutputConsumer}
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ */
+public abstract class AbstractOutputConsumerTestCase
+    extends TestCase
+{
+    private OutputConsumer outputConsumer;
+
+    private String line;
+
+    private ReportEntry reportEntry;
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        setLine( "line" );
+        setReportEntry( new ReportEntry() );
+        getReportEntry().setGroup( "group" );
+        getReportEntry().setName( "name" );
+    }
+
+    public void setOutputConsumer( OutputConsumer outputConsumer )
+    {
+        this.outputConsumer = outputConsumer;
+    }
+
+    public OutputConsumer getOutputConsumer()
+    {
+        return outputConsumer;
+    }
+
+    public void setLine( String line )
+    {
+        this.line = line;
+    }
+
+    public String getLine()
+    {
+        return line;
+    }
+
+    public void setReportEntry( ReportEntry reportEntry )
+    {
+        this.reportEntry = reportEntry;
+    }
+
+    public ReportEntry getReportEntry()
+    {
+        return reportEntry;
+    }
+
+    public void testConsumeHeaderLine()
+    {
+        getOutputConsumer().testSetStarting( getReportEntry() );
+        getOutputConsumer().consumeHeaderLine( getLine() );
+        getOutputConsumer().testSetCompleted();
+    }
+
+    public void testConsumeMessageLine()
+    {
+        getOutputConsumer().testSetStarting( getReportEntry() );
+        getOutputConsumer().consumeMessageLine( getLine() );
+        getOutputConsumer().testSetCompleted();
+    }
+
+    public void testConsumeFooterLine()
+    {
+        getOutputConsumer().testSetStarting( getReportEntry() );
+        getOutputConsumer().consumeFooterLine( getLine() );
+        getOutputConsumer().testSetCompleted();
+    }
+
+    public void testConsumeOutputLine()
+        throws Exception
+    {
+        getOutputConsumer().testSetStarting( getReportEntry() );
+        getOutputConsumer().consumeOutputLine( getLine() );
+        getOutputConsumer().testSetCompleted();
+    }
+
+    public void testTestSetStarting()
+    {
+        getOutputConsumer().testSetStarting( getReportEntry() );
+    }
+
+    public void testTestSetCompleted()
+    {
+        getOutputConsumer().testSetStarting( getReportEntry() );
+        getOutputConsumer().testSetCompleted();
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxyTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxyTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxyTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,84 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.jmock.core.constraint.IsEqual;
+import org.jmock.core.matcher.InvokeOnceMatcher;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+
+/**
+ * Test for {@link FileOutputConsumerProxy}
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ */
+public class FileOutputConsumerProxyTest
+    extends OutputConsumerProxyTest
+{
+
+    private static final String USER_DIR = System.getProperty( "user.dir" );
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        setOutputConsumer( new FileOutputConsumerProxy( (OutputConsumer) getOutputConsumerMock().proxy() ) );
+    }
+
+    public void testConsumeOutputLine()
+        throws Exception
+    {
+        File reportFile = new File( USER_DIR, getReportEntry().getName() + "-output.txt" );
+        reportFile.delete();
+
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetStarting" )
+            .with( new IsEqual( getReportEntry() ) );
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetCompleted" );
+        getOutputConsumer().testSetStarting( getReportEntry() );
+        getOutputConsumer().consumeOutputLine( getLine() );
+        getOutputConsumer().testSetCompleted();
+        getOutputConsumerMock().verify();
+
+        assertTrue( reportFile.exists() );
+
+        BufferedReader in = null;
+        try
+        {
+            in = new BufferedReader( new InputStreamReader( new FileInputStream( reportFile ) ) );
+            String content = in.readLine();
+            assertEquals( getLine(), content );
+            assertNull( in.readLine() );
+        }
+        finally
+        {
+            if ( in != null )
+            {
+                in.close();
+            }
+        }
+
+        reportFile.delete();
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumerTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumerTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumerTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,106 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.ForkingConsoleReporter;
+import org.apache.maven.surefire.report.ReportEntry;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+/**
+ * Test for {@link ForkingStreamConsumer}
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ */
+public class ForkingStreamConsumerTest
+    extends MockObjectTestCase
+{
+
+    private ForkingStreamConsumer streamConsumer;
+
+    private Mock outputConsumerMock;
+
+    private String message;
+
+    private ReportEntry reportEntry;
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        outputConsumerMock = new Mock( OutputConsumer.class );
+        streamConsumer = new ForkingStreamConsumer( (OutputConsumer) outputConsumerMock.proxy() );
+        message = "message";
+        reportEntry = new ReportEntry();
+        reportEntry.setGroup( "group" );
+        reportEntry.setName( "name" );
+    }
+
+    public void testConsumeHeaderLine()
+    {
+        String message = "message";
+        String line = ForkingConsoleReporter.FORKING_PREFIX_HEADING + message;
+        outputConsumerMock.expects( once() ).method( "consumeHeaderLine" ).with( eq( message ) );
+        streamConsumer.consumeLine( line );
+    }
+
+    public void testConsumeMessageLine()
+    {
+        String message = "message";
+        String line = ForkingConsoleReporter.FORKING_PREFIX_STANDARD + message;
+        outputConsumerMock.expects( once() ).method( "consumeMessageLine" ).with( eq( message ) );
+        streamConsumer.consumeLine( line );
+    }
+
+    public void testConsumeFooterLine()
+    {
+        String message = "message";
+        String line = ForkingConsoleReporter.FORKING_PREFIX_FOOTER + message;
+        outputConsumerMock.expects( once() ).method( "consumeFooterLine" ).with( eq( message ) );
+        streamConsumer.consumeLine( line );
+    }
+
+    public void testConsumeOutputLine()
+    {
+        String line = message;
+        outputConsumerMock.expects( once() ).method( "consumeOutputLine" ).with( eq( message ) );
+        streamConsumer.consumeLine( line );
+    }
+
+    public void testTestSetStarting()
+    {
+        message = ForkingConsoleReporter.getTestSetStartingMessage( reportEntry );
+        String line = ForkingConsoleReporter.FORKING_PREFIX_STANDARD + message;
+        outputConsumerMock.expects( once() ).method( "testSetStarting" ).with( eq( reportEntry ) );
+        outputConsumerMock.expects( once() ).method( "consumeMessageLine" ).with( eq( message ) );
+        streamConsumer.consumeLine( line );
+    }
+
+    public void testTestSetCompleted()
+    {
+        message = "Tests run: xxxx";
+        String line = ForkingConsoleReporter.FORKING_PREFIX_STANDARD + message;
+        outputConsumerMock.expects( once() ).method( "testSetCompleted" );
+        outputConsumerMock.expects( once() ).method( "consumeMessageLine" ).with( eq( message ) );
+        streamConsumer.consumeLine( line );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/OutputConsumerProxyTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/OutputConsumerProxyTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/OutputConsumerProxyTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,117 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.jmock.Mock;
+import org.jmock.core.constraint.IsEqual;
+import org.jmock.core.matcher.InvokeOnceMatcher;
+
+/**
+ * Test for {@link OutputConsumerProxy}
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ */
+public class OutputConsumerProxyTest
+    extends AbstractOutputConsumerTestCase
+{
+    private Mock outputConsumerMock;
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        setOutputConsumerMock( new Mock( OutputConsumer.class ) );
+        setOutputConsumer( new OutputConsumerProxy( (OutputConsumer) getOutputConsumerMock().proxy() ) );
+    }
+
+    public void setOutputConsumerMock( Mock outputConsumerMock )
+    {
+        this.outputConsumerMock = outputConsumerMock;
+    }
+
+    public Mock getOutputConsumerMock()
+    {
+        return outputConsumerMock;
+    }
+
+    public void testConsumeFooterLine()
+    {
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetStarting" )
+            .with( new IsEqual( getReportEntry() ) );
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "consumeFooterLine" )
+            .with( new IsEqual( getLine() ) );
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetCompleted" );
+        super.testConsumeFooterLine();
+        getOutputConsumerMock().verify();
+    }
+
+    public void testConsumeHeaderLine()
+    {
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetStarting" )
+            .with( new IsEqual( getReportEntry() ) );
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "consumeHeaderLine" )
+            .with( new IsEqual( getLine() ) );
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetCompleted" );
+        super.testConsumeHeaderLine();
+        getOutputConsumerMock().verify();
+    }
+
+    public void testConsumeMessageLine()
+    {
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetStarting" )
+            .with( new IsEqual( getReportEntry() ) );
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "consumeMessageLine" )
+            .with( new IsEqual( getLine() ) );
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetCompleted" );
+        super.testConsumeMessageLine();
+        getOutputConsumerMock().verify();
+    }
+
+    public void testConsumeOutputLine()
+        throws Exception
+    {
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetStarting" )
+            .with( new IsEqual( getReportEntry() ) );
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "consumeOutputLine" )
+            .with( new IsEqual( getLine() ) );
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetCompleted" );
+        super.testConsumeOutputLine();
+        getOutputConsumerMock().verify();
+    }
+
+    public void testTestSetStarting()
+    {
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetStarting" )
+            .with( new IsEqual( getReportEntry() ) );
+        super.testTestSetStarting();
+        getOutputConsumerMock().verify();
+    }
+
+    public void testTestSetCompleted()
+    {
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetStarting" )
+            .with( new IsEqual( getReportEntry() ) );
+        getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetCompleted" );
+        super.testTestSetCompleted();
+        getOutputConsumerMock().verify();
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/PrintWriterOutputConsumerTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/PrintWriterOutputConsumerTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/PrintWriterOutputConsumerTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,82 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.StringWriter;
+
+/**
+ * Test for {@link PrintWriterOutputConsumer}
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ */
+public class PrintWriterOutputConsumerTest
+    extends AbstractOutputConsumerTestCase
+{
+    private StringWriter writer;
+
+    private static final String LINE_SEPARATOR = System.getProperty( "line.separator" );
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        writer = new StringWriter();
+        setOutputConsumer( new PrintWriterOutputConsumer( writer ) );
+    }
+
+    public void testConsumeFooterLine()
+    {
+        super.testConsumeFooterLine();
+        assertEquals( this.getLine() + LINE_SEPARATOR, writer.toString() );
+    }
+
+    public void testConsumeHeaderLine()
+    {
+        super.testConsumeHeaderLine();
+        assertEquals( getLine() + LINE_SEPARATOR, writer.toString() );
+    }
+
+    public void testConsumeMessageLine()
+    {
+        super.testConsumeMessageLine();
+        assertEquals( getLine() + LINE_SEPARATOR, writer.toString() );
+    }
+
+    public void testConsumeOutputLine()
+        throws Exception
+    {
+        super.testConsumeOutputLine();
+        assertEquals( getLine() + LINE_SEPARATOR, writer.toString() );
+    }
+
+    public void testTestSetCompleted()
+    {
+        super.testTestSetCompleted();
+        assertEquals( "", writer.toString() );
+    }
+
+    public void testTestSetStarting()
+    {
+        super.testTestSetStarting();
+        assertEquals( "", writer.toString() );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/StandardOutputConsumerTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/StandardOutputConsumerTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/StandardOutputConsumerTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,39 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Test for {@link StandardOutputConsumer}
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ */
+public class StandardOutputConsumerTest
+    extends AbstractOutputConsumerTestCase
+{
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        setOutputConsumer( new StandardOutputConsumer() );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/SupressFooterOutputConsumerProxyTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/SupressFooterOutputConsumerProxyTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/SupressFooterOutputConsumerProxyTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,45 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Test for {@link SupressFooterOutputConsumerProxy}
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ */
+public class SupressFooterOutputConsumerProxyTest
+    extends OutputConsumerProxyTest
+{
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        setOutputConsumer( new SupressFooterOutputConsumerProxy( (OutputConsumer) getOutputConsumerMock().proxy() ) );
+    }
+
+    public void testConsumeFooterLine()
+    {
+        getOutputConsumer().consumeFooterLine( getLine() );
+        getOutputConsumerMock().verify();
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/SupressHeaderOutputConsumerProxyTest.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/SupressHeaderOutputConsumerProxyTest.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/SupressHeaderOutputConsumerProxyTest.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,45 @@
+package org.apache.maven.surefire.booter.output;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Test for {@link SupressHeaderOutputConsumerProxy}
+ *
+ * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
+ * @version $Id$
+ */
+public class SupressHeaderOutputConsumerProxyTest
+    extends OutputConsumerProxyTest
+{
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        setOutputConsumer( new SupressHeaderOutputConsumerProxy( (OutputConsumer) getOutputConsumerMock().proxy() ) );
+    }
+
+    public void testConsumeHeaderLine()
+    {
+        getOutputConsumer().consumeHeaderLine( getLine() );
+        getOutputConsumerMock().verify();
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>surefire</artifactId>
+    <groupId>org.apache.maven.surefire</groupId>
+    <version>2.4-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>surefire-providers</artifactId>
+  <packaging>pom</packaging>
+  <name>SureFire Providers</name>
+  <modules>
+    <module>surefire-junit</module>
+    <module>surefire-junit4</module>
+    <module>surefire-testng</module>
+  </modules>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.surefire</groupId>
+      <artifactId>surefire-api</artifactId>
+    </dependency>
+  </dependencies>
+</project>
+

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,36 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven.surefire</groupId>
+    <artifactId>surefire-providers</artifactId>
+    <version>2.4-SNAPSHOT</version>
+  </parent>
+  <artifactId>surefire-junit</artifactId>
+  <name>SureFire JUnit Runner</name>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+    </dependency>
+  </dependencies>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitDirectoryTestSuite.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitDirectoryTestSuite.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitDirectoryTestSuite.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,68 @@
+package org.apache.maven.surefire.junit;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.Test;
+import org.apache.maven.surefire.suite.AbstractDirectoryTestSuite;
+import org.apache.maven.surefire.testset.PojoTestSet;
+import org.apache.maven.surefire.testset.SurefireTestSet;
+import org.apache.maven.surefire.testset.TestSetFailedException;
+
+import java.io.File;
+import java.util.ArrayList;
+
+/**
+ * Test suite for JUnit tests based on a directory of Java test classes.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ */
+public class JUnitDirectoryTestSuite
+    extends AbstractDirectoryTestSuite
+{
+    public JUnitDirectoryTestSuite( File basedir, ArrayList includes, ArrayList excludes )
+    {
+        super( basedir, includes, excludes );
+    }
+
+    protected SurefireTestSet createTestSet( Class testClass, ClassLoader classLoader )
+        throws TestSetFailedException
+    {
+        Class junitClass = null;
+        try
+        {
+            junitClass = classLoader.loadClass( Test.class.getName() );
+        }
+        catch ( ClassNotFoundException e )
+        {
+            // ignore this
+        }
+
+        SurefireTestSet testSet;
+        if ( junitClass != null && junitClass.isAssignableFrom( testClass ) )
+        {
+            testSet = new JUnitTestSet( testClass );
+        }
+        else
+        {
+            testSet = new PojoTestSet( testClass );
+        }
+        return testSet;
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitStackTraceWriter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitStackTraceWriter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitStackTraceWriter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,36 @@
+package org.apache.maven.surefire.junit;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.PojoStackTraceWriter;
+
+/**
+ * Stack trace writer for JUnit tests.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ */
+public class JUnitStackTraceWriter
+    extends PojoStackTraceWriter
+{
+    public JUnitStackTraceWriter( String testClass, String testName, Throwable throwable )
+    {
+        super( testClass, testName, throwable );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,293 @@
+package org.apache.maven.surefire.junit;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.testset.AbstractTestSet;
+import org.apache.maven.surefire.testset.TestSetFailedException;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Proxy;
+
+public final class JUnitTestSet
+    extends AbstractTestSet
+{
+    public static final String TEST_CASE = "junit.framework.Test";
+
+    public static final String TEST_RESULT = "junit.framework.TestResult";
+
+    public static final String TEST_LISTENER = "junit.framework.TestListener";
+
+    public static final String TEST = "junit.framework.Test";
+
+    public static final String ADD_LISTENER_METHOD = "addListener";
+
+    public static final String RUN_METHOD = "run";
+
+    public static final String COUNT_TEST_CASES_METHOD = "countTestCases";
+
+    public static final String SETUP_METHOD = "setUp";
+
+    public static final String TEARDOWN_METHOD = "tearDown";
+
+    private static final String TEST_SUITE = "junit.framework.TestSuite";
+
+    private Class[] interfacesImplementedByDynamicProxy;
+
+    private Class testResultClass;
+
+    private Method addListenerMethod;
+
+    private Method countTestCasesMethod;
+
+    private Method runMethod;
+
+    private static final Class[] EMPTY_CLASS_ARRAY = new Class[0];
+
+    private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
+
+    public JUnitTestSet( Class testClass )
+        throws TestSetFailedException
+    {
+        super( testClass );
+
+        processTestClass();
+    }
+
+    private void processTestClass()
+        throws TestSetFailedException
+    {
+        try
+        {
+            Class testClass = getTestClass();
+            ClassLoader loader = testClass.getClassLoader();
+
+            testResultClass = loader.loadClass( TEST_RESULT );
+
+            Class testListenerInterface = loader.loadClass( TEST_LISTENER );
+
+            Class testInterface = loader.loadClass( TEST );
+
+            // ----------------------------------------------------------------------
+            // Strategy for executing JUnit tests
+            //
+            // o look for the suite method and if that is present execute that method
+            //   to get the test object.
+            //
+            // o look for test classes that are assignable from TestCase
+            //
+            // o look for test classes that only implement the Test interface
+            // ----------------------------------------------------------------------
+
+            interfacesImplementedByDynamicProxy = new Class[1];
+
+            interfacesImplementedByDynamicProxy[0] = testListenerInterface;
+
+            // The interface implemented by the dynamic proxy (TestListener), happens to be
+            // the same as the param types of TestResult.addTestListener
+            Class[] addListenerParamTypes = interfacesImplementedByDynamicProxy;
+
+            addListenerMethod = testResultClass.getMethod( ADD_LISTENER_METHOD, addListenerParamTypes );
+
+            if ( testInterface.isAssignableFrom( testClass ) )//testObject.getClass() ) )
+            {
+                countTestCasesMethod = testInterface.getMethod( COUNT_TEST_CASES_METHOD, EMPTY_CLASS_ARRAY );
+
+                runMethod = testInterface.getMethod( RUN_METHOD, new Class[]{testResultClass} );
+
+            }
+            else
+            {
+                countTestCasesMethod = testClass.getMethod( COUNT_TEST_CASES_METHOD, EMPTY_CLASS_ARRAY );
+
+                runMethod = testClass.getMethod( RUN_METHOD, new Class[]{testResultClass} );
+            }
+        }
+        catch ( ClassNotFoundException e )
+        {
+            throw new TestSetFailedException( "JUnit classes not available", e );
+        }
+        catch ( NoSuchMethodException e )
+        {
+            throw new TestSetFailedException( "Class is not a JUnit TestCase", e );
+        }
+    }
+
+    private static Object constructTestObject( Class testClass )
+        throws IllegalAccessException, InvocationTargetException, NoSuchMethodException, InstantiationException,
+        ClassNotFoundException
+    {
+        Object testObject = createInstanceFromSuiteMethod( testClass );
+
+        if ( testObject == null && testClass.getClassLoader().loadClass( TEST_CASE ).isAssignableFrom( testClass ) )
+        {
+            Class[] constructorParamTypes = {Class.class};
+
+            Constructor constructor =
+                testClass.getClassLoader().loadClass( TEST_SUITE ).getConstructor( constructorParamTypes );
+
+            Object[] constructorParams = {testClass};
+
+            testObject = constructor.newInstance( constructorParams );
+        }
+
+        if ( testObject == null )
+        {
+            Constructor testConstructor = getTestConstructor( testClass );
+
+            if ( testConstructor.getParameterTypes().length == 0 )
+            {
+                testObject = testConstructor.newInstance( EMPTY_OBJECT_ARRAY );
+            }
+            else
+            {
+                testObject = testConstructor.newInstance( new Object[]{testClass.getName()} );
+            }
+        }
+        return testObject;
+    }
+
+    private static Object createInstanceFromSuiteMethod( Class testClass )
+        throws IllegalAccessException, InvocationTargetException
+    {
+        Object testObject = null;
+        try
+        {
+            Method suiteMethod = testClass.getMethod( "suite", EMPTY_CLASS_ARRAY );
+
+            if ( Modifier.isPublic( suiteMethod.getModifiers() ) && Modifier.isStatic( suiteMethod.getModifiers() ) )
+            {
+                testObject = suiteMethod.invoke( null, EMPTY_CLASS_ARRAY );
+            }
+        }
+        catch ( NoSuchMethodException e )
+        {
+            // No suite method
+        }
+        return testObject;
+    }
+
+    public void execute( ReporterManager reportManager, ClassLoader loader )
+        throws TestSetFailedException
+    {
+        Class testClass = getTestClass();
+
+        try
+        {
+            Object testObject = constructTestObject( testClass );
+
+            Object instanceOfTestResult = testResultClass.newInstance();
+
+            TestListenerInvocationHandler invocationHandler =
+                new TestListenerInvocationHandler( reportManager, instanceOfTestResult, loader );
+
+            Object testListener =
+                Proxy.newProxyInstance( loader, interfacesImplementedByDynamicProxy, invocationHandler );
+
+            Object[] addTestListenerParams = {testListener};
+
+            addListenerMethod.invoke( instanceOfTestResult, addTestListenerParams );
+
+            Object[] runParams = {instanceOfTestResult};
+
+            runMethod.invoke( testObject, runParams );
+        }
+        catch ( IllegalArgumentException e )
+        {
+            throw new TestSetFailedException( testClass.getName(), e );
+        }
+        catch ( InstantiationException e )
+        {
+            throw new TestSetFailedException( testClass.getName(), e );
+        }
+        catch ( IllegalAccessException e )
+        {
+            throw new TestSetFailedException( testClass.getName(), e );
+        }
+        catch ( InvocationTargetException e )
+        {
+            throw new TestSetFailedException( testClass.getName(), e.getTargetException() );
+        }
+        catch ( ClassNotFoundException e )
+        {
+            throw new TestSetFailedException( "JUnit classes not available", e );
+        }
+        catch ( NoSuchMethodException e )
+        {
+            throw new TestSetFailedException( "Class is not a JUnit TestCase", e );
+        }
+    }
+
+    public int getTestCount()
+        throws TestSetFailedException
+    {
+        Class testClass = getTestClass();
+        try
+        {
+            Object testObject = constructTestObject( testClass );
+
+            Integer integer = (Integer) countTestCasesMethod.invoke( testObject, EMPTY_CLASS_ARRAY );
+
+            return integer.intValue();
+        }
+        catch ( IllegalAccessException e )
+        {
+            throw new TestSetFailedException( testClass.getName(), e );
+        }
+        catch ( IllegalArgumentException e )
+        {
+            throw new TestSetFailedException( testClass.getName(), e );
+        }
+        catch ( InvocationTargetException e )
+        {
+            throw new TestSetFailedException( testClass.getName(), e.getTargetException() );
+        }
+        catch ( InstantiationException e )
+        {
+            throw new TestSetFailedException( testClass.getName(), e );
+        }
+        catch ( ClassNotFoundException e )
+        {
+            throw new TestSetFailedException( "JUnit classes not available", e );
+        }
+        catch ( NoSuchMethodException e )
+        {
+            throw new TestSetFailedException( "Class is not a JUnit TestCase", e );
+        }
+    }
+
+    private static Constructor getTestConstructor( Class testClass )
+        throws NoSuchMethodException
+    {
+        Constructor constructor;
+        try
+        {
+            constructor = testClass.getConstructor( new Class[]{String.class} );
+        }
+        catch ( NoSuchMethodException e )
+        {
+            constructor = testClass.getConstructor( EMPTY_CLASS_ARRAY );
+        }
+        return constructor;
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,211 @@
+package org.apache.maven.surefire.junit;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.ReportEntry;
+import org.apache.maven.surefire.report.ReporterManager;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashSet;
+import java.util.Set;
+
+public class TestListenerInvocationHandler
+    implements InvocationHandler
+{
+    // The String names of the four methods in interface junit.framework.TestListener
+    private static final String START_TEST = "startTest";
+
+    private static final String ADD_FAILURE = "addFailure";
+
+    private static final String ADD_ERROR = "addError";
+
+    private static final String END_TEST = "endTest";
+
+    private Set failedTestsSet = new HashSet();
+
+    private ReporterManager reportManager;
+
+    private static final Class[] EMPTY_CLASS_ARRAY = new Class[]{};
+
+    private static final String[] EMPTY_STRING_ARRAY = new String[]{};
+
+    private static class FailedTest
+    {
+        private Object testThatFailed;
+
+        private Thread threadOnWhichTestFailed;
+
+        FailedTest( Object testThatFailed, Thread threadOnWhichTestFailed )
+        {
+            if ( testThatFailed == null )
+            {
+                throw new NullPointerException( "testThatFailed is null" );
+            }
+
+            if ( threadOnWhichTestFailed == null )
+            {
+                throw new NullPointerException( "threadOnWhichTestFailed is null" );
+            }
+
+            this.testThatFailed = testThatFailed;
+
+            this.threadOnWhichTestFailed = threadOnWhichTestFailed;
+        }
+
+        public boolean equals( Object obj )
+        {
+            boolean retVal = true;
+
+            if ( obj == null || getClass() != obj.getClass() )
+            {
+                retVal = false;
+            }
+            else
+            {
+                FailedTest ft = (FailedTest) obj;
+
+                if ( ft.testThatFailed != testThatFailed )
+                {
+                    retVal = false;
+                }
+                else if ( !ft.threadOnWhichTestFailed.equals( threadOnWhichTestFailed ) )
+                {
+                    retVal = false;
+                }
+            }
+
+            return retVal;
+        }
+
+        public int hashCode()
+        {
+            return threadOnWhichTestFailed.hashCode();
+        }
+    }
+
+    public TestListenerInvocationHandler( ReporterManager reportManager, Object instanceOfTestResult,
+                                          ClassLoader loader )
+    {
+        if ( reportManager == null )
+        {
+            throw new NullPointerException( "reportManager is null" );
+        }
+
+        if ( instanceOfTestResult == null )
+        {
+            throw new NullPointerException( "instanceOfTestResult is null" );
+        }
+
+        if ( loader == null )
+        {
+            throw new NullPointerException( "loader is null" );
+        }
+
+        this.reportManager = reportManager;
+    }
+
+    public Object invoke( Object proxy, Method method, Object[] args )
+        throws Throwable
+    {
+        String methodName = method.getName();
+
+        if ( methodName.equals( START_TEST ) )
+        {
+            handleStartTest( args );
+        }
+        else if ( methodName.equals( ADD_ERROR ) )
+        {
+            handleAddError( args );
+        }
+        else if ( methodName.equals( ADD_FAILURE ) )
+        {
+            handleAddFailure( args );
+        }
+        else if ( methodName.equals( END_TEST ) )
+        {
+            handleEndTest( args );
+        }
+
+        return null;
+    }
+
+    // Handler for TestListener.startTest(Test)
+    public void handleStartTest( Object[] args )
+    {
+        ReportEntry report = new ReportEntry( args[0], args[0].toString(), args[0].getClass().getName() );
+
+        reportManager.testStarting( report );
+    }
+
+    // Handler for TestListener.addFailure(Test, Throwable)
+    private void handleAddError( Object[] args )
+        throws IllegalAccessException, InvocationTargetException
+    {
+        ReportEntry report =
+            new ReportEntry( args[0], args[0].toString(), args[1].toString(), getStackTraceWriter( args ) );
+
+        reportManager.testError( report );
+
+        failedTestsSet.add( new FailedTest( args[0], Thread.currentThread() ) );
+    }
+
+    private JUnitStackTraceWriter getStackTraceWriter( Object[] args )
+        throws IllegalAccessException, InvocationTargetException
+    {
+        String testName;
+
+        try
+        {
+            Method m = args[0].getClass().getMethod( "getName", EMPTY_CLASS_ARRAY );
+            testName = (String) m.invoke( args[0], EMPTY_STRING_ARRAY );
+        }
+        catch ( NoSuchMethodException e )
+        {
+            testName = "UNKNOWN";
+        }
+
+        return new JUnitStackTraceWriter( args[0].getClass().getName(), testName, (Throwable) args[1] );
+    }
+
+    private void handleAddFailure( Object[] args )
+        throws IllegalAccessException, InvocationTargetException
+    {
+        ReportEntry report =
+            new ReportEntry( args[0], args[0].toString(), args[1].toString(), getStackTraceWriter( args ) );
+
+        reportManager.testFailed( report );
+
+        failedTestsSet.add( new FailedTest( args[0], Thread.currentThread() ) );
+    }
+
+    private void handleEndTest( Object[] args )
+    {
+        boolean testHadFailed = failedTestsSet.remove( new FailedTest( args[0], Thread.currentThread() ) );
+
+        if ( !testHadFailed )
+        {
+            ReportEntry report = new ReportEntry( args[0], args[0].toString(), args[0].getClass().getName() );
+
+            reportManager.testSucceeded( report );
+        }
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,53 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven.surefire</groupId>
+    <artifactId>surefire-providers</artifactId>
+    <version>2.4-SNAPSHOT</version>
+  </parent>
+  <artifactId>surefire-junit4</artifactId>
+  <name>SureFire JUnit4 Runner</name>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.0</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <fork>false</fork>
+          <compilerVersion>1.4</compilerVersion>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <jvm>${java.home}/bin/java</jvm>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4DirectoryTestSuite.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4DirectoryTestSuite.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4DirectoryTestSuite.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,59 @@
+package org.apache.maven.surefire.junit4;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.suite.AbstractDirectoryTestSuite;
+import org.apache.maven.surefire.testset.SurefireTestSet;
+import org.apache.maven.surefire.testset.TestSetFailedException;
+
+import java.io.File;
+import java.util.ArrayList;
+
+/**
+ * Test suite for JUnit4 based on a directory of Java test classes. This is
+ * capable of running both JUnit3 and JUnit4 test classes (I think).
+ *
+ * @author Karl M. Davis
+ */
+public class JUnit4DirectoryTestSuite
+    extends AbstractDirectoryTestSuite
+{
+    /**
+     * Constructor.
+     */
+    public JUnit4DirectoryTestSuite( File basedir, ArrayList includes, ArrayList excludes )
+    {
+        super( basedir, includes, excludes );
+    }
+
+    /**
+     * This method will be called for each class to be run as a test. It returns
+     * a surefire test set that will later be executed.
+     *
+     * @see org.apache.maven.surefire.suite.AbstractDirectoryTestSuite#createTestSet(java.lang.Class,
+     *java.lang.ClassLoader)
+     */
+    protected SurefireTestSet createTestSet( Class testClass, ClassLoader classLoader )
+        throws TestSetFailedException
+    {
+        return new JUnit4TestSet( testClass );
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4StackTraceWriter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4StackTraceWriter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4StackTraceWriter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,77 @@
+package org.apache.maven.surefire.junit4;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.StackTraceWriter;
+import org.junit.runner.notification.Failure;
+
+/**
+ * Writes out a specific {@link org.junit.runner.notification.Failure} for
+ * surefire as a stacktrace.
+ *
+ * @author Karl M. Davis
+ */
+public class JUnit4StackTraceWriter
+    implements StackTraceWriter
+{
+    // Member Variables
+    private Failure junitFailure;
+
+    /**
+     * Constructor.
+     *
+     * @param junitFailure the {@link Failure} that this will be operating on
+     */
+    public JUnit4StackTraceWriter( Failure junitFailure )
+    {
+        this.junitFailure = junitFailure;
+    }
+
+    /*
+      * (non-Javadoc)
+      *
+      * @see org.apache.maven.surefire.report.StackTraceWriter#writeTraceToString()
+      */
+    public String writeTraceToString()
+    {
+        return junitFailure.getTrace();
+    }
+
+    /**
+     * At the moment, returns the same as {@link #writeTraceToString()}.
+     *
+     * @see org.apache.maven.surefire.report.StackTraceWriter#writeTrimmedTraceToString()
+     */
+    public String writeTrimmedTraceToString()
+    {
+        return junitFailure.getTrace();
+    }
+
+    /**
+     * Returns the exception associated with this failure.
+     *
+     * @see org.apache.maven.surefire.report.StackTraceWriter#getThrowable()
+     */
+    public Throwable getThrowable()
+    {
+        return junitFailure.getException();
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSet.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSet.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSet.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,80 @@
+package org.apache.maven.surefire.junit4;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.testset.AbstractTestSet;
+import org.apache.maven.surefire.testset.TestSetFailedException;
+import org.junit.runner.Request;
+import org.junit.runner.Runner;
+import org.junit.runner.notification.RunListener;
+import org.junit.runner.notification.RunNotifier;
+
+public class JUnit4TestSet
+    extends AbstractTestSet
+{
+    // Member Variables
+    private Runner junitTestRunner;
+
+    /**
+     * Constructor.
+     *
+     * @param testClass the class to be run as a test
+     */
+    protected JUnit4TestSet( Class testClass )
+    {
+        super( testClass );
+
+        junitTestRunner = Request.aClass( testClass ).getRunner();
+    }
+
+    /**
+     * Actually runs the test and adds the tests results to the <code>reportManager</code>.
+     *
+     * @see org.apache.maven.surefire.testset.SurefireTestSet#execute(org.apache.maven.surefire.report.ReporterManager,java.lang.ClassLoader)
+     */
+    public void execute( ReporterManager reportManager, ClassLoader loader )
+        throws TestSetFailedException
+    {
+        RunNotifier fNotifier = new RunNotifier();
+        RunListener listener = new JUnit4TestSetReporter( this, reportManager );
+        fNotifier.addListener( listener );
+
+        try
+        {
+            junitTestRunner.run( fNotifier );
+        }
+        finally
+        {
+            fNotifier.removeListener( listener );
+        }
+    }
+
+    /**
+     * Returns the number of tests to be run in this class.
+     *
+     * @see org.apache.maven.surefire.testset.SurefireTestSet#getTestCount()
+     */
+    public int getTestCount()
+        throws TestSetFailedException
+    {
+        return junitTestRunner.testCount();
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSetReporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSetReporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSetReporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,160 @@
+package org.apache.maven.surefire.junit4;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.Surefire;
+import org.apache.maven.surefire.report.ReportEntry;
+import org.apache.maven.surefire.report.ReporterManager;
+import org.junit.runner.Description;
+import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+import org.junit.runner.notification.RunListener;
+
+import java.util.ResourceBundle;
+
+public class JUnit4TestSetReporter
+    extends RunListener
+{
+    // Constants
+    private static ResourceBundle bundle = ResourceBundle.getBundle( Surefire.SUREFIRE_BUNDLE_NAME );
+
+    // Member Variables
+    private JUnit4TestSet testSet;
+
+    private ReporterManager reportMgr;
+
+    /**
+     * This flag is set after a failure has occurred so that a <code>testSucceeded</code> event is not fired.  This is necessary because JUnit4 always fires a <code>testRunFinished</code> event-- even if there was a failure.
+     */
+    private boolean failureFlag;
+
+    /**
+     * Constructor.
+     *
+     * @param testSet       the specific test set that this will report on as it is
+     *                      executed
+     * @param reportManager the report manager to log testing events to
+     */
+    JUnit4TestSetReporter( JUnit4TestSet testSet, ReporterManager reportManager )
+    {
+        this.testSet = testSet;
+        this.reportMgr = reportManager;
+    }
+
+    /**
+     * Called right before any tests from a specific class are run.
+     *
+     * @see org.junit.runner.notification.RunListener#testRunStarted(org.junit.runner.Description)
+     */
+    public void testRunStarted( Description description )
+        throws Exception
+    {
+        String rawString = bundle.getString( "testSetStarting" );
+        ReportEntry report = new ReportEntry( testSet, testSet.getName(), rawString );
+
+        this.reportMgr.testSetStarting( report );
+    }
+
+    /**
+     * Called right after all tests from a specific class are run.
+     *
+     * @see org.junit.runner.notification.RunListener#testRunFinished(org.junit.runner.Result)
+     */
+    public void testRunFinished( Result result )
+        throws Exception
+    {
+        String rawString = bundle.getString( "testSetCompletedNormally" );
+        ReportEntry report = new ReportEntry( testSet, testSet.getName(), rawString );
+
+        this.reportMgr.testSetCompleted( report );
+        this.reportMgr.reset();
+    }
+
+    /**
+     * Called when a specific test has been skipped (for whatever reason).
+     *
+     * @see org.junit.runner.notification.RunListener#testIgnored(org.junit.runner.Description)
+     */
+    public void testIgnored( Description description )
+        throws Exception
+    {
+        String rawString = bundle.getString( "testSkipped" );
+        ReportEntry report = new ReportEntry( testSet, description.getDisplayName(), rawString );
+
+        this.reportMgr.testSkipped( report );
+    }
+
+    /**
+     * Called when a specific test has started.
+     *
+     * @see org.junit.runner.notification.RunListener#testStarted(org.junit.runner.Description)
+     */
+    public void testStarted( Description description )
+        throws Exception
+    {
+        String rawString = bundle.getString( "testStarting" );
+        ReportEntry report = new ReportEntry( testSet, description.getDisplayName(), rawString );
+
+        this.reportMgr.testStarting( report );
+
+        this.failureFlag = false;
+    }
+
+    /**
+     * Called when a specific test has failed.
+     *
+     * @see org.junit.runner.notification.RunListener#testFailure(org.junit.runner.notification.Failure)
+     */
+    public void testFailure( Failure failure )
+        throws Exception
+    {
+        String rawString = bundle.getString( "executeException" );
+        ReportEntry report =
+            new ReportEntry( testSet, failure.getTestHeader(), rawString, new JUnit4StackTraceWriter( failure ) );
+
+        if ( failure.getException() instanceof AssertionError )
+        {
+            this.reportMgr.testFailed( report );
+        }
+        else
+        {
+            this.reportMgr.testError( report );
+        }
+
+        failureFlag = true;
+    }
+
+    /**
+     * Called after a specific test has finished.
+     *
+     * @see org.junit.runner.notification.RunListener#testFinished(org.junit.runner.Description)
+     */
+    public void testFinished( Description description )
+        throws Exception
+    {
+        if ( failureFlag == false )
+        {
+            String rawString = bundle.getString( "testSuccessful" );
+            ReportEntry report = new ReportEntry( testSet, description.getDisplayName(), rawString );
+
+            this.reportMgr.testSucceeded( report );
+        }
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,84 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven.surefire</groupId>
+    <artifactId>surefire-providers</artifactId>
+    <version>2.4-SNAPSHOT</version>
+  </parent>
+  <artifactId>surefire-testng</artifactId>
+  <name>SureFire TestNG Runner</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact</artifactId>
+      <version>2.0</version>
+    </dependency>
+  </dependencies>
+  <profiles>
+    <profile>
+      <id>jdk14</id>
+      <activation>
+        <jdk>1.4</jdk>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.testng</groupId>
+          <artifactId>testng</artifactId>
+          <version>5.5</version>
+          <classifier>jdk14</classifier>
+        </dependency>
+      </dependencies>
+    </profile>
+    <profile>
+      <id>jdk15</id>
+      <activation>
+        <jdk>!1.4</jdk>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.testng</groupId>
+          <artifactId>testng</artifactId>
+          <version>5.5</version>
+          <classifier>jdk15</classifier>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <fork>false</fork>
+          <compilerVersion>1.4</compilerVersion>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <jvm>${java.home}/bin/java</jvm>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,101 @@
+package org.apache.maven.surefire.testng;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.versioning.ArtifactVersion;
+import org.apache.maven.surefire.report.ReporterException;
+import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.suite.AbstractDirectoryTestSuite;
+import org.apache.maven.surefire.testset.SurefireTestSet;
+import org.apache.maven.surefire.testset.TestSetFailedException;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Test suite for TestNG based on a directory of Java test classes. Can also execute JUnit tests.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ * @author <a href='mailto:the[dot]mindstorm[at]gmail[dot]com'>Alex Popescu</a>
+ */
+public class TestNGDirectoryTestSuite
+    extends AbstractDirectoryTestSuite
+{
+    private ArtifactVersion version;
+
+    private Map options;
+
+    private String testSourceDirectory;
+
+    public TestNGDirectoryTestSuite( File basedir, List includes, List excludes, String testSourceDirectory,
+                                     ArtifactVersion artifactVersion, Map confOptions )
+    {
+        super( basedir, includes, excludes );
+
+        this.options = confOptions;
+        this.testSourceDirectory = testSourceDirectory;
+        this.version = artifactVersion;
+    }
+
+    protected SurefireTestSet createTestSet( Class testClass, ClassLoader classLoader )
+    {
+        return new TestNGTestSet( testClass );
+    }
+
+    // single class test
+    public void execute( String testSetName, ReporterManager reporterManager, ClassLoader classLoader )
+        throws ReporterException, TestSetFailedException
+    {
+        if ( testSets == null )
+        {
+            throw new IllegalStateException( "You must call locateTestSets before calling execute" );
+        }
+        SurefireTestSet testSet = (SurefireTestSet) testSets.get( testSetName );
+
+        if ( testSet == null )
+        {
+            throw new TestSetFailedException( "Unable to find test set '" + testSetName + "' in suite" );
+        }
+
+        TestNGExecutor.run( new Class[]{testSet.getTestClass()}, this.testSourceDirectory, this.options, this.version,
+                            reporterManager, this );
+    }
+
+    public void execute( ReporterManager reporterManager, ClassLoader classLoader )
+        throws ReporterException, TestSetFailedException
+    {
+        if ( testSets == null )
+        {
+            throw new IllegalStateException( "You must call locateTestSets before calling execute" );
+        }
+
+        Class[] testClasses = new Class[testSets.size()];
+        int i = 0;
+        for ( Iterator it = testSets.values().iterator(); it.hasNext(); )
+        {
+            SurefireTestSet testSet = (SurefireTestSet) it.next();
+            testClasses[i++] = testSet.getTestClass();
+        }
+
+        TestNGExecutor.run( testClasses, this.testSourceDirectory, this.options, this.version, reporterManager, this );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,119 @@
+package org.apache.maven.surefire.testng;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.versioning.ArtifactVersion;
+import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
+import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.suite.SurefireTestSuite;
+import org.apache.maven.surefire.testng.conf.Configurator;
+import org.apache.maven.surefire.testng.conf.TestNG4751Configurator;
+import org.apache.maven.surefire.testng.conf.TestNG52Configurator;
+import org.apache.maven.surefire.testng.conf.TestNGMapConfigurator;
+import org.apache.maven.surefire.util.NestedRuntimeException;
+import org.testng.TestNG;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Contains utility methods for executing TestNG.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ * @author <a href='mailto:the[dot]mindstorm[at]gmail[dot]com'>Alex Popescu</a>
+ */
+public class TestNGExecutor
+{
+    private TestNGExecutor()
+    {
+    }
+
+    public static void run( Class[] testClasses, String testSourceDirectory, Map options, ArtifactVersion version,
+                            ReporterManager reportManager, SurefireTestSuite suite )
+    {
+        TestNG testng = new TestNG( false );
+        Configurator configurator = getConfigurator( version );
+        configurator.configure( testng, options );
+        postConfigure( testng, testSourceDirectory, reportManager, suite );
+
+        testng.setTestClasses( testClasses );
+        testng.run();
+    }
+
+    public static void run( List suiteFiles, String testSourceDirectory, Map options, ArtifactVersion version,
+                            ReporterManager reportManager, SurefireTestSuite suite )
+    {
+        TestNG testng = new TestNG( false );
+        Configurator configurator = getConfigurator( version );
+        configurator.configure( testng, options );
+        postConfigure( testng, testSourceDirectory, reportManager, suite );
+
+        testng.setTestSuites( suiteFiles );
+        testng.run();
+    }
+
+    private static Configurator getConfigurator( ArtifactVersion version )
+    {
+        try
+        {
+            VersionRange range = VersionRange.createFromVersionSpec( "[4.7,5.1]" );
+            if ( range.containsVersion( version ) )
+            {
+                return new TestNG4751Configurator();
+            }
+            range = VersionRange.createFromVersion( "5.2" );
+            if ( range.containsVersion( version ) )
+            {
+                return new TestNG52Configurator();
+            }
+            range = VersionRange.createFromVersionSpec( "[5.3,)" );
+            if ( range.containsVersion( version ) )
+            {
+                return new TestNGMapConfigurator();
+            }
+
+            throw new NestedRuntimeException( "Unknown TestNG version " + version );
+        }
+        catch ( InvalidVersionSpecificationException invsex )
+        {
+            throw new NestedRuntimeException( "Bug in plugin. Please report it with the attached stacktrace", invsex );
+        }
+    }
+
+
+    private static void postConfigure( TestNG testNG, String sourcePath, ReporterManager reportManager,
+                                       SurefireTestSuite suite )
+    {
+        // turn off all TestNG output
+        testNG.setVerbose( 0 );
+
+        TestNGReporter reporter = new TestNGReporter( reportManager, suite );
+        testNG.addListener( (Object) reporter );
+        // TODO: we should have the Profile so that we can decide if this is needed or not
+        if ( sourcePath != null )
+        {
+            testNG.setSourcePath( sourcePath );
+        }
+        // workaround for SUREFIRE-49
+        // TestNG always creates an output directory, and if not set the name for the directory is "null"
+        testNG.setOutputDirectory( System.getProperty( "java.io.tmpdir" ) );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,195 @@
+package org.apache.maven.surefire.testng;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.Surefire;
+import org.apache.maven.surefire.report.ReportEntry;
+import org.apache.maven.surefire.report.ReporterException;
+import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.suite.SurefireTestSuite;
+import org.testng.ISuite;
+import org.testng.ISuiteListener;
+import org.testng.ITestContext;
+import org.testng.ITestListener;
+import org.testng.ITestResult;
+import org.testng.TestNG;
+
+import java.util.ResourceBundle;
+
+/**
+ * Listens for and provides and adaptor layer so that
+ * TestNG tests can report their status to the current
+ * {@link org.apache.maven.surefire.report.ReporterManager}.
+ *
+ * @author jkuhnert
+ */
+public class TestNGReporter
+    implements ITestListener, ISuiteListener
+{
+    private ResourceBundle bundle = ResourceBundle.getBundle( Surefire.SUREFIRE_BUNDLE_NAME );
+
+    /**
+     * core Surefire reporting
+     */
+    protected ReporterManager reportManager;
+
+    private Object source;
+
+    /**
+     * Constructs a new instance that will listen to
+     * test updates from a {@link TestNG} class instance.
+     * <p/>
+     * <p/>It is assumed that the requisite {@link TestNG#addListener(ITestListener)}
+     * method call has already associated with this instance <i>before</i> the test
+     * suite is run.
+     *
+     * @param reportManager Instance to report suite status to
+     */
+    public TestNGReporter( ReporterManager reportManager, SurefireTestSuite source )
+    {
+        this.reportManager = reportManager;
+
+        if ( reportManager == null )
+        {
+            throw new IllegalArgumentException( "ReportManager passed in was null." );
+        }
+
+        this.source = source;
+    }
+
+    public void onTestStart( ITestResult result )
+    {
+        String rawString = bundle.getString( "testStarting" );
+        String group = groupString( result.getMethod().getGroups(), result.getTestClass().getName() );
+        ReportEntry report = new ReportEntry( source, getUserFriendlyTestName( result ), group, rawString );
+
+        reportManager.testStarting( report );
+    }
+
+    public void onTestSuccess( ITestResult result )
+    {
+        ReportEntry report =
+            new ReportEntry( source, getUserFriendlyTestName( result ), bundle.getString( "testSuccessful" ) );
+        reportManager.testSucceeded( report );
+    }
+
+    public void onTestFailure( ITestResult result )
+    {
+        String rawString = bundle.getString( "executeException" );
+
+        ReportEntry report = new ReportEntry( source, getUserFriendlyTestName( result ), rawString,
+                                              new TestNGStackTraceWriter( result ) );
+
+        reportManager.testFailed( report );
+    }
+
+    private static String getUserFriendlyTestName( ITestResult result )
+    {
+        // This is consistent with the JUnit output
+        return result.getName() + "(" + result.getTestClass().getName() + ")";
+    }
+
+    public void onTestSkipped( ITestResult result )
+    {
+        ReportEntry report =
+            new ReportEntry( source, getUserFriendlyTestName( result ), bundle.getString( "testSkipped" ) );
+
+        reportManager.testSkipped( report );
+    }
+
+    public void onTestFailedButWithinSuccessPercentage( ITestResult result )
+    {
+        String rawString = bundle.getString( "executeException" );
+
+        ReportEntry report = new ReportEntry( source, getUserFriendlyTestName( result ), rawString,
+                                              new TestNGStackTraceWriter( result ) );
+
+        reportManager.testError( report );
+    }
+
+    public void onStart( ITestContext context )
+    {
+        String rawString = bundle.getString( "testSetStarting" );
+
+        String group = groupString( context.getIncludedGroups(), context.getName() );
+
+        ReportEntry report = new ReportEntry( source, context.getName(), group, rawString );
+
+        try
+        {
+            reportManager.testSetStarting( report );
+        }
+        catch ( ReporterException e )
+        {
+            // TODO: remove this exception from the report manager
+        }
+    }
+
+    public void onFinish( ITestContext context )
+    {
+        String rawString = bundle.getString( "testSetCompletedNormally" );
+
+        ReportEntry report =
+            new ReportEntry( source, context.getName(), groupString( context.getIncludedGroups(), null ), rawString );
+
+        reportManager.testSetCompleted( report );
+
+        reportManager.reset();
+    }
+
+    public void onFinish( ISuite suite )
+    {
+    }
+
+    public void onStart( ISuite suite )
+    {
+    }
+
+    /**
+     * Creates a string out of the list of testng groups in the
+     * form of <pre>"group1,group2,group3"</pre>.
+     *
+     * @param groups
+     * @param defaultValue
+     */
+    private static String groupString( String[] groups, String defaultValue )
+    {
+        String retVal;
+        if ( groups != null && groups.length > 0 )
+        {
+            StringBuffer str = new StringBuffer();
+            for ( int i = 0; i < groups.length; i++ )
+            {
+                str.append( groups[i] );
+                if ( i + 1 < groups.length )
+                {
+                    str.append( "," );
+                }
+            }
+            retVal = str.toString();
+        }
+        else
+        {
+            retVal = defaultValue;
+        }
+        return retVal;
+    }
+
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGStackTraceWriter.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGStackTraceWriter.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGStackTraceWriter.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,70 @@
+package org.apache.maven.surefire.testng;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.PojoStackTraceWriter;
+import org.codehaus.plexus.util.StringUtils;
+import org.testng.ITestResult;
+
+/**
+ * Write out stack traces for TestNG.
+ *
+ * @author <a href="mailto:brett at apache.org">Brett Porter</a>
+ */
+public class TestNGStackTraceWriter
+    extends PojoStackTraceWriter
+{
+    public TestNGStackTraceWriter( ITestResult result )
+    {
+        super( result.getTestClass().getRealClass().getName(), result.getMethod().getMethodName(),
+               result.getThrowable() );
+    }
+
+    public String writeTrimmedTraceToString()
+    {
+        String text = writeTraceToString();
+
+        String marker = "at " + testClass + "." + testMethod;
+
+        String[] lines = StringUtils.split( text, "\n" );
+        int lastLine = lines.length - 1;
+        // skip first
+        for ( int i = 1; i < lines.length; i++ )
+        {
+            if ( lines[i].trim().startsWith( marker ) )
+            {
+                lastLine = i;
+            }
+        }
+
+        StringBuffer trace = new StringBuffer();
+        for ( int i = 0; i <= lastLine; i++ )
+        {
+            // if you call assertions from JUnit tests in TestNG, it ends up at the top of the trace
+            if ( !lines[i].trim().startsWith( "at junit.framework.Assert" ) )
+            {
+                trace.append( lines[i] );
+                trace.append( "\n" );
+            }
+        }
+
+        return trace.toString();
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGTestSet.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGTestSet.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGTestSet.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,56 @@
+package org.apache.maven.surefire.testng;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.testset.AbstractTestSet;
+import org.apache.maven.surefire.testset.TestSetFailedException;
+
+/**
+ * Main plugin point for running testng tests within the Surefire runtime
+ * infrastructure.
+ *
+ * @author jkuhnert
+ */
+public class TestNGTestSet
+    extends AbstractTestSet
+{
+    /**
+     * Creates a new test testset that will process the class being
+     * passed in to determine the testing configuration.
+     */
+    public TestNGTestSet( Class testClass )
+    {
+        super( testClass );
+    }
+
+    public int getTestCount()
+        throws TestSetFailedException
+    {
+        // TODO: need to get this from TestNG somehow
+        return 1;
+    }
+
+    public void execute( ReporterManager reportManager, ClassLoader loader )
+    {
+        throw new UnsupportedOperationException(
+            "This should have been called directly from TestNGDirectoryTestSuite" );
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,123 @@
+package org.apache.maven.surefire.testng;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.versioning.ArtifactVersion;
+import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
+import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.suite.SurefireTestSuite;
+import org.apache.maven.surefire.testset.TestSetFailedException;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Handles suite xml file definitions for TestNG.
+ *
+ * @author jkuhnert
+ * @author <a href='mailto:the[dot]mindstorm[at]gmail[dot]com'>Alex Popescu</a>
+ */
+public class TestNGXmlTestSuite
+    implements SurefireTestSuite
+{
+    private File[] suiteFiles;
+
+    private List suiteFilePaths;
+
+    private String testSourceDirectory;
+
+    private ArtifactVersion version;
+
+    private Map options = new HashMap();
+
+    // Not really used
+    private Map testSets;
+
+    /**
+     * Creates a testng testset to be configured by the specified
+     * xml file.
+     */
+    public TestNGXmlTestSuite( File[] suiteFiles, String testSourceDirectory, String artifactVersion )
+    {
+        this.suiteFiles = suiteFiles;
+
+        this.version = new DefaultArtifactVersion( artifactVersion );
+
+        this.testSourceDirectory = testSourceDirectory;
+    }
+
+    public void execute( ReporterManager reporterManager, ClassLoader classLoader )
+    {
+        if ( testSets == null )
+        {
+            throw new IllegalStateException( "You must call locateTestSets before calling execute" );
+        }
+
+        TestNGExecutor.run( this.suiteFilePaths, this.testSourceDirectory, this.options, this.version, reporterManager,
+                            this );
+    }
+
+    public void execute( String testSetName, ReporterManager reporterManager, ClassLoader classLoader )
+        throws TestSetFailedException
+    {
+        throw new TestSetFailedException( "Cannot run individual test when suite files are specified" );
+    }
+
+    public int getNumTests()
+    {
+        // TODO: this is not correct
+        return suiteFiles.length;
+    }
+
+    public Map locateTestSets( ClassLoader classLoader )
+        throws TestSetFailedException
+    {
+        if ( testSets != null )
+        {
+            throw new IllegalStateException( "You can't call locateTestSets twice" );
+        }
+
+        if ( this.suiteFiles == null )
+        {
+            throw new IllegalStateException( "No suite files were specified" );
+        }
+
+        this.testSets = new HashMap();
+        this.suiteFilePaths = new ArrayList();
+
+        for ( Iterator i = Arrays.asList( suiteFiles ).iterator(); i.hasNext(); )
+        {
+            File file = (File) i.next();
+            if ( !file.exists() || !file.isFile() )
+            {
+                throw new TestSetFailedException( "Suite file " + file + " is not a valid file" );
+            }
+            this.testSets.put( file, file.getAbsolutePath() );
+            this.suiteFilePaths.add( file.getAbsolutePath() );
+        }
+
+        return this.testSets;
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,114 @@
+package org.apache.maven.surefire.testng.conf;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.util.NestedRuntimeException;
+import org.testng.TestNG;
+
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+public abstract class AbstractDirectConfigurator
+    implements Configurator
+{
+    protected final Map setters;
+
+    protected AbstractDirectConfigurator()
+    {
+        Map options = new HashMap();
+        options.put( "groups", new Setter( "setGroups", String.class ) );
+        options.put( "excludedgroups", new Setter( "setExcludedGroups", String.class ) );
+        options.put( "junit", new Setter( "setJUnit", Boolean.class ) );
+        options.put( "threadcount", new Setter( "setThreadCount", int.class ) );
+        this.setters = options;
+    }
+
+    public void configure( TestNG testng, Map options )
+    {
+        for ( Iterator it = options.entrySet().iterator(); it.hasNext(); )
+        {
+            Map.Entry entry = (Map.Entry) it.next();
+            String key = (String) entry.getKey();
+            Object val = entry.getValue();
+
+            Setter setter = (Setter) setters.get( key );
+            if ( setter != null )
+            {
+                try
+                {
+                    setter.invoke( testng, val );
+                }
+                catch ( Exception ex )
+                {
+                    throw new NestedRuntimeException( "Cannot set option " + key + " with value " + val, ex );
+                }
+
+            }
+        }
+    }
+
+    public static final class Setter
+    {
+        private final String setterName;
+
+        private final Class paramClass;
+
+        public Setter( String name, Class clazz )
+        {
+            this.setterName = name;
+            this.paramClass = clazz;
+        }
+
+        public void invoke( Object target, Object value )
+            throws Exception
+        {
+            Method setter = target.getClass().getMethod( this.setterName, new Class[]{this.paramClass} );
+            if ( setter != null )
+            {
+                setter.invoke( target, new Object[]{convertValue( value )} );
+            }
+        }
+
+        protected Object convertValue( Object value )
+        {
+            if ( value == null )
+            {
+                return value;
+            }
+            if ( this.paramClass.isAssignableFrom( value.getClass() ) )
+            {
+                return value;
+            }
+
+            if ( Boolean.class.equals( this.paramClass ) || boolean.class.equals( this.paramClass ) )
+            {
+                return Boolean.valueOf( value.toString() );
+            }
+            if ( Integer.class.equals( this.paramClass ) || int.class.equals( this.paramClass ) )
+            {
+                return new Integer( value.toString() );
+            }
+
+            return value;
+        }
+    }
+}

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/Configurator.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/Configurator.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/Configurator.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,29 @@
+package org.apache.maven.surefire.testng.conf;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.testng.TestNG;
+
+import java.util.Map;
+
+public interface Configurator
+{
+    void configure( TestNG testng, Map options );
+}
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG4751Configurator.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG4751Configurator.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG4751Configurator.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,42 @@
+package org.apache.maven.surefire.testng.conf;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * TestNG 4.7 and 5.1 configurator.
+ * <p/>
+ * Allowed options:
+ * -groups
+ * -excludedgroups
+ * -junit (boolean)
+ * -threadcount (int)
+ * -parallel (boolean)
+ * <p/>
+ * Not supported yet:
+ * -setListenerClasses(List<Class>) or setListeners(List<Object>)
+ */
+public class TestNG4751Configurator
+    extends AbstractDirectConfigurator
+{
+    public TestNG4751Configurator()
+    {
+        setters.put( "parallel", new Setter( "setParallel", boolean.class ) );
+    }
+}
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG52Configurator.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG52Configurator.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG52Configurator.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,42 @@
+package org.apache.maven.surefire.testng.conf;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * TestNG 5.2 configurator.
+ * <p/>
+ * Allowed options:
+ * -groups
+ * -excludedgroups
+ * -junit (boolean)
+ * -threadcount (int)
+ * -parallel (String)
+ * <p/>
+ * Not supported yet:
+ * -setListenerClasses(List<Class>) or setListeners(List<Object>)
+ */
+public class TestNG52Configurator
+    extends AbstractDirectConfigurator
+{
+    public TestNG52Configurator()
+    {
+        setters.put( "parallel", new Setter( "setParallel", String.class ) );
+    }
+}
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,86 @@
+package org.apache.maven.surefire.testng.conf;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.testng.TestNG;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * TestNG configurator for 5.3+ versions. TestNG exposes
+ * a {@link org.testng.TestNG#configure(java.util.Map)} method.
+ * All suppported TestNG options are passed in String format, except
+ * <code>TestNGCommandLineArgs.LISTENER_COMMAND_OPT</code> which is <code>List<Class></code>
+ * and <code>TestNGCommandLineArgs.JUNIT_DEF_OPT</code> which is a <code>Boolean</code>.
+ * <p/>
+ * Test classes and/or suite files are not passed along as options parameters, but
+ * configured separately.
+ */
+public class TestNGMapConfigurator
+    implements Configurator
+{
+    public void configure( TestNG testng, Map options )
+    {
+        Map convertedOptions = new HashMap();
+        for ( Iterator it = options.entrySet().iterator(); it.hasNext(); )
+        {
+            Map.Entry entry = (Map.Entry) it.next();
+            String key = (String) entry.getKey();
+            Object val = entry.getValue();
+            if ( "junit".equals( key ) )
+            {
+                val = convert( val, Boolean.class );
+            }
+            else if ( "threadcount".equals( key ) )
+            {
+                val = convert( val, String.class );
+            }
+            convertedOptions.put( "-" + key, val );
+        }
+
+        testng.configure( convertedOptions );
+    }
+
+    protected Object convert( Object val, Class type )
+    {
+        if ( val == null )
+        {
+            return null;
+        }
+        if ( type.isAssignableFrom( val.getClass() ) )
+        {
+            return val;
+        }
+
+        if ( ( Boolean.class.equals( type ) || boolean.class.equals( type ) ) && String.class.equals( val.getClass() ) )
+        {
+            return Boolean.valueOf( (String) val );
+        }
+
+        if ( String.class.equals( type ) )
+        {
+            return val.toString();
+        }
+
+        return val;
+    }
+}
\ No newline at end of file

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/pom.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/pom.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/pom.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven.surefire</groupId>
+    <artifactId>surefire</artifactId>
+    <version>2.4-SNAPSHOT</version>
+  </parent>
+  <artifactId>surefire-site</artifactId>
+  <name>Surefire</name>
+  <distributionManagement>
+    <site>
+      <id>website</id>
+      <url>scpexe://minotaur.apache.org/www/maven.apache.org/surefire/</url>
+    </site>
+  </distributionManagement>
+</project>

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/css/maven-theme.css
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/css/maven-theme.css	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/css/maven-theme.css	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+body {
+    background-color: #fff;
+    font-family: Verdana, Helvetica, Arial, sans-serif;
+    margin-left: auto;
+    margin-right: auto;
+    background-repeat: repeat-y;
+    font-size: 13px;
+    padding: 0px;
+}
+
+td, select, input, li {
+    font-family: Verdana, Helvetica, Arial, sans-serif;
+    font-size: 12px;
+    color: #333333;
+}
+
+code {
+    font-size: 12px;
+}
+
+a {
+    text-decoration: none;
+}
+
+a:link {
+    color: #47a;
+}
+
+a:visited {
+    color: #666666;
+}
+
+a:active, a:hover {
+    color: #990000;
+}
+
+#legend li.externalLink {
+    background: url( ../images/external.png ) left top no-repeat;
+    padding-left: 18px;
+}
+
+a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
+    background: url( ../images/external.png ) right center no-repeat;
+    padding-right: 18px;
+}
+
+#legend li.newWindow {
+    background: url( ../images/newwindow.png ) left top no-repeat;
+    padding-left: 18px;
+}
+
+a.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
+    background: url( ../images/newwindow.png ) right center no-repeat;
+    padding-right: 18px;
+}
+
+h2 {
+    font-size: 17px;
+    color: #333333;
+}
+
+h3 {
+    padding: 4px 4px 4px 24px;
+    color: #666;
+    background-color: #ccc;
+    font-weight: bold;
+    font-size: 14px;
+    background-image: url( ../images/h3.jpg );
+    background-repeat: no-repeat;
+    background-position: left bottom;
+}
+
+p {
+    line-height: 1.3em;
+    font-size: 12px;
+    color: #000;
+}
+
+#breadcrumbs {
+    height: 13px;
+    background-image: url( ../images/breadcrumbs.jpg );
+    padding: 5px 10px 14px 20px;
+}
+
+* html #breadcrumbs {
+    padding-bottom: 8px;
+}
+
+#leftColumn {
+    margin: 10px 0 10px 0;
+    border-top-color: #ccc;
+    border-top-style: solid;
+    border-top-width: 1px;
+    border-right-color: #ccc;
+    border-right-style: solid;
+    border-right-width: 1px;
+    border-bottom-color: #ccc;
+    border-bottom-style: solid;
+    border-bottom-width: 1px;
+    padding-right: 5px;
+    padding-left: 5px;
+}
+
+#navcolumn h5 {
+    font-size: smaller;
+    border-bottom: 1px solid #aaaaaa;
+    padding-top: 2px;
+    padding-left: 9px;
+    color: #49635a;
+    background-image: url( ../images/h5.jpg );
+    background-repeat: no-repeat;
+    background-position: left bottom;
+}
+
+table.bodyTable th {
+    color: white;
+    background-color: #bbb;
+    text-align: left;
+    font-weight: bold;
+}
+
+table.bodyTable th, table.bodyTable td {
+    font-size: 11px;
+}
+
+table.bodyTable tr.a {
+    background-color: #ddd;
+}
+
+table.bodyTable tr.b {
+    background-color: #eee;
+}
+
+.source {
+    border: 1px solid #999;
+    overflow: auto
+}
+
+dt {
+    padding: 4px 4px 4px 24px;
+    color: #333333;
+    background-color: #ccc;
+    font-weight: bold;
+    font-size: 14px;
+    background-image: url( ../images/h3.jpg );
+    background-repeat: no-repeat;
+    background-position: left bottom;
+}
+
+.subsectionTitle {
+    font-size: 13px;
+    font-weight: bold;
+    color: #666;
+
+}
+
+table {
+    font-size: 10px;
+}
+
+.xright a:link, .xright a:visited, .xright a:active {
+    color: #666;
+}
+
+.xright a:hover {
+    color: #003300;
+}
+
+#banner {
+    height: 93px;
+    background: url( ../images/banner.jpg );
+}
+
+#navcolumn ul {
+    margin: 5px 0 15px -0em;
+}
+
+#navcolumn ul a {
+    color: #333333;
+}
+
+#navcolumn ul a:hover {
+    color: red;
+}
+
+#intro {
+    border: solid #ccc 1px;
+    margin: 6px 0px 0px 0px;
+    padding: 10px 40px 10px 40px;
+}
+
+.subsection {
+    margin-left: 3px;
+    color: #333333;
+}
+
+.subsection p {
+    font-size: 12px;
+}
+
+#footer {
+    padding: 10px;
+    margin: 20px 0px 20px 0px;
+    border-top: solid #ccc 1px;
+    color: #333333;
+}
+

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/apache-maven-project-2.png
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/apache-maven-project-2.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/banner.jpg
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/banner.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/bg.jpg
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/bg.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/breadcrumbs.jpg
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/breadcrumbs.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/collapsed.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/collapsed.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/expanded.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/expanded.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/h3.jpg
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/h3.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/h5.jpg
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/h5.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/logo_apache.jpg
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/logo_apache.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/logo_maven.jpg
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/logo_maven.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/maven-logo-2.gif
===================================================================
(Binary files differ)


Property changes on: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/resources/images/maven-logo-2.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/site.xml
===================================================================
--- labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/site.xml	                        (rev 0)
+++ labs/jbossbuild/maven-surefire-jboss/trunk/surefire-site/src/site/site.xml	2007-10-11 16:47:00 UTC (rev 15767)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project name="Doxia">
+  <bannerLeft>
+    <name>Surefire</name>
+    <src>http://maven.apache.org/images/apache-maven-project-2.png</src>
+    <href>http://maven.apache.org/surefire/</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://maven.apache.org/images/maven-logo-2.gif</src>
+  </bannerRight>
+  <body>
+    <links>
+      <item name="Apache" href="http://www.apache.org/"/>
+      <item name="Maven 1.x" href="http://maven.apache.org/maven-1.x"/>
+      <item name="Maven 2.x" href="http://maven.apache.org/"/>
+      <item name="Continuum" href="http://maven.apache.org/continuum"/>
+      <item name="SCM" href="http://maven.apache.org/scm"/>
+      <item name="Wagon" href="http://maven.apache.org/wagon"/>
+      <item name="JXR" href="http://maven.apache.org/jxr"/>
+      <item name="Doxia" href="http://maven.apache.org/doxia"/>
+    </links>
+    ${reports}
+  </body>
+</project>




More information about the jboss-svn-commits mailing list