maven.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. <postGoal name="sdocbook:prepare-filesystem">
  27. <j:set var="unzipped" value="false" />
  28. <util:available file="${maven.sdocbook.generated.fo}">
  29. <j:set var="unzipped" value="true" />
  30. <echo>Using previusly unzipped docbook files</echo>
  31. </util:available>
  32. <j:if test="${!unzipped}">
  33. <!-- unzip docbook files -->
  34. <ant:unzip dest="${maven.build.dir}"
  35. src="${pom.getDependencyPath('docbook:docbook-xsl')}"/>
  36. <!-- use a custom fo stylesheet -->
  37. <move file="${maven.sdocbook.stylesheets.dir}/fo/docbook.xsl"
  38. tofile="${maven.sdocbook.stylesheets.dir}/fo/docbook-bak.xsl"/>
  39. <copy todir="${maven.sdocbook.stylesheets.dir}/fo">
  40. <fileset dir="${maven.sdocbook.src.dir}/styles/fo"/>
  41. </copy>
  42. <!-- use a custom html stylesheet -->
  43. <move file="${maven.sdocbook.stylesheets.dir}/html/docbook.xsl"
  44. tofile="${maven.sdocbook.stylesheets.dir}/html/docbook-bak.xsl"/>
  45. <copy todir="${maven.sdocbook.stylesheets.dir}/html">
  46. <fileset dir="${maven.sdocbook.src.dir}/styles/html"/>
  47. </copy>
  48. <!-- copy images -->
  49. <copy todir="${maven.sdocbook.stylesheets.dir}/images">
  50. <fileset dir="${maven.sdocbook.src.dir}/images"/>
  51. </copy>
  52. </j:if>
  53. </postGoal>
  54. <preGoal name="site">
  55. <attainGoal name="sdocbook"/>
  56. </preGoal>
  57. </project>