build.xml 1.1 KB

1234567891011121314151617181920212223
  1. <?xml version="1.0" ?>
  2. <project name="JarBuild" basedir="." default="archive">
  3. <target name="init" description="Initialize properties">
  4. <property name="project.name" value="rockpaperscissors"/>
  5. <property name="src.dir" value="src"/>
  6. <property name="build.dir" value="build"/>
  7. <property name="classes.dir" value="${build.dir}/classes"/>
  8. <property name="etc.dir" value="etc"/>
  9. </target>
  10. <target name="prepare" description="Create the build and classes directories" depends="init">
  11. <mkdir dir="${classes.dir}"/>
  12. </target>
  13. <target name="compile" description="Compiles our code" depends="prepare">
  14. <javac srcdir="${src.dir}" destdir="${classes.dir}" includeantruntime="false"/>
  15. </target>
  16. <target name="archive" description="Archives the bytecode" depends="compile">
  17. <jar destfile="${build.dir}/${project.name}.jar" basedir="${classes.dir}" manifest="etc/MANIFEST.MF"/>
  18. </target>
  19. <target name="clean" description="Cleans my SHIT up" depends="init">
  20. <delete dir="${build.dir}"/>
  21. </target>
  22. </project>