Permalink
Browse files

import of oozie-2.2

  • Loading branch information...
1 parent 193e7a0 commit e3665a56324fc3a3e83a35e89e471532326971d1 @rvs rvs committed Sep 10, 2010
Showing with 1,370 additions and 17,227 deletions.
  1. +0 −7 LICENSE.txt
  2. +13 −12 NOTICE.txt
  3. +0 −191 bin/createjpaconf.sh
  4. +21 −133 bin/mkdistro.sh
  5. +0 −26 bin/purgelocalrepo.sh
  6. +0 −82 build-setup/doxia/doxia-core/pom.xml
  7. +0 −68 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/DefaultDoxia.java
  8. +0 −65 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/Doxia.java
  9. +0 −311 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/index/IndexEntry.java
  10. +0 −249 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/index/IndexingSink.java
  11. +0 −33 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/AbstractMacro.java
  12. +0 −53 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/EchoMacro.java
  13. +0 −46 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/Macro.java
  14. +0 −55 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/MacroExecutionException.java
  15. +0 −91 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/MacroRequest.java
  16. +0 −185 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/SwfMacro.java
  17. +0 −52 ...d-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/attachurl/AttachUrlMacro.java
  18. +0 −43 ...tup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/attachurl/AttachUrlPathMacro.java
  19. +0 −48 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/code/CodeMacro.java
  20. +0 −42 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/code/EndCodeMacro.java
  21. +0 −40 ...d-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/AbstractColorMacro.java
  22. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorAquaMacro.java
  23. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorBlackMacro.java
  24. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorBlueMacro.java
  25. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorGrayMacro.java
  26. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorGreenMacro.java
  27. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorLimeMacro.java
  28. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorMaroonMacro.java
  29. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorNavyMacro.java
  30. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorOliveMacro.java
  31. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorPinkMacro.java
  32. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorPurpleMacro.java
  33. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorRedMacro.java
  34. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorSilverMacro.java
  35. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorTealMacro.java
  36. +0 −40 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorYellowMacro.java
  37. +0 −40 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/EndColorMacro.java
  38. +0 −53 ...etup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/manager/DefaultMacroManager.java
  39. +0 −47 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/manager/MacroManager.java
  40. +0 −71 ...p/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/manager/MacroNotFoundException.java
  41. +0 −283 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/snippet/SnippetMacro.java
  42. +0 −186 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/snippet/SnippetReader.java
  43. +0 −239 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/toc/TocMacro.java
  44. +0 −76 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/markup/Markup.java
  45. +0 −38 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/markup/TextMarkup.java
  46. +0 −45 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/markup/XmlMarkup.java
  47. +0 −50 ...d-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/module/site/AbstractSiteModule.java
  48. +0 −51 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/module/site/SiteModule.java
  49. +0 −62 ...doxia-core/src/main/java/org/apache/maven/doxia/module/site/manager/DefaultSiteModuleManager.java
  50. +0 −55 .../doxia/doxia-core/src/main/java/org/apache/maven/doxia/module/site/manager/SiteModuleManager.java
  51. +0 −72 ...ia-core/src/main/java/org/apache/maven/doxia/module/site/manager/SiteModuleNotFoundException.java
  52. +0 −102 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java
  53. +0 −40 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractTextParser.java
  54. +0 −157 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
  55. +0 −134 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/parser/ParseException.java
  56. +0 −75 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/parser/Parser.java
  57. +0 −55 ...up/doxia/doxia-core/src/main/java/org/apache/maven/doxia/parser/manager/DefaultParserManager.java
  58. +0 −46 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/parser/manager/ParserManager.java
  59. +0 −71 ...doxia/doxia-core/src/main/java/org/apache/maven/doxia/parser/manager/ParserNotFoundException.java
  60. +0 −36 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractTextSink.java
  61. +0 −183 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/sink/AbstractXmlSink.java
  62. +0 −67 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/sink/PipelineSink.java
  63. +0 −566 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/sink/SinkAdapter.java
  64. +0 −68 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/sink/StructureSink.java
  65. +0 −162 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/util/ByLineReaderSource.java
  66. +0 −67 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/util/ByLineSource.java
  67. +0 −308 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/util/HtmlTools.java
  68. +0 −211 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java
  69. +0 −193 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/AbstractModuleTest.java
  70. +0 −560 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/WellformednessCheckingSink.java
  71. +0 −69 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/index/IndexEntryTest.java
  72. +0 −36 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/macro/MacroManagerTest.java
  73. +0 −151 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/module/AbstractIdentityTest.java
  74. +0 −135 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTest.java
  75. +0 −77 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTestCase.java
  76. +0 −919 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/sink/AbstractSinkTest.java
  77. +0 −105 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/sink/AbstractSinkTestCase.java
  78. +0 −603 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/sink/SinkTestDocument.java
  79. +0 −78 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/sink/StructureSinkTest.java
  80. +0 −626 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/sink/TextSink.java
  81. +0 −67 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/util/ByLineReaderSourceTest.java
  82. +0 −83 build-setup/doxia/doxia-core/src/test/java/org/apache/maven/doxia/util/HtmlToolsTest.java
  83. +0 −75 build-setup/doxia/doxia-module-twiki/pom.xml
  84. +0 −22 build-setup/doxia/doxia-module-twiki/src/main/components/components.xml
  85. +0 −205 ...setup/doxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java
  86. +0 −60 ...p/doxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiSiteModule.java
  87. +0 −147 ...ia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/AbstractFatherBlock.java
  88. +0 −90 ...oxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/AnchorBlock.java
  89. +0 −42 ...etup/doxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/Block.java
  90. +0 −48 ...oxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/BlockParser.java
  91. +0 −60 .../doxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/BoldBlock.java
  92. +0 −302 ...xia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/FormatedTextParser.java
  93. +0 −578 ...module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/GenericListBlockParser.java
  94. +0 −84 ...doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/HRuleBlockParser.java
  95. +0 −61 ...ia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/HorizontalRuleBlock.java
  96. +0 −62 ...oxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/ItalicBlock.java
  97. +0 −135 .../doxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/LinkBlock.java
  98. +0 −48 .../doxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/ListBlock.java
  99. +0 −139 ...ia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/ListItemBlock.java
  100. +0 −251 ...doxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/MacroBlock.java
  101. +0 −62 ...a/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/MonospaceBlock.java
  102. +0 −60 ...p/doxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/NopBlock.java
  103. +0 −101 ...xia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/NumeratedListBlock.java
  104. +0 −47 ...a/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/ParagraphBlock.java
  105. +0 −256 ...a-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/ParagraphBlockParser.java
  106. +0 −321 ...xia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/SectionBlock.java
  107. +0 −147 ...xia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/SectionBlockParser.java
  108. +0 −80 ...etup/doxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/State.java
  109. +0 −84 ...doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/StringLineSource.java
  110. +0 −77 ...doxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TableBlock.java
  111. +0 −121 ...doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TableBlockParser.java
  112. +0 −61 ...a/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TableCellBlock.java
  113. +0 −61 ...a-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TableCellHeaderBlock.java
  114. +0 −62 ...ia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TableRowBlock.java
  115. +0 −185 ...p/doxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TagBlock.java
  116. +0 −111 .../doxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TextBlock.java
  117. +0 −394 ...doxia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/TextParser.java
  118. +0 −69 ...xia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/UnorderedListBlock.java
  119. +0 −112 ...ia/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/parser/WikiWordBlock.java
  120. +0 −109 build-setup/doxia/doxia-module-twiki/src/main/resources/TWikiParserTest.twiki
  121. +0 −87 ...-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/AbstractBlockTestCase.java
  122. +0 −168 .../doxia/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/BlockTest.java
  123. +0 −261 ...doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/FormatedTextTest.java
  124. +0 −157 ...p/doxia/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/ListTest.java
  125. +0 −204 ...ia/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/ParagraphTest.java
  126. +0 −191 ...oxia/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/SectionTest.java
  127. +0 −96 .../doxia/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/TableTest.java
  128. +0 −264 .../doxia/doxia-module-twiki/src/test/java/org/apache/maven/doxia/module/twiki/parser/WordsTest.java
  129. +0 −9 build-setup/doxia/dummy/pom.xml
  130. +0 −16 build-setup/doxia/dummy/src/site/site.xml
  131. +0 −13 build-setup/doxia/pom.xml
  132. +0 −64 build-setup/setup-maven.sh
  133. +23 −137 client/pom.xml
  134. +18 −12 client/src/main/bin/oozie
  135. +12 −15 client/src/main/java/org/apache/oozie/BuildInfo.java
  136. +14 −14 client/src/main/java/org/apache/oozie/cli/CLIParser.java
  137. +342 −208 client/src/main/java/org/apache/oozie/cli/OozieCLI.java
  138. +10 −13 client/src/main/java/org/apache/oozie/cli/OozieCLIException.java
  139. +17 −13 client/src/main/java/org/apache/oozie/client/CoordinatorAction.java
  140. +10 −13 client/src/main/java/org/apache/oozie/client/CoordinatorJob.java
  141. +264 −95 client/src/main/java/org/apache/oozie/client/OozieClient.java
  142. +10 −13 client/src/main/java/org/apache/oozie/client/OozieClientException.java
  143. +10 −13 client/src/main/java/org/apache/oozie/client/SLAEvent.java
  144. +10 −13 client/src/main/java/org/apache/oozie/client/WorkflowAction.java
  145. +10 −13 client/src/main/java/org/apache/oozie/client/WorkflowJob.java
  146. +223 −0 client/src/main/java/org/apache/oozie/client/XOozieClient.java
  147. +10 −13 client/src/main/java/org/apache/oozie/client/rest/JsonBean.java
  148. +68 −20 client/src/main/java/org/apache/oozie/client/rest/JsonCoordinatorAction.java
  149. +23 −13 client/src/main/java/org/apache/oozie/client/rest/JsonCoordinatorJob.java
  150. +10 −13 client/src/main/java/org/apache/oozie/client/rest/JsonSLAEvent.java
  151. +13 −13 client/src/main/java/org/apache/oozie/client/rest/JsonTags.java
  152. +16 −18 client/src/main/java/org/apache/oozie/client/rest/JsonUtils.java
  153. +10 −13 client/src/main/java/org/apache/oozie/client/rest/JsonWorkflowAction.java
  154. +10 −13 client/src/main/java/org/apache/oozie/client/rest/JsonWorkflowJob.java
  155. +29 −13 client/src/main/java/org/apache/oozie/client/rest/RestConstants.java
  156. +0 −123 client/src/main/resources/META-INF/persistence.xml
  157. +14 −0 client/src/main/resources/gms-oozie-sla-0.1.xsd
  158. +9 −11 client/src/main/resources/oozie-buildinfo.properties
  159. +14 −0 client/src/main/resources/oozie-coordinator-0.1.xsd
  160. +14 −0 client/src/main/resources/oozie-sla-0.1.xsd
  161. +15 −1 client/src/main/resources/oozie-workflow-0.1.xsd
  162. +15 −1 client/src/main/resources/oozie-workflow-0.2.xsd
  163. +21 −13 client/src/test/java/org/apache/oozie/cli/TestCLIParser.java
  164. +10 −13 client/src/test/java/org/apache/oozie/cli/TestValidation.java
  165. +10 −13 client/src/test/java/org/apache/oozie/client/rest/TestJsonCoordinatorAction.java
  166. +10 −13 client/src/test/java/org/apache/oozie/client/rest/TestJsonCoordinatorJob.java
  167. +10 −13 client/src/test/java/org/apache/oozie/client/rest/TestJsonUtils.java
  168. +10 −13 client/src/test/java/org/apache/oozie/client/rest/TestJsonWorkflowAction.java
  169. +10 −13 client/src/test/java/org/apache/oozie/client/rest/TestJsonWorkflowJob.java
  170. +6 −9 client/src/test/resources/invalid.xml
  171. +6 −9 client/src/test/resources/valid.xml
Sorry, we could not display the entire diff because too many files (642) changed.
View
7 LICENSE.txt
@@ -1,10 +1,3 @@
-=======================================================
- Oozie
-
- Copyright 2009-2010, Yahoo! Inc. All rights reserved.
-
- Licensed under the Apache License Version 2.0
-=======================================================
Apache License
Version 2.0, January 2004
View
25 NOTICE.txt
@@ -1,20 +1,21 @@
+=======================================================================
+NOTICE file for use with, and corresponding to Section 4 of,
+the Apache License, Version 2.0,
+in this case for the Oozie, Workflow Engine for Hadoop project
+=======================================================================
+
+ This product includes software developed by
+ Yahoo! Inc. (www.yahoo.com)
+ Copyright (c) 2010 Yahoo! Inc. All rights reserved.
+
+
This product includes software developed by Yahoo! Inc.,
powering the largest Hadoop clusters in the Universe!
(http://developer.yahoo.com/hadoop).
This product includes software developed by The Apache Software
Foundation (http://www.apache.org/).
-Components licenses:
-
-HSQL License : HSQLDB
-JDOM License : JDOM
-BSD License : xmlenc Library
-Apache 2.0 License: Apache Log4j, Codec, Commons CLI, Commons DBCP,
- Commons Pool, EL, Hadoop, JSON.simple,
- Jakarta Commons Net, Logging
-GNU GPL v3.0 : Ext JS 2.2 (with Open Source License Exception)
-
-Detailed License information can be found in the documentation
-in the ooziedocs.war at index.html##LicenseInfo
+Detailed License information for all components can be found in the
+documentation in the ooziedocs.war at index.html##LicenseInfo
View
191 bin/createjpaconf.sh
@@ -1,191 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-SCRIPT_DIR=$(dirname $0)
-CURRENT_DIR=$(pwd)
-DBTYPE=
-USERNAME=
-PASSWORD=
-DBURL=
-
-function usage()
-{
- echo >&2 \
- "usage: $0 [-ddbtype] [-uusername] [-ppassword] [-lurl]"
- exit 1
-}
-
-while getopts :d:u:p:l: opt
-do
- case "$opt" in
- d) DBTYPE="$OPTARG";;
- u) USERNAME="$OPTARG";;
- p) PASSWORD="$OPTARG";;
- l) DBURL="$OPTARG";;
- \?) #unknown flag
- usage;;
- esac
-done
-
-# check all arguments are given:
-[ -z "$DBTYPE" ] && usage
-[ -z "$USERNAME" ] && usage
-[ -z "$DBURL" ] && usage
-
-DriverClassName=
-Url=
-
-if [ "$DBTYPE" == "oracle" ]; then
- DriverClassName=oracle.jdbc.driver.OracleDriver
- Url=jdbc:oracle:thin:@${DBURL}
- DB_ISOLATION="read-committed"
-elif [ "$DBTYPE" == "mysql" ]; then
- DriverClassName=com.mysql.jdbc.Driver
- Url=jdbc:mysql://${DBURL}
- DB_ISOLATION="repeatable-read"
-else
- DriverClassName=org.hsqldb.jdbcDriver
- Url="jdbc:hsqldb:${DBURL};create=true"
- DB_ISOLATION="read-committed"
-fi
-
-CONNECTSTRING="DriverClassName=${DriverClassName},Url=${Url},Username=${USERNAME},Password=${PASSWORD},MaxActive=100"
-
-#create persistence.xml
-mkdir ${SCRIPT_DIR}/tmp
-cat << EOF-persistence.xml > ${SCRIPT_DIR}/tmp/persistence.xml
-<?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.
--->
-<persistence xmlns="http://java.sun.com/xml/ns/persistence"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- version="1.0">
-
- <!--
- We need to enumerate each persistent class first in the persistence.xml
- See: http://issues.apache.org/jira/browse/OPENJPA-78
- -->
- <persistence-unit name="none" transaction-type="RESOURCE_LOCAL">
- <!--
- <mapping-file>oozie/schema.xml</mapping-file>
- -->
- </persistence-unit>
-
- <!--
- A persistence unit is a set of listed persistent entities as well
- the configuration of an EntityManagerFactory. We configure each
- example in a separate persistence-unit.
- -->
- <persistence-unit name="oozie" transaction-type="RESOURCE_LOCAL">
- <!--
- The default provider can be OpenJPA, or some other product.
- This element is optional if OpenJPA is the only JPA provider
- in the current classloading environment, but can be specified
- in cases where there are multiple JPA implementations available.
- -->
- <!--
- <provider>
- org.apache.openjpa.persistence.PersistenceProviderImpl
- </provider>
- -->
-
- <!-- We must enumerate each entity in the persistence unit -->
- <class>org.apache.oozie.WorkflowActionBean</class>
- <class>org.apache.oozie.WorkflowJobBean</class>
- <class>org.apache.oozie.CoordinatorJobBean</class>
- <class>org.apache.oozie.CoordinatorActionBean</class>
- <class>org.apache.oozie.SLAEventBean</class>
- <class>org.apache.oozie.client.rest.JsonWorkflowJob</class>
- <class>org.apache.oozie.client.rest.JsonWorkflowAction</class>
- <class>org.apache.oozie.client.rest.JsonCoordinatorJob</class>
- <class>org.apache.oozie.client.rest.JsonCoordinatorAction</class>
- <class>org.apache.oozie.client.rest.JsonSLAEvent</class>
-
- <properties>
- <!--
- We can configure the default OpenJPA properties here. They
- happen to be commented out here since the provided examples
- all specify the values via System properties.
- -->
- <property name="openjpa.ConnectionDriverName" value="org.apache.oozie.util.db.InstrumentedBasicDataSource"/>
-
- <property name="openjpa.ConnectionProperties" value="$CONNECTSTRING"/>
- <property name="openjpa.MetaDataFactory" value="jpa(Types=org.apache.oozie.WorkflowActionBean;
- org.apache.oozie.WorkflowJobBean;
- org.apache.oozie.CoordinatorJobBean;
- org.apache.oozie.CoordinatorActionBean;
- org.apache.oozie.SLAEventBean;
- org.apache.oozie.client.rest.JsonSLAEvent;
- org.apache.oozie.client.rest.JsonWorkflowJob;
- org.apache.oozie.client.rest.JsonWorkflowAction;
- org.apache.oozie.client.rest.JsonCoordinatorJob;
- org.apache.oozie.client.rest.JsonCoordinatorAction)"></property>
-
- <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
- <property name="openjpa.DetachState" value="fetch-groups(DetachedStateField=true)"/>
- <!--property name="openjpa.FlushBeforeQueries" value="false" /-->
- <property name="openjpa.LockManager" value="pessimistic"/>
- <property name="openjpa.ReadLockLevel" value="read"/>
- <property name="openjpa.WriteLockLevel" value="write"/>
- <property name="openjpa.jdbc.TransactionIsolation" value="$DB_ISOLATION"/>
- <property name="openjpa.jdbc.DBDictionary" value="UseGetBytesForBlobs=true"/>
- <property name="openjpa.jdbc.DBDictionary" value="UseSetBytesForBlobs=true"/>
- <property name="openjpa.jdbc.DBDictionary" value="BlobBufferSize=500000"/>
- <property name="openjpa.jdbc.DBDictionary" value="batchLimit=50"/>
- <!-- property name="openjpa.Log" value="File=/tmp/sql.log, DefaultLevel=TRACE, SQL=TRACE"/-->
- <!-- property name="openjpa.DynamicEnhancementAgent" value="false"/-->
- <property name="openjpa.RuntimeUnenhancedClasses" value="supported"/>
- </properties>
- </persistence-unit>
-
-</persistence>
-EOF-persistence.xml
-
-cd ${SCRIPT_DIR}
-cp tmp/persistence.xml ../webapp/src/main/resources/META-INF/
-
-#oracle
-if [ "$DBTYPE" == "oracle" ]; then
- cp ../webapp/src/main/resources/META-INF/orm.xml.oracle ../webapp/src/main/resources/META-INF/orm.xml
-#mysql
-elif [ "$DBTYPE" == "mysql" ]; then
- cp ../webapp/src/main/resources/META-INF/orm.xml.mysql ../webapp/src/main/resources/META-INF/orm.xml
-#hsql
-else
- cp ../webapp/src/main/resources/META-INF/orm.xml.hsql ../webapp/src/main/resources/META-INF/orm.xml
-fi
-
-
-rm -fr tmp
View
154 bin/mkdistro.sh
@@ -1,20 +1,17 @@
#!/bin/bash
#
-# 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
+# Copyright (c) 2010 Yahoo! Inc. All rights reserved.
+# 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
+# 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.
+# limitations under the License. See accompanying LICENSE file.
#
# resolve links - $0 may be a softlink
@@ -33,133 +30,24 @@ done
BASEDIR=`dirname ${PRG}`
BASEDIR=`cd ${BASEDIR}/..;pwd`
+cd ${BASEDIR}
-if [ "$1" == "-full" ]; then
- FULLDISTRO=true
- shift
-fi
-
-if [ "$1" == "-h" ]; then
- echo
- echo "**persistence.xml replacement**"
- echo
- echo "usage: $0 [-ddbtype] [-uusername] [-ppassword] [-lurl]"
- echo
- echo "**mvn help**"
- mvn -h
- exit 0
-fi
-
-function checkExitStatus {
- if [ "$?" != "0" ]; then
- echo
- echo "ERROR, Oozie distro could not be created ${1}"
- echo
- cleanUpLocalRepo
- exit -1
- fi
-}
+export DATETIME=`date -u "+%Y.%m.%d-%H:%M:%SGMT"`
+export VC_REV=`svn info | grep "Revision" | awk '{print $2}'`
+export VC_URL=`svn info | grep "URL" | awk '{print $2}'`
-function cleanUpLocalRepo {
- rm -rf ~/.m2/repository/org/apache/oozie/*
- rm -rf $PWD/core/mem
-}
+MVN_OPTS="-Dbuild.time=${DATETIME} -Dvc.revision=${VC_REV} -Dvc.url=${VC_URL} -DgenerateDocs"
-#process createjpaconf.sh arguments - begin
-while getopts :d:u:p:l: opt
-do
- case "$opt" in
- d) DBTYPE="$OPTARG";;
- u) USERNAME="$OPTARG";;
- p) PASSWORD="$OPTARG";;
- l) DBURL="$OPTARG";;
- \?) #unknown flag
- break;;
- esac
-done
+export DATETIME2=`date -u "+%Y%m%d-%H%M%SGMT"`
+mvn clean package assembly:single ${MVN_OPTS} $* 2>&1 | tee ${BASEDIR}/mkdistro-${DATETIME2}.out
-if [ -z "$DBTYPE" ]; then
- echo "[INFO] Use default persistence.xml!!"
+if [ "$?" != "0" ]; then
+ echo
+ echo "ERROR, Oozie distro creation failed"
+ echo
+ exit -1
else
- if [ -z "$USERNAME" ]; then
- echo "[ERROR] DB UserName required!!"
- exit 1
- fi
- if [ -z "$DBURL" ]; then
- echo "[ERROR] DB URL required!!"
- exit 1
- fi
- [[ "$DBTYPE" = [-]* ]] && { echo "[ERROR] Wrong DBTYPE!!" ; exit 1 ; }
- [[ "$USERNAME" = [-]* ]] && { echo "[ERROR] Wrong USERNAME" ; exit 1 ; }
- [[ "$PASSWORD" = [-]* ]] && { echo "[ERROR] Wrong PASSWORD" ; exit 1 ; }
- [[ "$DBURL" = [-]* ]] && { echo "[ERROR] Wrong DBURL" ; exit 1 ; }
- echo "[INFO] Use replaced persistence.xml!!"
- shift $(( $OPTIND - 1 ))
- SCRIPT_DIR=$(dirname $0)
- if [ -z "$PASSWORD" ]; then
- ${SCRIPT_DIR}/createjpaconf.sh -d${DBTYPE} -u${USERNAME} -l${DBURL}
- else
- ${SCRIPT_DIR}/createjpaconf.sh -d${DBTYPE} -u${USERNAME} -p${PASSWORD} -l${DBURL}
- fi
+ echo
+ echo "Oozie distro created, DATE[${DATETIME}] VC-REV[${VC_REV}], available at [${BASEDIR}/distro/target]"
+ echo
fi
-#process createjpaconf.sh arguments - end
-
-export DATETIME=`date -u "+%Y.%m.%d-%H:%M:%SGMT"`
-cd ${BASEDIR}
-export SVNREV=`svn info | grep "Revision" | awk '{print $2}'`
-export SVNURL=`svn info | grep "URL" | awk '{print $2}'`
-
-#clean up local repo
-#ln -s $PWD/client/src $PWD/client_enhanced/src
-#ln -s $PWD/client_enhanced/pom.xml.enhance $PWD/client_enhanced/pom.xml
-cleanUpLocalRepo
-
-MVN_OPTS="-Dbuild.time=${DATETIME} -Dsvn.revision=${SVNREV} -Dsvn.url=${SVNURL}"
-
-cd client
-mvn clean package -Doozie.build.jpa.enhanced=false ${MVN_OPTS} $*
-mvn assembly:single -Doozie.build.jpa.enhanced=false ${MVN_OPTS} $*
-cd ..
-
-#clean, compile, test, package, install
-mvn clean install ${MVN_OPTS} $*
-checkExitStatus "running: clean compile, test, package, install"
-
-#if [ "$FULLDISTRO" == "true" ]; then
-
- #clover
- #mvn clover2:instrument clover2:aggregate clover2:clover ${MVN_OPTS} $*
- #checkExitStatus "running: clover"
-
- #dependencies report
- #mvn project-info-reports:dependencies ${MVN_OPTS} $*
- #checkExitStatus "running: dependencies"
-
- #findbugs report
- #mvn findbugs:findbugs ${MVN_OPTS} $*
- #checkExitStatus "running: findbugs"
-
-#fi
-
-#javadocs
-mvn javadoc:javadoc ${MVN_OPTS} $*
-checkExitStatus "running: javadoc"
-
-cd docs
-mvn clean
-mvn site:site assembly:single
-checkExitStatus "running: docs site"
-cd ..
-
-#putting together distro
-mvn assembly:single ${MVN_OPTS} $*
-checkExitStatus "running: assembly"
-
-cleanUpLocalRepo
-#unlink $PWD/client_enhanced/src
-#unlink $PWD/client_enhanced/pom.xml
-
-echo
-echo "Oozie distro created, DATE[${DATETIME}] SVN-REV[${SVNREV}], available at [${BASEDIR}/distro/target]"
-echo
-
View
26 bin/purgelocalrepo.sh
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# 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.
-#
-
-function cleanUpLocalRepo {
- rm -rf ~/.m2/repository/org/apache/oozie/*
-}
-
-#clean up local repo
-cleanUpLocalRepo
-
View
82 build-setup/doxia/doxia-core/pom.xml
@@ -1,82 +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>
- <parent>
- <artifactId>doxia</artifactId>
- <groupId>org.apache.maven.doxia</groupId>
- <version>1.0-alpha-9</version>
- </parent>
- <artifactId>doxia-core</artifactId>
- <version>1.0-alpha-9.2y</version>
- <name>Doxia :: Core</name>
- <description>Doxia core classes and interfaces.</description>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.4</source>
- <target>1.4</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>oro</groupId>
- <artifactId>oro</artifactId>
- <version>2.0.7</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-sink-api</artifactId>
- <version>1.0-alpha-9</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default</artifactId>
- </dependency>
- <!--
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-api</artifactId>
- </dependency>
- -->
- </dependencies>
-</project>
View
68 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/DefaultDoxia.java
@@ -1,68 +0,0 @@
-package org.apache.maven.doxia;
-
-/*
- * 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.doxia.parser.ParseException;
-import org.apache.maven.doxia.parser.Parser;
-import org.apache.maven.doxia.parser.manager.ParserManager;
-import org.apache.maven.doxia.parser.manager.ParserNotFoundException;
-import org.apache.maven.doxia.sink.Sink;
-
-import java.io.Reader;
-
-/**
- * Simple implementation of the Doxia interface:
- * uses a ParserManager to lookup a parser.
- *
- * @author Jason van Zyl
- * @version $Id: DefaultDoxia.java 564180 2007-08-09 12:15:44Z vsiveton $
- * @since 1.0
- * @plexus.component
- */
-public class DefaultDoxia
- implements Doxia
-{
- /**
- * @plexus.requirement
- */
- private ParserManager parserManager;
-
- // ----------------------------------------------------------------------
- // This remains because the sinks are not threadsafe which they probably
- // should be. In some places a constructor is used to initialize a sink
- // which can probably be done away with.
- // ----------------------------------------------------------------------
-
- /** {@inheritDoc} */
- public void parse( Reader source, String parserId, Sink sink )
- throws ParserNotFoundException, ParseException
- {
- Parser parser = parserManager.getParser( parserId );
-
- parser.parse( source, sink );
- }
-
- /** {@inheritDoc} */
- public Parser getParser( String parserId )
- throws ParserNotFoundException
- {
- return parserManager.getParser( parserId );
- }
-}
View
65 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/Doxia.java
@@ -1,65 +0,0 @@
-package org.apache.maven.doxia;
-
-/*
- * 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.doxia.parser.ParseException;
-import org.apache.maven.doxia.parser.Parser;
-import org.apache.maven.doxia.parser.manager.ParserNotFoundException;
-import org.apache.maven.doxia.sink.Sink;
-
-import java.io.Reader;
-
-/**
- * Basic interface of the Doxia framework.
- *
- * @author Jason van Zyl
- * @version $Id: Doxia.java 564180 2007-08-09 12:15:44Z vsiveton $
- * @since 1.0
- */
-public interface Doxia
-{
- /** The Plexus lookup role. */
- String ROLE = Doxia.class.getName();
-
- /**
- * Parses the given source model using a parser with given id,
- * and emits Doxia events into the given sink.
- *
- * @param source A reader that provides the source document.
- * @param parserId Identifier for the parser to use.
- * @param sink A sink that consumes the Doxia events.
- * @throws ParserNotFoundException if no parser could be found
- * for the given id.
- * @throws ParseException if the model could not be parsed.
- */
- void parse( Reader source, String parserId, Sink sink )
- throws ParserNotFoundException, ParseException;
-
- /**
- * Return a parser for the given <code>parserId</code>.
- *
- * @param parserId Identifier for the parser to use.
- * @return the parser defining by parserId.
- * @throws ParserNotFoundException if no parser could be found
- * for the given id.
- */
- Parser getParser( String parserId )
- throws ParserNotFoundException;
-}
View
311 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/index/IndexEntry.java
@@ -1,311 +0,0 @@
-package org.apache.maven.doxia.index;
-
-/*
- * 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.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Collections;
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: IndexEntry.java 559578 2007-07-25 20:12:56Z ltheussl $
- */
-public class IndexEntry
-{
- /** The parent entry. */
- private IndexEntry parent;
-
- /** The id of the entry. */
- private String id;
-
- /** The entry title. */
- private String title;
-
- /** The child entries. */
- private List childEntries = new ArrayList();
-
- /** System-dependent EOL. */
- private static final String EOL = System.getProperty( "line.separator" );
-
- /**
- * Constructor.
- *
- * @param newId The id.
- */
- public IndexEntry( String newId )
- {
- this.id = newId;
- }
-
- /**
- * Constructor.
- *
- * @param newParent The parent. Cannot be null.
- * @param newId The id. Cannot be null.
- */
- public IndexEntry( IndexEntry newParent, String newId )
- {
- if ( newParent == null )
- {
- throw new NullPointerException( "parent cannot be null." );
- }
-
- if ( newId == null )
- {
- throw new NullPointerException( "id cannot be null." );
- }
-
- this.parent = newParent;
- this.id = newId;
-
- parent.childEntries.add( this );
- }
-
- /**
- * Returns the parent entry.
- *
- * @return the parent entry.
- */
- public IndexEntry getParent()
- {
- return parent;
- }
-
- /**
- * Returns the id.
- *
- * @return the id.
- */
- public String getId()
- {
- return id;
- }
-
- /**
- * Returns the title.
- *
- * @return the title.
- */
- public String getTitle()
- {
- return title;
- }
-
- /**
- * Sets the title.
- *
- * @param newTitle the title.
- */
- public void setTitle( String newTitle )
- {
- this.title = newTitle;
- }
-
- /**
- * Returns an unmodifiableList of the child entries.
- *
- * @return child entries.
- */
- public List getChildEntries()
- {
- return Collections.unmodifiableList( childEntries );
- }
-
- /**
- * Sets the child entriesor creates a new ArrayList if entries == null.
- *
- * @param entries the entries.
- */
- public void setChildEntries( List entries )
- {
- if ( entries == null )
- {
- childEntries = new ArrayList();
- }
-
- this.childEntries = entries;
- }
-
- // -----------------------------------------------------------------------
- // Utils
- // -----------------------------------------------------------------------
-
- /**
- * Returns the next entry.
- *
- * @return the next entry, or null if there is none.
- */
- public IndexEntry getNextEntry()
- {
- if ( parent == null )
- {
- return null;
- }
-
- List entries = parent.getChildEntries();
-
- int index = entries.indexOf( this );
-
- if ( index + 1 >= entries.size() )
- {
- return null;
- }
-
- return (IndexEntry) entries.get( index + 1 );
- }
-
- /**
- * Returns the previous entry.
- *
- * @return the previous entry, or null if there is none.
- */
- public IndexEntry getPrevEntry()
- {
- if ( parent == null )
- {
- return null;
- }
-
- List entries = parent.getChildEntries();
-
- int index = entries.indexOf( this );
-
- if ( index == 0 )
- {
- return null;
- }
-
- return (IndexEntry) entries.get( index - 1 );
- }
-
- /**
- * Returns the first entry.
- *
- * @return the first entry, or null if there is none.
- */
- public IndexEntry getFirstEntry()
- {
- List entries = getChildEntries();
-
- if ( entries.size() == 0 )
- {
- return null;
- }
- else
- {
- return (IndexEntry) entries.get( 0 );
- }
- }
-
- /**
- * Returns the last entry.
- *
- * @return the last entry, or null if there is none.
- */
- public IndexEntry getLastEntry()
- {
- List entries = getChildEntries();
-
- if ( entries.size() == 0 )
- {
- return null;
- }
- else
- {
- return (IndexEntry) entries.get( entries.size() - 1 );
- }
- }
-
- /**
- * Returns the root entry.
- *
- * @return the root entry, or null if there is none.
- */
- public IndexEntry getRootEntry()
- {
- List entries = getChildEntries();
-
- if ( entries.size() == 0 )
- {
- return null;
- }
- else if ( entries.size() > 1 )
- {
- throw new RuntimeException( "This index has more than one root entry" );
- }
- else
- {
- return (IndexEntry) entries.get( 0 );
- }
- }
-
- // -----------------------------------------------------------------------
- // Object Overrides
- // -----------------------------------------------------------------------
-
- /**
- * Returns a string representation of the object.
- *
- * @return A string.
- */
- public String toString()
- {
- return toString( 0 );
- }
-
- /**
- * Returns a string representation of all objects to the given depth.
- *
- * @param depth The depth to descent to.
- * @return A string.
- */
- public String toString( int depth )
- {
- StringBuffer message = new StringBuffer();
-
- message.append( "Id: " ).append( id );
-
- if ( StringUtils.isNotEmpty( title ) )
- {
- message.append( ", title: " ).append( title );
- }
-
- message.append( EOL );
-
- String indent = "";
-
- for ( int i = 0; i < depth; i++ )
- {
- indent += " ";
- }
-
- for ( Iterator it = getChildEntries().iterator(); it.hasNext(); )
- {
- IndexEntry entry = (IndexEntry) it.next();
-
- message.append( indent ).append( entry.toString( depth + 1 ) );
- }
-
- return message.toString();
- }
-}
View
249 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/index/IndexingSink.java
@@ -1,249 +0,0 @@
-package org.apache.maven.doxia.index;
-
-/*
- * 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.Stack;
-import java.util.List;
-import java.util.ArrayList;
-
-import org.apache.maven.doxia.util.HtmlTools;
-import org.apache.maven.doxia.sink.SinkAdapter;
-
-/**
- * A sink implementation for index
- *
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id: IndexingSink.java 559578 2007-07-25 20:12:56Z ltheussl $
- */
-public class IndexingSink
- extends SinkAdapter
-{
- /** Section 1. */
- private static final int TYPE_SECTION_1 = 1;
-
- /** Section 2. */
- private static final int TYPE_SECTION_2 = 2;
-
- /** Section 3. */
- private static final int TYPE_SECTION_3 = 3;
-
- /** Section 4. */
- private static final int TYPE_SECTION_4 = 4;
-
- /** Section 5. */
- private static final int TYPE_SECTION_5 = 5;
-
- /** Defined term. */
- private static final int TYPE_DEFINED_TERM = 6;
-
- /** Figure. */
- private static final int TYPE_FIGURE = 7;
-
- /** Table. */
- private static final int TYPE_TABLE = 8;
-
- /** Title. */
- private static final int TITLE = 9;
-
- /** The current type. */
- private int type;
-
- /** The current title. */
- private String title;
-
- /** The stack. */
- private Stack stack = new Stack();
-
- private static List titleList = new ArrayList();
- /**
- * Default constructor.
- *
- * @param sectionEntry The first index entry.
- */
- public IndexingSink( IndexEntry sectionEntry )
- {
- titleList.clear();
- stack.push( sectionEntry );
- }
-
- /**
- * @return the title
- */
- public String getTitle()
- {
- return title;
- }
-
- // ----------------------------------------------------------------------
- // Sink Overrides
- // ----------------------------------------------------------------------
-
- /** {@inheritDoc} */
- public void title()
- {
- super.title();
-
- type = TITLE;
- }
-
- /** {@inheritDoc} */
- public void sectionTitle1()
- {
- type = TYPE_SECTION_1;
- }
-
- /** {@inheritDoc} */
- public void section1_()
- {
- pop();
- }
-
- /** {@inheritDoc} */
- public void sectionTitle2()
- {
- type = TYPE_SECTION_2;
- }
-
- /** {@inheritDoc} */
- public void section2_()
- {
- pop();
- }
-
- /** {@inheritDoc} */
- public void sectionTitle3()
- {
- type = TYPE_SECTION_3;
- }
-
- /** {@inheritDoc} */
- public void section3_()
- {
- pop();
- }
-
- /** {@inheritDoc} */
- public void sectionTitle4()
- {
- type = TYPE_SECTION_4;
- }
-
- /** {@inheritDoc} */
- public void section4_()
- {
- pop();
- }
-
- /** {@inheritDoc} */
- public void sectionTitle5()
- {
- type = TYPE_SECTION_5;
- }
-
- /** {@inheritDoc} */
- public void section5_()
- {
- pop();
- }
-
- // public void definedTerm()
- // {
- // type = TYPE_DEFINED_TERM;
- // }
- //
- // public void figureCaption()
- // {
- // type = TYPE_FIGURE;
- // }
- //
- // public void tableCaption()
- // {
- // type = TYPE_TABLE;
- // }
-
- /** {@inheritDoc} */
- public void text( String text )
- {
- IndexEntry entry;
-
- switch ( type )
- {
- case TITLE:
- this.title = text;
- break;
- case TYPE_SECTION_1:
- case TYPE_SECTION_2:
- case TYPE_SECTION_3:
- case TYPE_SECTION_4:
- case TYPE_SECTION_5:
- // -----------------------------------------------------------------------
- // Sanitize the id. The most important step is to remove any blanks
- // -----------------------------------------------------------------------
-
- String titleText = text;
- while(titleList.contains(titleText)) {
- titleText += "_";
- }
- titleList.add(titleText);
-
- String id = HtmlTools.encodeId( titleText );
-
- entry = new IndexEntry( peek(), id );
-
- entry.setTitle( text );
-
- push( entry );
- break;
- // Dunno how to handle these yet
- case TYPE_DEFINED_TERM:
- case TYPE_FIGURE:
- case TYPE_TABLE:
- }
-
- type = 0;
- }
-
- /**
- * Pushes an IndexEntry onto the top of this stack
- *
- * @param entry to put
- */
- public void push( IndexEntry entry )
- {
- stack.push( entry );
- }
-
- /**
- * Removes the IndexEntry at the top of this stack
- */
- public void pop()
- {
- stack.pop();
- }
-
- /**
- * @return Looks at the IndexEntry at the top of this stack
- */
- public IndexEntry peek()
- {
- return (IndexEntry) stack.peek();
- }
-}
View
33 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/AbstractMacro.java
@@ -1,33 +0,0 @@
-package org.apache.maven.doxia.macro;
-
-/*
- * 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.
- */
-
-/**
- * Abstract base class to execute <code>Macro</code>.
- *
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @version $Id: AbstractMacro.java 567311 2007-08-18 18:30:54Z vsiveton $
- * @since 1.0
- */
-public abstract class AbstractMacro
- implements Macro
-{
- // nop
-}
View
53 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/EchoMacro.java
@@ -1,53 +0,0 @@
-package org.apache.maven.doxia.macro;
-
-/*
- * 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.doxia.sink.Sink;
-
-import java.util.Iterator;
-
-/**
- * A simple macro that prints out the key and value of some supplied parameters.
- *
- * @plexus.component role-hint="echo"
- */
-public class EchoMacro
- extends AbstractMacro
-{
- /** System-dependent EOL. */
- private static final String EOL = System.getProperty( "line.separator" );
-
- /** {@inheritDoc} */
- public void execute( Sink sink, MacroRequest request )
- {
- sink.verbatim( true );
-
- sink.text( "echo" + EOL );
-
- for ( Iterator i = request.getParameters().keySet().iterator(); i.hasNext(); )
- {
- String key = (String) i.next();
-
- sink.text( key + " ---> " + request.getParameter( key ) + EOL );
- }
-
- sink.verbatim_();
- }
-}
View
46 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/Macro.java
@@ -1,46 +0,0 @@
-package org.apache.maven.doxia.macro;
-
-/*
- * 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.doxia.sink.Sink;
-
-/**
- * Base interface of a macro.
- *
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @version $Id: Macro.java 567311 2007-08-18 18:30:54Z vsiveton $
- * @since 1.0
- */
-public interface Macro
-{
- /** The Plexus lookup role. */
- String ROLE = Macro.class.getName();
-
- /**
- * Execute the current macro using the given MacroRequest,
- * and emit events into the given sink.
- *
- * @param sink The sink to receive the events.
- * @param request The corresponding MacroRequest.
- * @throws MacroExecutionException if an error occurred during execution.
- */
- void execute( Sink sink, MacroRequest request )
- throws MacroExecutionException;
-}
View
55 .../doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/MacroExecutionException.java
@@ -1,55 +0,0 @@
-package org.apache.maven.doxia.macro;
-
-/*
- * 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.
- */
-
-/**
- * Wrap an exception that occurs during the execution of a Doxia macro.
- *
- * @author <a href="mailto:brett@apache.org">Brett Porter</a>
- */
-public class MacroExecutionException
- extends Exception
-{
- /**
- * Construct a new MacroExecutionException with the specified detail message.
- *
- * @param message The detailed message.
- * This can later be retrieved by the Throwable.getMessage() method.
- */
- public MacroExecutionException( String message )
- {
- super( message );
- }
-
- /**
- * Construct a new MacroExecutionException with the specified
- * detail message and cause.
- *
- * @param message The detailed message.
- * This can later be retrieved by the Throwable.getMessage() method.
- * @param cause the cause. This can be retrieved later by the
- * Throwable.getCause() method. (A null value is permitted, and indicates
- * that the cause is nonexistent or unknown.)
- */
- public MacroExecutionException( String message, Throwable cause )
- {
- super( message, cause );
- }
-}
View
91 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/MacroRequest.java
@@ -1,91 +0,0 @@
-package org.apache.maven.doxia.macro;
-
-/*
- * 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.Map;
-import java.io.File;
-
-/**
- * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
- * @version $Id: MacroRequest.java 567311 2007-08-18 18:30:54Z vsiveton $
- * @since 1.0
- */
-public class MacroRequest
-{
- /** The current base directory. */
- private File basedir;
-
- /** A map of parameters. */
- private Map parameters;
-
- /**
- * Constructor.
- *
- * @param param A map of parameters.
- * @param base The current base directory.
- */
- public MacroRequest( Map param, File base )
- {
- this.parameters = param;
- this.basedir = base;
- }
-
- /**
- * Returns the current base directory.
- *
- * @return The base dir.
- */
- public File getBasedir()
- {
- return basedir;
- }
-
- /**
- * Sets the current base directory.
- *
- * @param base The current base directory.
- */
- public void setBasedir( File base )
- {
- this.basedir = base;
- }
-
- /**
- * Returns the map of parameters.
- *
- * @return The map of parameters.
- */
- public Map getParameters()
- {
- return parameters;
- }
-
- /**
- * Returns on object from the map of parameters
- * that corresponds to the given key.
- *
- * @param key The key to lookup the object.
- * @return The value object.
- */
- public Object getParameter( String key )
- {
- return parameters.get( key );
- }
-}
View
185 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/SwfMacro.java
@@ -1,185 +0,0 @@
-package org.apache.maven.doxia.macro;
-
-/*
- * 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.doxia.sink.Sink;
-import org.codehaus.plexus.util.StringUtils;
-
-import java.util.Iterator;
-
-/**
- * Macro for embedding Flash (SWF) within Maven documentation.
- *
- * @plexus.component role="org.apache.maven.doxia.macro.Macro"
- * role-hint="swf"
- *
- * @author <a href="mailto:steve.motola@gmail.com">Steve Motola</a>
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @version $Id: SwfMacro.java 559578 2007-07-25 20:12:56Z ltheussl $
- */
-public class SwfMacro
- extends AbstractMacro
-{
- /** System-dependent EOL. */
- private static final String EOL = System.getProperty( "line.separator" );
-
- /** {@inheritDoc} */
- public void execute( Sink sink, MacroRequest request )
- throws MacroExecutionException
- {
- // parameter defaults
- String src = "";
- String id = "swf";
- String width = "400";
- String height = "400";
- String quality = "high";
- String menu = "false";
- String loop = "0";
- String play = "true";
- String version = "9,0,45,0";
- String allowScript = "sameDomain";
-
- // assign parameters
- for ( Iterator i = request.getParameters().keySet().iterator(); i.hasNext(); )
- {
- String str = "";
- String key = (String) i.next();
- if ( key.equals( "src" ) )
- {
- str = (String) request.getParameter( key );
- if ( StringUtils.isNotEmpty( str ) )
- {
- src = str;
- }
- }
- if ( key.equals( "id" ) )
- {
- str = (String) request.getParameter( key );
- if ( StringUtils.isNotEmpty( str ) )
- {
- id = str;
- }
- }
- if ( key.equals( "width" ) )
- {
- width = (String) request.getParameter( key );
- if ( StringUtils.isNotEmpty( str ) )
- {
- width = str;
- }
- }
- if ( key.equals( "height" ) )
- {
- str = (String) request.getParameter( key );
- if ( StringUtils.isNotEmpty( str ) )
- {
- height = str;
- }
- }
- if ( key.equals( "quality" ) )
- {
- str = (String) request.getParameter( key );
- if ( StringUtils.isNotEmpty( str ) )
- {
- quality = str;
- }
- }
- if ( key.equals( "menu" ) )
- {
- str = (String) request.getParameter( key );
- if ( StringUtils.isNotEmpty( str ) )
- {
- menu = str;
- }
- }
- if ( key.equals( "loop" ) )
- {
- str = (String) request.getParameter( key );
- if ( StringUtils.isNotEmpty( str ) )
- {
- loop = str;
- }
- }
- if ( key.equals( "play" ) )
- {
- str = (String) request.getParameter( key );
- if ( StringUtils.isNotEmpty( str ) )
- {
- play = str;
- }
- }
- if ( key.equals( "version" ) )
- {
- str = (String) request.getParameter( key );
- // enable version shorthand
- // TODO: put in other shorthand versions
- if ( str.equals( "6" ) )
- {
- version = "6,0,29,0";
- }
- else
- {
- if ( str.equals( "9" ) )
- {
- version = "9,0,45,0";
- }
- else
- {
- if ( StringUtils.isNotEmpty( str ) )
- {
- version = str;
- }
- }
- }
- }
- if ( key.equals( "allowScript" ) )
- {
- str = (String) request.getParameter( key );
- if ( StringUtils.isNotEmpty( str ) )
- {
- allowScript = str;
- }
- }
- }
-
- StringBuffer content = new StringBuffer();
- content.append( "<center>" ).append( EOL );
- content.append( "<object classid=\"clsid27CDB6E-AE6D-11cf-96B8-444553540000\" " )
- .append( "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" )
- .append( version ).append( "\" width=\"" ).append( width ).append( "\" height=\"" ).append( height )
- .append( "\" id=\"" ).append( id ).append( "\">" ).append( EOL );
- content.append( "<param name=\"movie\" value=\"" ).append( src ).append( "\">" ).append( EOL );
- content.append( "<param name=\"quality\" value=\"" ).append( quality ).append( "\">" ).append( EOL );
- content.append( "<param name=\"menu\" value=\"" ).append( menu ).append( "\">" ).append( EOL );
- content.append( "<param name=\"loop\" value=\"" ).append( loop ).append( "\">" ).append( EOL );
- content.append( "<param name=\"play\" value=\"" ).append( play ).append( "\">" ).append( EOL );
- content.append( "<param name=\"allowScriptAccess\" value=\"" ).append( allowScript ).append( "\">" );
- content.append( "<embed src=\"" ).append( src ).append( "\" width=\"" ).append( width ).append( "\" height=\"" )
- .append( height ).append( "\" loop=\"" ).append( loop ).append( "\" play=\"" ).append( play )
- .append( "\" quality=\"" ).append( quality ).append( "\" allowScriptAccess=\"" ).append( allowScript )
- .append( "\" " ).append( "pluginspage=\"http://www.macromedia.com/go/getflashplayer\" " )
- .append( "type=\"application/x-shockwave-flash\" menu=\"" ).append( menu ).append( "\">" ).append( EOL );
- content.append( "</embed>" ).append( EOL );
- content.append( "</object>" ).append( EOL );
- content.append( "</center>" ).append( EOL );
-
- sink.rawText( content.toString() );
- }
-}
View
52 ...doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/attachurl/AttachUrlMacro.java
@@ -1,52 +0,0 @@
-package org.apache.maven.doxia.macro.attachurl;
-
-/*
- * 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.doxia.macro.AbstractMacro;
-import org.apache.maven.doxia.macro.MacroExecutionException;
-import org.apache.maven.doxia.macro.MacroRequest;
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * @plexus.component role-hint="attachurl"
- */
-
-public class AttachUrlMacro
- extends AbstractMacro
-{
-
- /** {@inheritDoc} */
- public void execute( Sink sink, MacroRequest request )
- throws MacroExecutionException
- {
- String fileName = (String)request.getParameter( "afterMacroLine" );
- String caption = (String)request.getParameter("caption");
-
- sink.figure();
- sink.figureGraphics("." + "/" + fileName);
- sink.figure_();
- if(caption != null) {
- sink.figureCaption();
- sink.text(caption);
- sink.figureCaption_();
- }
- }
-
-}
View
43 ...a/doxia-core/src/main/java/org/apache/maven/doxia/macro/attachurl/AttachUrlPathMacro.java
@@ -1,43 +0,0 @@
-package org.apache.maven.doxia.macro.attachurl;
-
-/*
- * 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.doxia.macro.AbstractMacro;
-import org.apache.maven.doxia.macro.MacroExecutionException;
-import org.apache.maven.doxia.macro.MacroRequest;
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * @plexus.component role-hint="attachurlpath"
- */
-
-public class AttachUrlPathMacro
- extends AbstractMacro
-{
-
- /** {@inheritDoc} */
- public void execute( Sink sink, MacroRequest request )
- throws MacroExecutionException
- {
- sink.text(".");
-
- }
-
-}
View
48 build-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/code/CodeMacro.java
@@ -1,48 +0,0 @@
-package org.apache.maven.doxia.macro.code;
-
-/*
- * 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.doxia.macro.AbstractMacro;
-import org.apache.maven.doxia.macro.MacroExecutionException;
-import org.apache.maven.doxia.macro.MacroRequest;
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * @plexus.component role-hint="code"
- */
-
-public class CodeMacro
- extends AbstractMacro
-{
-
- /** {@inheritDoc} */
- public void execute( Sink sink, MacroRequest request )
- throws MacroExecutionException
- {
- String langName = (String)request.getParameter( "default" );
-
- startCodeSection(sink, langName);
- }
-
- private void startCodeSection(Sink sink, String lang)
- {
- sink.rawText("<pre name=\"code\" class=\"" + lang +"\">");
- }
-}
View
42 ...-setup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/code/EndCodeMacro.java
@@ -1,42 +0,0 @@
-package org.apache.maven.doxia.macro.code;
-
-/*
- * 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.doxia.macro.AbstractMacro;
-import org.apache.maven.doxia.macro.MacroExecutionException;
-import org.apache.maven.doxia.macro.MacroRequest;
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * @plexus.component role-hint="endcode"
- */
-
-public class EndCodeMacro
- extends AbstractMacro
-{
-
- /** {@inheritDoc} */
- public void execute( Sink sink, MacroRequest request )
- throws MacroExecutionException
- {
- sink.rawText("</pre>");
- }
-
-}
View
40 ...doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/AbstractColorMacro.java
@@ -1,40 +0,0 @@
-package org.apache.maven.doxia.macro.color;
-
-/*
- * 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.doxia.macro.AbstractMacro;
-import org.apache.maven.doxia.macro.MacroExecutionException;
-import org.apache.maven.doxia.macro.MacroRequest;
-import org.apache.maven.doxia.sink.Sink;
-
-
-public abstract class AbstractColorMacro extends AbstractMacro
-{
-
- /** {@inheritDoc} */
- public void execute( Sink sink, MacroRequest request )
- throws MacroExecutionException
- {
- sink.rawText("<font color=\"#" + getHexColor() + "\">");
- }
-
- public abstract String getHexColor();
-
-}
View
38 ...tup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorAquaMacro.java
@@ -1,38 +0,0 @@
-package org.apache.maven.doxia.macro.color;
-
-/*
- * 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.doxia.macro.AbstractMacro;
-import org.apache.maven.doxia.macro.MacroExecutionException;
-import org.apache.maven.doxia.macro.MacroRequest;
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * @plexus.component role-hint="aqua"
- */
-
-public class ColorAquaMacro extends AbstractColorMacro
-{
-
- public String getHexColor() {
- return "00ffff";
- }
-
-}
View
38 ...up/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorBlackMacro.java
@@ -1,38 +0,0 @@
-package org.apache.maven.doxia.macro.color;
-
-/*
- * 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.doxia.macro.AbstractMacro;
-import org.apache.maven.doxia.macro.MacroExecutionException;
-import org.apache.maven.doxia.macro.MacroRequest;
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * @plexus.component role-hint="black"
- */
-
-public class ColorBlackMacro extends AbstractColorMacro
-{
-
- public String getHexColor() {
- return "000000";
- }
-
-}
View
38 ...tup/doxia/doxia-core/src/main/java/org/apache/maven/doxia/macro/color/ColorBlueMacro.java
@@ -1,38 +0,0 @@
-package org.apache.maven.doxia.macro.color;
-
-/*
- * 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.doxia.macro.AbstractMacro;
-import org.apache.maven.doxia.macro.MacroExecutionException;
-import org.apache.maven.doxia.macro.MacroRequest;
-import org.apache.maven.doxia.sink.Sink;
-
-/**
- * @plexus.component role-hint="blue"
- */