build.xml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="arun" default="arun" basedir=".">
  3. <description>Builds, tests, and runs the project arun.</description>
  4. <property name="main.class" value="" />
  5. <property name="program.args" value="" />
  6. <property name="jvm.args" value="-Xmx128m -Xms128m -XX:+UseG1GC" />
  7. <property name="runfork" value="true" />
  8. <property name="src.dir" location="java" />
  9. <property name="classes.dir" location="classes" />
  10. <property name="lib.dir" location="lib"/>
  11. <property name="tomcat.home" value="D:/Server/apache-tomcat-7.0.29"></property>
  12. <path id="classpath">
  13. <path location="${classes.dir}" />
  14. <fileset dir="${lib.dir}" includes="**/*.jar"/>
  15. </path>
  16. <target name="compile" description="run compile" >
  17. <javac srcdir="${src.dir}"
  18. destdir="${classes.dir}"
  19. includeantruntime="no"
  20. excludes="**/*.svn,*.svn"
  21. source="1.6"
  22. target="1.6"
  23. deprecation="true"
  24. failonerror="true"
  25. debug="true">
  26. <classpath refid="classpath" />
  27. </javac>
  28. </target>
  29. <target name="arun" description="run program" >
  30. <java classname="${main.class}" fork="${runfork}">
  31. <jvmarg line="${jvm.args}"/>
  32. <classpath refid="classpath" />
  33. <arg value="${program.args}"/>
  34. </java>
  35. </target>
  36. <target name="tomcat-start">
  37. <exec dir="${tomcat.home}/bin" executable="cmd">
  38. <env key="CATALINA_HOME" path="${tomcat.home}"/>
  39. <arg value="/C startup.bat"/>
  40. </exec>
  41. </target>
  42. <target name="tomcat-stop">
  43. <exec dir="${tomcat.home}/bin" executable="cmd">
  44. <env key="CATALINA_HOME" path="${tomcat.home}"/>
  45. <arg value="/c shutdown.bat"/>
  46. </exec>
  47. </target>
  48. </project>