This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

grom358

By: a guest on May 6th, 2010  |  syntax: None  |  size: 3.31 KB  |  views: 151  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <project basedir="." default="test" name="ZemScript">
  3.     <property environment="env"/>
  4.     <property name="debuglevel" value="source,lines,vars"/>
  5.     <property name="target" value="1.6"/>
  6.     <property name="source" value="1.6"/>
  7.     <property name="jar.file" value="build/zem.jar"/>
  8.     <property name="junit.lib" value="lib/junit-4.6.jar"/>
  9.     <target name="init">
  10.         <mkdir dir="build"/>
  11.         <mkdir dir="build/debug"/>
  12.         <mkdir dir="build/release"/>
  13.         <mkdir dir="dist"/>
  14.     </target>
  15.     <target name="clean">
  16.         <delete dir="build"/>
  17.         <delete dir="dist"/>
  18.     </target>
  19.     <target name="build-debug" depends="init">
  20.         <javac debug="true" debuglevel="${debuglevel}" destdir="build/debug" source="${source}" target="${target}">
  21.             <classpath>
  22.                 <pathelement location="${junit.lib}"/>
  23.             </classpath>
  24.             <src path="src"/>
  25.             <src path="test"/>
  26.         </javac>
  27.     </target>
  28.     <target name="build-release" depends="init">
  29.         <javac destdir="build/release" source="${source}" target="${target}">
  30.             <src path="src"/>
  31.         </javac>
  32.     </target>
  33.     <target name="build" depends="build-debug, build-release"/>
  34.     <target name="test" depends="build-debug">
  35.         <junit printsummary="yes" haltonfailure="yes">
  36.             <classpath>
  37.                 <pathelement location="build/debug"/>
  38.                 <pathelement location="${junit.lib}"/>
  39.             </classpath>
  40.             <formatter type="brief" usefile="false"/>
  41.             <test name="net.zeminvaders.lang.PeekReaderTest"/>
  42.             <test name="net.zeminvaders.lang.LexerTest"/>
  43.             <test name="net.zeminvaders.lang.ParserTest"/>
  44.             <test name="net.zeminvaders.lang.InterpreterTest"/>
  45.         </junit>
  46.     </target>
  47.     <target name="sample" depends="build-debug">
  48.         <java classname="Test" classpath="build/debug"/>
  49.     </target>
  50.     <target name="bin-dist" depends="build-release">
  51.         <jar destfile="${jar.file}" basedir="build/release">
  52.             <manifest>
  53.                 <attribute name="Main-Class" value="net.zeminvaders.lang.Launcher"/>
  54.             </manifest>
  55.         </jar>
  56.         <zip destfile="dist/${ant.project.name}.zip">
  57.             <zipfileset file="${jar.file}" prefix="${ant.project.name}"/>
  58.             <zipfileset dir="bin" prefix="${ant.project.name}"/>
  59.             <zipfileset file="LICENSE.txt" prefix="${ant.project.name}"/>
  60.             <zipfileset file="sample.zem" prefix="${ant.project.name}"/>
  61.         </zip>
  62.     </target>
  63.     <target name="src-dist" depends="init">
  64.         <zip destfile="dist/${ant.project.name}_src.zip">
  65.             <zipfileset dir="bin" prefix="${ant.project.name}/bin"/>
  66.             <zipfileset dir="src" prefix="${ant.project.name}/src"/>
  67.             <zipfileset dir="test" prefix="${ant.project.name}/test"/>
  68.             <zipfileset dir="lib" prefix="${ant.project.name}/lib"/>
  69.             <zipfileset file="${ant.file}" prefix="${ant.project.name}"/>
  70.             <zipfileset file="LICENSE.txt" prefix="${ant.project.name}"/>
  71.             <zipfileset file="sample.zem" prefix="${ant.project.name}"/>
  72.         </zip>
  73.     </target>
  74.     <target name="dist" depends="src-dist, bin-dist"/>
  75. </project>
clone this paste RAW Paste Data