Source

xwork / src / etc / build.xml

Full commit
<?xml version="1.0"?>
<project name="xwork" default="default">

  <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
  <!--                   directories                     -->
  <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
  <property name="src.dir" value="src/java"/>
  <property name="build.dir" value="build"/>
  <property name="build.classes.dir" value="${build.dir}/classes"/>
  <property name="dist.dir" value="dist"/>
  <property name="lib.dir" value="lib"/>

  <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
  <!--                    paths                          -->
  <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
  <path id="compile.classpath">
    <pathelement location="${build.classes.dir}"/>
    <fileset dir="${lib.dir}">
      <include name="**/*.jar" />
    </fileset>
  </path>

  <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
  <!--                  targets                          -->
  <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
  <target name="default"
          depends="dist"
          description="default: build everything"
  />

  <target name="clean" description="remove all built files">
    <delete dir="${build.dir}" />
    <delete dir="${dist.dir}" />
  </target>

  <target name="dist"
          depends="compile"
          description="create distributables (jars etc)">
    <mkdir dir="${dist.dir}" />
    <jar jarfile="${dist.dir}/xwork2.jar"> 
      <fileset dir="${build.classes.dir}"/>
    </jar>
  </target>
  <target name="compile" description="compile java">
    <mkdir dir="${build.classes.dir}" />
    <javac srcdir="${src.dir}"
           destdir="${build.classes.dir}"
           classpathref="compile.classpath"
           debug="on"
           deprecation="on"/>
  </target>

</project>