You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.xml 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <?xml version="1.0"?>
  2. <!--
  3. Copyright 2002-2004 The Apache Software Foundation
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. -->
  14. <!-- $Id$ -->
  15. <project default="compile" basedir=".">
  16. <property name="Name" value="Fop Embedding Examples"/>
  17. <property name="name" value="embedding"/>
  18. <property name="version" value="1.0dev"/>
  19. <!-- compiler switches -->
  20. <property name="debug" value="on"/>
  21. <property name="optimize" value="off"/>
  22. <property name="deprecation" value="on"/>
  23. <!-- directories -->
  24. <property name="src.dir" value="./java"/>
  25. <property name="fop.lib.dir" value="../../lib"/>
  26. <property name="lib.dir" value="./lib"/>
  27. <property name="build.dir" value="./build"/>
  28. <property name="build.src" value="./build/src"/>
  29. <property name="build.dest" value="./build/classes"/>
  30. <!-- stuff -->
  31. <path id="project.class.path">
  32. <fileset dir="${fop.lib.dir}">
  33. <include name="avalon-framework*.jar"/>
  34. <include name="batik*.jar"/>
  35. <include name="xml-apis.jar"/>
  36. <include name="xerces*.jar"/>
  37. <include name="xalan*.jar"/>
  38. <include name="commons-io*.jar"/>
  39. </fileset>
  40. <fileset dir="${fop.lib.dir}/../build">
  41. <include name="fop.jar"/>
  42. </fileset>
  43. </path>
  44. <!-- =================================================================== -->
  45. <!-- Initialization target -->
  46. <!-- =================================================================== -->
  47. <target name="init">
  48. <tstamp/>
  49. <filter token="version" value="${version}"/>
  50. <property name="year" value="2002-2004"/>
  51. <echo message="------------------- ${Name} ${version} [${year}] ----------------"/>
  52. </target>
  53. <!-- =================================================================== -->
  54. <!-- Prepares the build directory -->
  55. <!-- =================================================================== -->
  56. <target name="prepare" depends="init">
  57. <!-- create directories -->
  58. <echo message="Preparing the build directories"/>
  59. <mkdir dir="${build.dir}"/>
  60. <mkdir dir="${build.dest}"/>
  61. </target>
  62. <!-- =================================================================== -->
  63. <!-- Compiles the source directory -->
  64. <!-- =================================================================== -->
  65. <target name="compile" depends="prepare" description="Compiles the examples">
  66. <echo message="Compiling the sources"/>
  67. <javac srcdir="${src.dir}" destdir="${build.dest}" debug="${debug}" deprecation="${deprecation}" optimize="${optimize}">
  68. <classpath refid="project.class.path"/>
  69. </javac>
  70. </target>
  71. <!-- =================================================================== -->
  72. <!-- Runs the various examples -->
  73. <!-- =================================================================== -->
  74. <target name="example1" depends="compile" description="Runs the FO to PDF example">
  75. <echo message="Running the FO to PDF example"/>
  76. <java classname="${name}.ExampleFO2PDF" fork="yes">
  77. <classpath>
  78. <path refid="project.class.path"/>
  79. <pathelement location="${build.dest}"/>
  80. </classpath>
  81. </java>
  82. </target>
  83. <target name="example2" depends="compile" description="Runs the XML to FO example">
  84. <echo message="Running the XML to FO example"/>
  85. <java classname="${name}.ExampleXML2FO" fork="yes">
  86. <classpath>
  87. <path refid="project.class.path"/>
  88. <pathelement location="${build.dest}"/>
  89. </classpath>
  90. </java>
  91. </target>
  92. <target name="example3" depends="compile" description="Runs the XML to PDF example">
  93. <echo message="Running the XML to PDF example"/>
  94. <java classname="${name}.ExampleXML2PDF" fork="yes">
  95. <classpath>
  96. <path refid="project.class.path"/>
  97. <pathelement location="${build.dest}"/>
  98. </classpath>
  99. </java>
  100. </target>
  101. <target name="example4" depends="compile" description="Runs the Object to XML example">
  102. <echo message="Running the Object to XML example"/>
  103. <java classname="${name}.ExampleObj2XML" fork="yes">
  104. <classpath>
  105. <path refid="project.class.path"/>
  106. <pathelement location="${build.dest}"/>
  107. </classpath>
  108. </java>
  109. </target>
  110. <target name="example5" depends="compile" description="Runs the Object to PDF example">
  111. <echo message="Running the Object to PDF example"/>
  112. <java classname="${name}.ExampleObj2PDF" fork="yes">
  113. <classpath>
  114. <path refid="project.class.path"/>
  115. <pathelement location="${build.dest}"/>
  116. </classpath>
  117. </java>
  118. </target>
  119. <!-- =================================================================== -->
  120. <!-- Clean targets -->
  121. <!-- =================================================================== -->
  122. <target name="clean" depends="init" description="Cleans the build directory">
  123. <delete dir="${build.dir}"/>
  124. </target>
  125. </project>