maven.xml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <!--
  2. * ========================================================================
  3. *
  4. * Copyright 2004 Acegi Technology Pty Limited
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. *
  18. * ========================================================================
  19. -->
  20. <project
  21. xmlns:j="jelly:core"
  22. xmlns:ant="jelly:ant"
  23. xmlns:util="jelly:util"
  24. xmlns:maven="jelly:maven"
  25. >
  26. <!-- =========== Set root dir =========== -->
  27. <j:set var="rootdir">${basedir}</j:set>
  28. <j:while test="${true}">
  29. <util:available file="${rootdir}/core/project.xml">
  30. <j:break/>
  31. </util:available>
  32. <j:set var="rootdir">${rootdir}/..</j:set>
  33. </j:while>
  34. <ant:dirname property="rootdirname" file="${rootdir}/project.xml"/>
  35. <j:set var="rootdir">${rootdirname}</j:set>
  36. <echo>Using root dir: ${rootdir}</echo>
  37. <!--
  38. |
  39. | Override the default clover-setup task from the clover plugin
  40. |
  41. -->
  42. <postGoal name="clover:on">
  43. <ant:clover-setup
  44. initstring="${basedir}/target/clover/database/clover_coverage.db"
  45. flushpolicy="interval"
  46. flushinterval="500">
  47. <ant:fileset dir="${maven.src.dir}">
  48. <exclude name="**/*Exception.java"/>
  49. </ant:fileset>
  50. <!-- <statementContext id="nolog" regexp="^if \(logger.*\).*}"/>
  51. <statementContext id="nojbosslog" regexp="^if \(super.logger.*\).*}"/>
  52. -->
  53. </ant:clover-setup>
  54. </postGoal>
  55. <goal name="docclean" description="Delete temporary and distribution directories for docs">
  56. <delete quiet="true" dir="${basedir}/${dist.ref.dir}/pdf"/>
  57. <delete quiet="true" dir="${basedir}/${dist.ref.dir}/html_single"/>
  58. <delete quiet="true" dir="${basedir}/${dist.ref.dir}/html"/>
  59. </goal>
  60. <goal name="docpdf" prereqs="preparedocs" description="Compile reference documentation to pdf">
  61. <mkdir dir="${basedir}/${dist.ref.dir}/pdf/images"/>
  62. <copy todir="${basedir}/${dist.ref.dir}/pdf/images">
  63. <fileset dir="${basedir}/${doc.ref.dir}/src/images">
  64. <include name="*.gif"/>
  65. <include name="*.svg"/>
  66. <include name="*.jpg"/>
  67. </fileset>
  68. </copy>
  69. <!-- ${systemScope.setProperty('javax.xml.transform.TransformerFactory','org.apache.xalan.processor.TransformerFactoryImpl')} -->
  70. ${systemScope.setProperty('javax.xml.transform.TransformerFactory','com.icl.saxon.TransformerFactoryImpl')}
  71. <!--
  72. <style basedir="${basedir}/${doc.ref.dir}/src/"
  73. extension=".fop"
  74. destdir="${dist.ref.dir}/pdf"
  75. style="${basedir}/${doc.ref.dir}/styles/fopdf.xsl"
  76. includes="index.xml"
  77. />
  78. -->
  79. <java classname="com.icl.saxon.StyleSheet" fork="true" dir="${doc.ref.dir}">
  80. <classpath>
  81. <fileset dir="${basedir}/${doc.ref.dir}/lib">
  82. <include name="**/*.jar"/>
  83. </fileset>
  84. </classpath>
  85. <sysproperty key="java.awt.headless" value="true"/>
  86. <!-- classpath refid="maven.dependency.classpath"/ -->
  87. <arg value="-o"/>
  88. <arg value="${basedir}/${doc.ref.dir}/pdf/index.fop"/>
  89. <arg value="${basedir}/${doc.ref.dir}/src/index.xml"/>
  90. <arg value="${basedir}/${doc.ref.dir}/styles/fopdf.xsl"/>
  91. </java>
  92. <java classname="org.apache.fop.apps.Fop" fork="true" dir="${doc.ref.dir}">
  93. <classpath>
  94. <fileset dir="${basedir}/${doc.ref.dir}/lib">
  95. <include name="**/*.jar"/>
  96. </fileset>
  97. </classpath>
  98. <sysproperty key="java.awt.headless" value="true"/>
  99. <!-- classpath refid="maven.dependency.classpath"/ -->
  100. <arg value="${basedir}/${doc.ref.dir}/pdf/index.fop"/>
  101. <arg value="${basedir}/${doc.ref.dir}/pdf/acegi-security-reference.pdf"/>
  102. </java>
  103. <delete file="${dist.ref.dir}/pdf/index.fop"/>
  104. </goal>
  105. <goal name="dochtml" prereqs="preparedocs" description="Compile reference documentation to chunked html">
  106. <!-- ${systemScope.setProperty('javax.xml.transform.TransformerFactory','org.apache.xalan.processor.TransformerFactoryImpl')} -->
  107. ${systemScope.setProperty('javax.xml.transform.TransformerFactory','com.icl.saxon.TransformerFactoryImpl')}
  108. <mkdir dir="${doc.ref.dir}/html/images"/>
  109. <copy todir="${basedir}/${doc.ref.dir}/html/images">
  110. <fileset dir="${basedir}/${doc.ref.dir}/src/images">
  111. <include name="*.gif"/>
  112. <include name="*.svg"/>
  113. <include name="*.jpg"/>
  114. </fileset>
  115. </copy>
  116. <!--
  117. <style basedir="${basedir}/${doc.ref.dir}/src/"
  118. destdir="${doc.ref.dir}/html"
  119. style="${basedir}/${doc.ref.dir}/styles/html_chunk.xsl"
  120. includes="index.xml"
  121. >
  122. <classpath refid="maven.dependency.classpath"/>
  123. </style>
  124. -->
  125. <java classname="com.icl.saxon.StyleSheet" fork="true" dir="${dist.ref.dir}/html/">
  126. <classpath>
  127. <fileset dir="${basedir}/${doc.ref.dir}/lib">
  128. <include name="**/*.jar"/>
  129. </fileset>
  130. </classpath>
  131. <!-- classpath refid="maven.dependency.classpath"/ -->
  132. <arg value="${basedir}/${doc.ref.dir}/src/index.xml"/>
  133. <arg value="${basedir}/${doc.ref.dir}/styles/html_chunk.xsl"/>
  134. </java>
  135. </goal>
  136. <goal name="dochtmlsingle" description="Compile reference documentation to single html">
  137. <mkdir dir="${dist.ref.dir}/html_single/images"/>
  138. <copy todir="${basedir}/${dist.ref.dir}/html_single/images">
  139. <fileset dir="${basedir}/${doc.ref.dir}/src/images">
  140. <include name="*.gif"/>
  141. <include name="*.svg"/>
  142. <include name="*.jpg"/>
  143. </fileset>
  144. </copy>
  145. <java classname="com.icl.saxon.StyleSheet" fork="true" dir="${doc.ref.dir}">
  146. <classpath>
  147. <fileset dir="${basedir}/${doc.dir}/reference/lib">
  148. <include name="**/*.jar"/>
  149. </fileset>
  150. </classpath>
  151. <arg value="-o"/>
  152. <arg value="${basedir}/${dist.ref.dir}/html_single/index.html"/>
  153. <arg value="${basedir}/${doc.ref.dir}/src/index.xml"/>
  154. <arg value="${basedir}/${doc.ref.dir}/styles/html.xsl"/>
  155. </java>
  156. </goal>
  157. <goal name="refdoc" prereqs="dochtml,dochtmlsingle,docpdf" description="Generate and copy reference documentation">
  158. <mkdir dir="${maven.build.dir}/docs"/>
  159. <mkdir dir="${maven.build.dir}/docs/ref"/>
  160. <copy todir="${maven.build.dir}/docs/ref">
  161. <fileset dir="${doc.ref.dir}/html"/>
  162. </copy>
  163. <copy file="${doc.ref.dir}/pdf/acegi-security-reference.pdf"
  164. todir="${maven.build.dir}/docs/ref"/>
  165. <copy file="${doc.ref.dir}/html_single/index.html"
  166. tofile="${maven.build.dir}/docs/ref/acegi-security-reference.html"/>
  167. </goal>
  168. </project>