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

script.xml 2.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <project default="build" name="Ant2 script tasks" basedir="..">
  2. <property name="src.dir" value="src"/>
  3. <property name="lib.dir" value="lib"/>
  4. <property name="java.dir" value="${src.dir}/java"/>
  5. <property name="bin.dir" value="bin"/>
  6. <property name="dist.dir" value="dist"/>
  7. <property name="javadocs.dir" value="${dist.dir}/javadocs"/>
  8. <property name="distlib.dir" value="${dist.dir}/lib"/>
  9. <property name="debug" value="true"/>
  10. <property name="ant.package" value="org/apache/tools/ant"/>
  11. <property name="optional.package" value="${ant.package}/taskdefs/optional"/>
  12. <property name="optional.type.package" value="${ant.package}/types/optional"/>
  13. <property name="util.package" value="${ant.package}/util"/>
  14. <property name="regexp.package" value="${util.package}/regexp"/>
  15. <path id="classpath.script">
  16. <pathelement location="${distlib.dir}/init.jar"/>
  17. <fileset dir="${lib.dir}/antlib/script" includes="*.jar"/>
  18. <pathelement location="${distlib.dir}/common/common.jar"/>
  19. </path>
  20. <target name="check_bsf">
  21. <available property="bsf.present"
  22. classname="com.ibm.bsf.BSFManager"
  23. classpathref="classpath.script" />
  24. </target>
  25. <target name="nobsf" unless="bsf.present">
  26. <echo message="You must provide the bsf.jar library in the ${lib.dir}/antlib/script directory"/>
  27. </target>
  28. <target name="build" depends="check_bsf, nobsf" if="bsf.present">
  29. <mkdir dir="${bin.dir}/antlibs/script"/>
  30. <mkdir dir="${distlib.dir}/antlibs"/>
  31. <depend destdir="${bin.dir}/antlibs/script" srcdir="${java.dir}/antlibs/script">
  32. <classpath refid="classpath.script"/>
  33. </depend>
  34. <javac destdir="${bin.dir}/antlibs/script" srcdir="${java.dir}/antlibs/script" debug="${debug}">
  35. <classpath refid="classpath.script"/>
  36. </javac>
  37. <jar basedir="${bin.dir}/antlibs/script" jarfile="${distlib.dir}/antlibs/script.tsk">
  38. <metainf dir="${java.dir}/antlibs/script"
  39. includes="antlib.xml"/>
  40. </jar>
  41. </target>
  42. </project>