1 <?xml version="1.0" encoding="UTF-8"?>
3 <project name="lwes-java" basedir="." default="build">
4 <property name="version" value="0.1.1"/>
5 <property name="src.dir" value="src"/>
6 <property name="build.dir" value="build"/>
7 <property name="docs.dir" value="docs/api"/>
8 <property name="jar.file" value="lwes.jar"/>
9 <property name="dist.name" value="lwes-java-${version}"/>
12 <delete dir="${build.dir}"/>
13 <delete file="${jar.file}"/>
14 <delete file="${dist.name}.tar.gz"/>
15 <delete file="${dist.name}.zip"/>
18 <target name="compile">
19 <mkdir dir="${build.dir}"/>
20 <javac srcdir="${src.dir}" destdir="${build.dir}" fork="yes"
21 source="1.5" target="1.5"/>
25 <javadoc destdir="${docs.dir}">
26 <packageset dir="${src.dir}" defaultexcludes="yes">
32 <target name="jar" depends="compile">
33 <jar destfile="${jar.file}" basedir="${build.dir}"/>
36 <target name="build" depends="clean,jar"/>
38 <target name="dist" depends="build,docs">
39 <tar destfile="${dist.name}.tar">
40 <tarfileset dir="${docs.dir}" prefix="${dist.name}/${docs.dir}">
43 <tarfileset dir="." prefix="${dist.name}">
44 <include name="${jar.file}"/>
45 <include name="LICENSE"/>
46 <include name="README"/>
49 <zip destfile="${dist.name}.zip">
50 <zipfileset dir="${docs.dir}" prefix="${dist.name}/${docs.dir}">
53 <zipfileset dir="." prefix="${dist.name}">
54 <include name="${jar.file}"/>
55 <include name="LICENSE"/>
56 <include name="README"/>
59 <gzip destfile="${dist.name}.tar.gz" src="${dist.name}.tar"/>
60 <delete file="${dist.name}.tar"/>
61 <delete dir="${dist.name}"/>