You are here

Ant build.xml file

I am incredibly sick of 100+ line build.xml files. For this reason, here is a short, simple build.xml that I (and others) can reference:

<project name="eyes-ip" default="jar" basedir=".">
  
  <property name="src" location="src"/>
  <property name="build" location="build"/>
  <property name="jar" location="eyes-ip.jar"/>
  
  <target name="init">
    <mkdir dir="${build}"/>
  </target>

  <target name="compile" depends="init">
    <javac srcdir="${src}" destdir="${build}"/>
  </target>

  <target name="jar" depends="compile">
    <jar jarfile="${jar}" basedir="${build}">
      <fileset dir="${build}"/>
      <manifest>
        <attribute name="Main-Class" value="org.cablelabs.eyesip.EyesIPClient"/>
      </manifest>
    </jar>
  </target>

  <target name="clean">
    <delete dir="${build}"/>
    <delete file="${jar}"/>
  </target>
    
</project>