Browse files

move surefire branches

git-svn-id: https://svn.apache.org/repos/asf/maven/sandbox/trunk@510036 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 785d34d commit 9a10397c49d2dc685c80866b5d32e6102799b255 @brettporter brettporter committed Feb 21, 2007
Showing with 0 additions and 17,857 deletions.
  1. +0 −172 surefire/patches/surefire-collaboration/maven-surefire-plugin/pom.xml
  2. +0 −43 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/pom.xml
  3. +0 −41 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test1/pom.xml
  4. +0 −66 ...atches/surefire-collaboration/maven-surefire-plugin/src/it/test1/src/test/java/SurefireTest1.java
  5. +0 −53 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test2/pom.xml
  6. +0 −66 ...atches/surefire-collaboration/maven-surefire-plugin/src/it/test2/src/test/java/SurefireTest2.java
  7. +0 −54 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test3/pom.xml
  8. +0 −36 ...atches/surefire-collaboration/maven-surefire-plugin/src/it/test3/src/test/java/SurefireTest3.java
  9. +0 −65 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test4/pom.xml
  10. +0 −30 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test4/src/test-data/testng.xml
  11. +0 −33 ...ches/surefire-collaboration/maven-surefire-plugin/src/it/test4/src/test/java/TestNGSuiteTest.java
  12. +0 −61 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test5/pom.xml
  13. +0 −42 ...es/surefire-collaboration/maven-surefire-plugin/src/it/test5/src/test/java/TestNGJavadocTest.java
  14. +0 −64 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test6/pom.xml
  15. +0 −52 ...e/patches/surefire-collaboration/maven-surefire-plugin/src/it/test6/src/test/java/TestNGTest.java
  16. +0 −65 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test7/pom.xml
  17. +0 −28 ...re/patches/surefire-collaboration/maven-surefire-plugin/src/it/test7/src/test/java/JunitTest.java
  18. +0 −31 ...ches/surefire-collaboration/maven-surefire-plugin/src/it/test7/src/test/java/TestNGJunitTest.java
  19. +0 −64 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test8/pom.xml
  20. +0 −52 ...e/patches/surefire-collaboration/maven-surefire-plugin/src/it/test8/src/test/java/TestNGTest.java
  21. +0 −849 ...boration/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
  22. +0 −34 ...efire-collaboration/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java
  23. +0 −40 ...fire/patches/surefire-collaboration/maven-surefire-plugin/src/site/apt/examples/class-loading.apt
  24. +0 −38 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/site/apt/examples/forking.apt
  25. +0 −76 ...atches/surefire-collaboration/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt
  26. +0 −19 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/site/apt/examples/single-test.apt
  27. +0 −39 ...fire/patches/surefire-collaboration/maven-surefire-plugin/src/site/apt/examples/skipping-test.apt
  28. +0 −65 .../patches/surefire-collaboration/maven-surefire-plugin/src/site/apt/examples/system-properties.apt
  29. +0 −100 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/site/apt/examples/testng.apt
  30. +0 −56 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/site/apt/index.apt
  31. +0 −16 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/site/apt/introduction.apt
  32. +0 −100 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/site/apt/testng.apt
  33. +0 −51 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/site/apt/usage.apt
  34. +0 −44 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/site/fml/faq.fml
  35. +0 −40 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/site/site.xml
  36. +0 −108 surefire/patches/surefire-collaboration/maven-surefire-report-plugin/pom.xml
  37. +0 −97 ...surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestCase.java
  38. +0 −319 ...urefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestSuite.java
  39. +0 −704 ...report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
  40. +0 −199 ...fire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java
  41. +0 −37 ...-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportOnlyMojo.java
  42. +0 −275 ...re-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java
  43. +0 −15 ...refire-collaboration/maven-surefire-report-plugin/src/main/resources/META-INF/maven/lifecycle.xml
  44. +0 −18 ...surefire-collaboration/maven-surefire-report-plugin/src/main/resources/surefire-report.properties
  45. +0 −51 ...urefire-collaboration/maven-surefire-report-plugin/src/site/apt/examples/changing-report-name.apt
  46. +0 −82 ...s/surefire-collaboration/maven-surefire-report-plugin/src/site/apt/examples/cross-referencing.apt
  47. +0 −70 ...efire-collaboration/maven-surefire-report-plugin/src/site/apt/examples/report-custom-location.apt
  48. +0 −56 ...tches/surefire-collaboration/maven-surefire-report-plugin/src/site/apt/examples/show-failures.apt
  49. +0 −61 surefire/patches/surefire-collaboration/maven-surefire-report-plugin/src/site/apt/index.apt
  50. +0 −64 surefire/patches/surefire-collaboration/maven-surefire-report-plugin/src/site/apt/usage.apt
  51. +0 −32 surefire/patches/surefire-collaboration/maven-surefire-report-plugin/src/site/fml/faq.fml
  52. BIN ...surefire-collaboration/maven-surefire-report-plugin/src/site/resources/images/failure-details.PNG
  53. BIN ...urefire-collaboration/maven-surefire-report-plugin/src/site/resources/images/surefire-sample1.PNG
  54. BIN ...urefire-collaboration/maven-surefire-report-plugin/src/site/resources/images/surefire-sample2.PNG
  55. BIN ...re/patches/surefire-collaboration/maven-surefire-report-plugin/src/site/resources/images/xref.PNG
  56. +0 −34 surefire/patches/surefire-collaboration/maven-surefire-report-plugin/src/site/site.xml
  57. +0 −65 ...fire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/ReportTestCaseTest.java
  58. +0 −98 ...ire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/ReportTestSuiteTest.java
  59. +0 −159 ...-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
  60. +0 −224 ...eport-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportParserTest.java
  61. +0 −48 ...gin/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub.java
  62. +0 −37 ...in/src/test/java/org/apache/maven/plugins/surefire/report/stubs/SurefireRepMavenProjectStub2.java
  63. +0 −230 ...collaboration/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-NoPackageTest.xml
  64. +0 −69 ...boration/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-NoTimeTestCaseTest.xml
  65. +0 −176 ...ration/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-com.shape.CircleTest.xml
  66. +0 −118 ...oration/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-com.shape.PointTest.xml
  67. +0 −122 ...llaboration/maven-surefire-report-plugin/src/test/resources/test-reports/com.shape.CircleTest.txt
  68. +0 −122 ...ration/maven-surefire-report-plugin/src/test/resources/test-reports/com.shapeclone.CircleTest.txt
  69. +0 −18 ...fire-report-plugin/src/test/resources/unit/basic-surefire-report-linkxref-false/plugin-config.xml
  70. +0 −176 ...esources/unit/basic-surefire-report-linkxref-false/surefire-reports/TEST-com.shape.CircleTest.xml
  71. +0 −18 ...fire-report-plugin/src/test/resources/unit/basic-surefire-report-reporting-null/plugin-config.xml
  72. +0 −176 ...esources/unit/basic-surefire-report-reporting-null/surefire-reports/TEST-com.shape.CircleTest.xml
  73. +0 −18 ...efire-report-plugin/src/test/resources/unit/basic-surefire-report-success-false/plugin-config.xml
  74. +0 −176 ...resources/unit/basic-surefire-report-success-false/surefire-reports/TEST-com.shape.CircleTest.xml
  75. +0 −18 ...maven-surefire-report-plugin/src/test/resources/unit/basic-surefire-report-test/plugin-config.xml
  76. +0 −176 ...src/test/resources/unit/basic-surefire-report-test/surefire-reports/TEST-com.shape.CircleTest.xml
  77. +0 −144 surefire/patches/surefire-collaboration/pom.xml
  78. +0 −31 surefire/patches/surefire-collaboration/src/site/apt/maven-surefire-plugin/index.apt
  79. +0 −31 surefire/patches/surefire-collaboration/src/site/apt/maven-surefire-report-plugin/index.apt
  80. +0 −63 surefire/patches/surefire-collaboration/src/site/site.xml
  81. +0 −29 surefire/patches/surefire-collaboration/surefire-api/pom.xml
  82. +0 −260 ...patches/surefire-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/Surefire.java
  83. +0 −318 ...-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireAssert.java
  84. +0 −45 ...efire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireAssertionFailedException.java
  85. +0 −114 ...ire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireComparisonFailureException.java
  86. +0 −156 ...boration/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java
  87. +0 −81 ...llaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractFileReporter.java
  88. +0 −231 ...e-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java
  89. +0 −196 ...llaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractTextReporter.java
  90. +0 −33 ...llaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefConsoleReporter.java
  91. +0 −34 ...-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefFileReporter.java
  92. +0 −32 ...re-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleReporter.java
  93. +0 −32 ...boration/surefire-api/src/main/java/org/apache/maven/surefire/report/DetailedConsoleReporter.java
  94. +0 −34 ...efire-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/FileReporter.java
  95. +0 −78 ...aboration/surefire-api/src/main/java/org/apache/maven/surefire/report/ForkingConsoleReporter.java
  96. +0 −99 ...llaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/PojoStackTraceWriter.java
  97. +0 −175 ...refire-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java
  98. +0 −130 .../surefire-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java
  99. +0 −33 ...-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterException.java
  100. +0 −413 ...re-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java
  101. +0 −46 ...e-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/StackTraceWriter.java
  102. +0 −286 ...refire-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/report/XMLReporter.java
  103. +0 −224 ...ration/surefire-api/src/main/java/org/apache/maven/surefire/suite/AbstractDirectoryTestSuite.java
  104. +0 −44 ...e-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/suite/SurefireTestSuite.java
  105. +0 −46 ...e-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/testset/AbstractTestSet.java
  106. +0 −296 ...efire-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/testset/PojoTestSet.java
  107. +0 −32 ...e-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/testset/SurefireTestSet.java
  108. +0 −74 ...boration/surefire-api/src/main/java/org/apache/maven/surefire/testset/TestSetFailedException.java
  109. +0 −222 ...llaboration/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedCheckedException.java
  110. +0 −240 ...llaboration/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedRuntimeException.java
  111. +0 −250 ...collaboration/surefire-api/src/main/java/org/apache/maven/surefire/util/PrettyPrintXMLWriter.java
  112. +0 −64 ...s/surefire-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/util/TeeStream.java
  113. +0 −82 ...es/surefire-collaboration/surefire-api/src/main/java/org/apache/maven/surefire/util/UrlUtils.java
  114. +0 −24 ...efire-collaboration/surefire-api/src/main/resources/org/apache/maven/surefire/surefire.properties
  115. +0 −39 ...tches/surefire-collaboration/surefire-api/src/test/java/org/apache/maven/surefire/DummySuite.java
  116. +0 −39 ...s/surefire-collaboration/surefire-api/src/test/java/org/apache/maven/surefire/JUnitTestSuite.java
  117. +0 −34 ...patches/surefire-collaboration/surefire-api/src/test/java/org/apache/maven/surefire/POJOTest.java
  118. +0 −38 .../surefire-collaboration/surefire-api/src/test/java/org/apache/maven/surefire/ReportEntryTest.java
  119. +0 −49 .../surefire-collaboration/surefire-api/src/test/java/org/apache/maven/surefire/SimpleJUnitTest.java
  120. +0 −47 ...ches/surefire-collaboration/surefire-api/src/test/java/org/apache/maven/surefire/SysUnitTest.java
  121. +0 −121 ...tches/surefire-collaboration/surefire-api/src/test/java/org/apache/maven/surefire/TestReport.java
  122. +0 −46 ...ire/patches/surefire-collaboration/surefire-api/src/test/java/org/apache/maven/surefire/User.java
  123. +0 −97 ...tion/surefire-api/src/test/java/org/apache/maven/surefire/report/AbstractConsoleReporterTest.java
  124. +0 −37 ...ation/surefire-api/src/test/java/org/apache/maven/surefire/report/ForkingConsoleReporterTest.java
  125. +0 −68 ...re-collaboration/surefire-api/src/test/java/org/apache/maven/surefire/report/XMLReporterTest.java
  126. +0 −49 ...refire-api/src/test/java/org/apache/maven/surefire/suite/directory/a/DirectoryJUnitTestSuite.java
  127. +0 −48 ...ration/surefire-api/src/test/java/org/apache/maven/surefire/suite/directory/a/JUnitTestSuite.java
  128. +0 −49 ...refire-api/src/test/java/org/apache/maven/surefire/suite/directory/b/DirectoryJUnitTestSuite.java
  129. +0 −48 ...ration/surefire-api/src/test/java/org/apache/maven/surefire/suite/directory/b/JUnitTestSuite.java
  130. +0 −66 ...urefire-collaboration/surefire-api/src/test/java/org/apache/maven/surefire/util/UrlUtilsTest.java
  131. +0 −58 surefire/patches/surefire-collaboration/surefire-booter/pom.xml
  132. +0 −116 ...ire-collaboration/surefire-booter/src/main/java/org/apache/maven/surefire/booter/Commandline.java
  133. +0 −252 ...llaboration/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkConfiguration.java
  134. +0 −88 ...n/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkingWriterStreamConsumer.java
  135. +0 −105 ...aboration/surefire-booter/src/main/java/org/apache/maven/surefire/booter/IsolatedClassLoader.java
  136. +0 −862 ...-collaboration/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java
  137. +0 −43 ...n/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java
  138. +0 −33 ...on/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireExecutionException.java
  139. +0 −145 ...urefire-booter/src/main/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxy.java
  140. +0 −74 .../surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumer.java
  141. +0 −72 ...oration/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/OutputConsumer.java
  142. +0 −112 ...on/surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/OutputConsumerProxy.java
  143. +0 −119 ...efire-booter/src/main/java/org/apache/maven/surefire/booter/output/PrintWriterOutputConsumer.java
  144. +0 −40 ...surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/StandardOutputConsumer.java
  145. +0 −48 ...ooter/src/main/java/org/apache/maven/surefire/booter/output/SupressFooterOutputConsumerProxy.java
  146. +0 −48 ...ooter/src/main/java/org/apache/maven/surefire/booter/output/SupressHeaderOutputConsumerProxy.java
  147. +0 −54 ...-collaboration/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/CmdShell.java
  148. +0 −38 ...laboration/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/CommandShell.java
  149. +0 −149 ...ire-collaboration/surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/Shell.java
  150. +0 −119 ...fire-booter/src/test/java/org/apache/maven/surefire/booter/output/AbstractOutputConsumerTest.java
  151. +0 −81 ...ire-booter/src/test/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxyTest.java
  152. +0 −103 ...efire-booter/src/test/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumerTest.java
  153. +0 −114 ...urefire-booter/src/test/java/org/apache/maven/surefire/booter/output/OutputConsumerProxyTest.java
  154. +0 −78 ...e-booter/src/test/java/org/apache/maven/surefire/booter/output/PrintWriterOutputConsumerTest.java
  155. +0 −36 ...fire-booter/src/test/java/org/apache/maven/surefire/booter/output/StandardOutputConsumerTest.java
  156. +0 −42 ...r/src/test/java/org/apache/maven/surefire/booter/output/SupressFooterOutputConsumerProxyTest.java
  157. +0 −42 ...r/src/test/java/org/apache/maven/surefire/booter/output/SupressHeaderOutputConsumerProxyTest.java
  158. +0 −44 surefire/patches/surefire-collaboration/surefire-providers/pom.xml
  159. +0 −33 surefire/patches/surefire-collaboration/surefire-providers/surefire-junit/pom.xml
  160. +0 −65 ...oviders/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitDirectoryTestSuite.java
  161. +0 −33 ...providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitStackTraceWriter.java
  162. +0 −290 ...surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java
  163. +0 −208 ...s/surefire-junit/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java
  164. +0 −50 surefire/patches/surefire-collaboration/surefire-providers/surefire-junit4/pom.xml
  165. +0 −40 ...ders/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4DirectoryTestSuite.java
  166. +0 −58 ...viders/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4StackTraceWriter.java
  167. +0 −59 ...efire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSet.java
  168. +0 −129 ...oviders/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSetReporter.java
  169. +0 −73 surefire/patches/surefire-collaboration/surefire-providers/surefire-testng/pom.xml
  170. +0 −196 ...ders/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java
  171. +0 −69 ...fire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java
  172. +0 −192 ...fire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java
  173. +0 −67 ...viders/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGStackTraceWriter.java
  174. +0 −53 ...efire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGTestSet.java
  175. +0 −158 ...-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java
  176. +0 −18 surefire/patches/surefire-collaboration/surefire-site/pom.xml
  177. +0 −179 surefire/patches/surefire-collaboration/surefire-site/src/site/resources/css/maven-theme.css
  178. BIN ...patches/surefire-collaboration/surefire-site/src/site/resources/images/apache-maven-project-2.png
  179. BIN surefire/patches/surefire-collaboration/surefire-site/src/site/resources/images/banner.jpg
  180. BIN surefire/patches/surefire-collaboration/surefire-site/src/site/resources/images/bg.jpg
  181. BIN surefire/patches/surefire-collaboration/surefire-site/src/site/resources/images/breadcrumbs.jpg
  182. BIN surefire/patches/surefire-collaboration/surefire-site/src/site/resources/images/collapsed.gif
  183. BIN surefire/patches/surefire-collaboration/surefire-site/src/site/resources/images/expanded.gif
  184. BIN surefire/patches/surefire-collaboration/surefire-site/src/site/resources/images/h3.jpg
  185. BIN surefire/patches/surefire-collaboration/surefire-site/src/site/resources/images/h5.jpg
  186. BIN surefire/patches/surefire-collaboration/surefire-site/src/site/resources/images/logo_apache.jpg
  187. BIN surefire/patches/surefire-collaboration/surefire-site/src/site/resources/images/logo_maven.jpg
  188. BIN surefire/patches/surefire-collaboration/surefire-site/src/site/resources/images/maven-logo-2.gif
  189. +0 −24 surefire/patches/surefire-collaboration/surefire-site/src/site/site.xml
View
172 surefire/patches/surefire-collaboration/maven-surefire-plugin/pom.xml
@@ -1,172 +0,0 @@
-<?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.3-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>
- <version>2.3-SNAPSHOT</version>
- <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@maven.apache.org</subscribe>
- <unsubscribe>users-unsubscribe@maven.apache.org</unsubscribe>
- <post>users@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@maven.apache.org</subscribe>
- <unsubscribe>dev-unsubscribe@maven.apache.org</unsubscribe>
- <post>dev@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@maven.apache.org</subscribe>
- <unsubscribe>commits-unsubscribe@maven.apache.org</unsubscribe>
- <post>commits@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@maven.apache.org</post>
- <subscribe>announce-subscribe@maven.apache.org</subscribe>
- <unsubscribe>announce-unsubscribe@maven.apache.org</unsubscribe>
- <archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
- </mailingList>
- <mailingList>
- <name>Maven Issues List</name>
- <post>issues@maven.apache.org</post>
- <subscribe>issues-subscribe@maven.apache.org</subscribe>
- <unsubscribe>issues-unsubscribe@maven.apache.org</unsubscribe>
- <archive>http://mail-archives.apache.org/mod_mbox/maven-issues/</archive>
- </mailingList>
- <mailingList>
- <name>Maven Notifications List</name>
- <post>notifications@maven.apache.org</post>
- <subscribe>notifications-subscribe@maven.apache.org</subscribe>
- <unsubscribe>notifications-unsubscribe@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@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>
- <version>2.3-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- <version>1.1</version>
- </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>
View
43 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/pom.xml
@@ -1,43 +0,0 @@
-<?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>
- </modules>
-
-</project>
View
41 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test1/pom.xml
@@ -1,41 +0,0 @@
-<?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>
View
66 ...urefire-collaboration/maven-surefire-plugin/src/it/test1/src/test/java/SurefireTest1.java
@@ -1,66 +0,0 @@
-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 );
- }
-
-}
View
53 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test2/pom.xml
@@ -1,53 +0,0 @@
-<?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>
View
66 ...urefire-collaboration/maven-surefire-plugin/src/it/test2/src/test/java/SurefireTest2.java
@@ -1,66 +0,0 @@
-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 );
- }
-
-}
View
54 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test3/pom.xml
@@ -1,54 +0,0 @@
-<?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>
View
36 ...urefire-collaboration/maven-surefire-plugin/src/it/test3/src/test/java/SurefireTest3.java
@@ -1,36 +0,0 @@
-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( ">" );
- }
-
-}
View
65 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test4/pom.xml
@@ -1,65 +0,0 @@
-<?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>
View
30 ...atches/surefire-collaboration/maven-surefire-plugin/src/it/test4/src/test-data/testng.xml
@@ -1,30 +0,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.
--->
-
-<!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>
View
33 ...efire-collaboration/maven-surefire-plugin/src/it/test4/src/test/java/TestNGSuiteTest.java
@@ -1,33 +0,0 @@
-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";
- }
-}
View
61 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test5/pom.xml
@@ -1,61 +0,0 @@
-<?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>
View
42 ...ire-collaboration/maven-surefire-plugin/src/it/test5/src/test/java/TestNGJavadocTest.java
@@ -1,42 +0,0 @@
-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.");
- }
-}
View
64 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test6/pom.xml
@@ -1,64 +0,0 @@
-<?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>
View
52 ...s/surefire-collaboration/maven-surefire-plugin/src/it/test6/src/test/java/TestNGTest.java
@@ -1,52 +0,0 @@
-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.";
- }
-}
View
65 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test7/pom.xml
@@ -1,65 +0,0 @@
-<?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>
View
28 ...es/surefire-collaboration/maven-surefire-plugin/src/it/test7/src/test/java/JunitTest.java
@@ -1,28 +0,0 @@
-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);
- }
-}
View
31 ...efire-collaboration/maven-surefire-plugin/src/it/test7/src/test/java/TestNGJunitTest.java
@@ -1,31 +0,0 @@
-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";
- }
-}
View
64 surefire/patches/surefire-collaboration/maven-surefire-plugin/src/it/test8/pom.xml
@@ -1,64 +0,0 @@
-<?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>
View
52 ...s/surefire-collaboration/maven-surefire-plugin/src/it/test8/src/test/java/TestNGTest.java
@@ -1,52 +0,0 @@
-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.";
- }
-}
View
849 .../maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
@@ -1,849 +0,0 @@
-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;
-
- // FIXME this field is not used
- /**
- * The directory containing generated classes of the project being tested.
- *
- * @parameter expression="${project.build.outputDirectory}"
- * @required
- */
- private File classesDirectory;
-
- /**
- * 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;
-
- /**
- * 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 boolean 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;
-
- 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 )
- {
- String msg = "There are test failures.";
-
- 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;
- }
- else if ( !testClassesDirectory.exists() )
- {
- getLog().info( "No tests to run." );
- return false;
- }
-
- if ( parallel )
- {
- if ( threadCount < 1 )
- {
- throw new MojoFailureException( "Must have at least one thread in parallel mode" );
- }
- }
-
- if ( useSystemClassLoader && ForkConfiguration.FORK_NEVER.equals( forkMode ) )
- {
- getLog().warn( "useSystemClassloader=true setting has no effect when not forking" );
- }
-
- return true;
- }
-
- 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 )
- {
- addArtifact(surefireBooter, testNgArtifact);
-
- 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() );
- }
-
- // 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" );
- }
- for ( int i = 0; i < suiteXmlFiles.length; i++ )
- {
- File file = suiteXmlFiles[i];
- if ( file.exists() )
- {
- surefireBooter.addTestSuite( "org.apache.maven.surefire.testng.TestNGXmlTestSuite",
- new Object[]{file, testSourceDirectory.getAbsolutePath()} );
- }
- }
- }
- 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();
-
- 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, groups, excludedGroups, Boolean.valueOf( parallel ),
- new Integer( threadCount ), testSourceDirectory.getAbsolutePath()} );
- }
- else
- {
- String junitDirectoryTestSuite;
- if (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.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 );
- }
- }
-
- surefireBooter.setRedirectTestOutputToFile( redirectTestOutputToFile );
-
- surefireBooter.setForkConfiguration( fork );
-
- surefireBooter.setChildDelegation( childDelegation );
-
- surefireBooter.setReportsDirectory( reportsDirectory );
-
- surefireBooter.setUseSystemClassLoader( useSystemClassLoader );
-
- 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;
- }
-}
View
34