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 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?xml version="1.0"?>
  2. <project default="compile" basedir=".">
  3. <property name="Name" value="Fop Embedding Examples"/>
  4. <property name="name" value="embedding"/>
  5. <property name="version" value="0.20.5cvs"/>
  6. <!-- compiler switches -->
  7. <property name="debug" value="on"/>
  8. <property name="optimize" value="off"/>
  9. <property name="deprecation" value="on"/>
  10. <!-- directories -->
  11. <property name="src.dir" value="./java"/>
  12. <property name="fop.lib.dir" value="../../lib"/>
  13. <property name="lib.dir" value="./lib"/>
  14. <property name="build.dir" value="./build"/>
  15. <property name="build.src" value="./build/src"/>
  16. <property name="build.dest" value="./build/classes"/>
  17. <!-- stuff -->
  18. <path id="project.class.path">
  19. <fileset dir="${fop.lib.dir}">
  20. <include name="avalon-framework*.jar"/>
  21. <include name="batik*.jar"/>
  22. <include name="xml-apis.jar"/>
  23. <include name="xerces*.jar"/>
  24. <include name="xalan*.jar"/>
  25. </fileset>
  26. <fileset dir="${fop.lib.dir}/../build">
  27. <include name="fop.jar"/>
  28. </fileset>
  29. </path>
  30. <!-- =================================================================== -->
  31. <!-- Initialization target -->
  32. <!-- =================================================================== -->
  33. <target name="init">
  34. <tstamp/>
  35. <filter token="version" value="${version}"/>
  36. <property name="year" value="2002-2003"/>
  37. <echo message="------------------- ${Name} ${version} [${year}] ----------------"/>
  38. </target>
  39. <!-- =================================================================== -->
  40. <!-- Prepares the build directory -->
  41. <!-- =================================================================== -->
  42. <target name="prepare" depends="init">
  43. <!-- create directories -->
  44. <echo message="Preparing the build directories"/>
  45. <mkdir dir="${build.dir}"/>
  46. <mkdir dir="${build.dest}"/>
  47. </target>
  48. <!-- =================================================================== -->
  49. <!-- Compiles the source directory -->
  50. <!-- =================================================================== -->
  51. <target name="compile" depends="prepare" description="Compiles the examples">
  52. <echo message="Compiling the sources"/>
  53. <javac srcdir="${src.dir}" destdir="${build.dest}" debug="${debug}" deprecation="${deprecation}" optimize="${optimize}">
  54. <classpath refid="project.class.path"/>
  55. </javac>
  56. </target>
  57. <!-- =================================================================== -->
  58. <!-- Runs the various examples -->
  59. <!-- =================================================================== -->
  60. <target name="example1" depends="compile" description="Runs the FO to PDF example">
  61. <echo message="Running the FO to PDF example"/>
  62. <java classname="${name}.ExampleFO2PDF" fork="yes">
  63. <classpath>
  64. <path refid="project.class.path"/>
  65. <pathelement location="${build.dest}"/>
  66. </classpath>
  67. </java>
  68. </target>
  69. <target name="example2" depends="compile" description="Runs the XML to FO example">
  70. <echo message="Running the XML to FO example"/>
  71. <java classname="${name}.ExampleXML2FO" fork="yes">
  72. <classpath>
  73. <path refid="project.class.path"/>
  74. <pathelement location="${build.dest}"/>
  75. </classpath>
  76. </java>
  77. </target>
  78. <target name="example3" depends="compile" description="Runs the XML to PDF example">
  79. <echo message="Running the XML to PDF example"/>
  80. <java classname="${name}.ExampleXML2PDF" fork="yes">
  81. <classpath>
  82. <path refid="project.class.path"/>
  83. <pathelement location="${build.dest}"/>
  84. </classpath>
  85. </java>
  86. </target>
  87. <target name="example4" depends="compile" description="Runs the Object to XML example">
  88. <echo message="Running the Object to XML example"/>
  89. <java classname="${name}.ExampleObj2XML" fork="yes">
  90. <classpath>
  91. <path refid="project.class.path"/>
  92. <pathelement location="${build.dest}"/>
  93. </classpath>
  94. </java>
  95. </target>
  96. <target name="example5" depends="compile" description="Runs the Object to PDF example">
  97. <echo message="Running the Object to PDF example"/>
  98. <java classname="${name}.ExampleObj2PDF" fork="yes">
  99. <classpath>
  100. <path refid="project.class.path"/>
  101. <pathelement location="${build.dest}"/>
  102. </classpath>
  103. </java>
  104. </target>
  105. <!-- =================================================================== -->
  106. <!-- Clean targets -->
  107. <!-- =================================================================== -->
  108. <target name="clean" depends="init" description="Cleans the build directory">
  109. <delete dir="${build.dir}"/>
  110. </target>
  111. </project>