Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 78 lines (68 sloc) 2.74 KB
<?xml version="1.0" encoding="UTF-8"?>
<project name="prottest-3.4.2" default="jar" basedir=".">
<property name="src.dir" location="src/main/java" />
<property name="build.base.dir" location="build" />
<property name="build.dir" location="${build.base.dir}/classes" />
<property name="lib.dir" location="lib" />
<property name="dist.dir" location="dist" />
<property name="exe.dir" location="${dist.dir}/bin" />
<property name="log.dir" location="${dist.dir}/log" />
<property name="src.resources.dir" location="src/main/resources" />
<property name="html.template.dir" location="${src.resources.dir}/resources" />
<property name="jarfile" location="${dist.dir}/${ant.project.name}.jar" />
<property name="compile.debug" value="false" />
<fileset id="lib.jars" dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<path id="lib.path">
<fileset refid="lib.jars" />
</path>
<!-- Stub install target. Install should depend on the 'jar' target,
and copy the built objects to the 'dist' directory. -->
<target name="install" description="Install jar" depends="jar">
</target>
<target name="compile" description="Compile code">
<mkdir dir="${build.dir}" />
<mkdir dir="${lib.dir}" />
<property environment="env" />
<property name="java6.boot.classpath" value="${env.JAVA6_BOOTCLASSES}" />
<javac srcdir="${src.dir}" destdir="${build.dir}" includeAntRuntime="no"
target="1.6" source="1.6" bootclasspath="${java5.boot.classpath}"
classpathref="lib.path" debug="${compile.debug}">
</javac>
</target>
<target name="jar" depends="compile" description="Build jar">
<mkdir dir="${dist.dir}" />
<jar jarfile="${jarfile}" basedir="${build.dir}" manifest="manifest.mf">
<fileset id="jar.additional" dir="${src.dir}">
<include name="**/*.properties" />
<include name="**/*.png" />
<include name="**/*.gif" />
<include name="**/*.html" />
</fileset>
<!-- Merge library jars into final jar file-->
<!--<zipgroupfileset refid="lib.jars"/>-->
</jar>
<mkdir dir="${dist.dir}/lib" />
<copy todir="${dist.dir}/lib">
<fileset id="lib.jars" dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</copy>
<copy todir="${dist.dir}">
<fileset dir="${src.resources.dir}">
<include name="**/*" />
</fileset>
</copy>
<mkdir dir="${log.dir}" />
<chmod perm="755" dir="${dist.dir}" includes="*.sh *.bat prottest3" />
<chmod perm="644" dir="${exe.dir}" includes="*" />
</target>
<target name="run" depends="jar" description="Run jar file">
<java jar="${jarfile}" fork="yes" failonerror="true" />
</target>
<target name="clean" description="Remove build and dist directories">
<delete dir="${build.base.dir}" />
<delete dir="${dist.dir}" />
</target>
</project>