2 <project name="weibo4j" default="all" basedir=".">
4 <format property="now.date" pattern="yyyyMMddhhmmss" locale="zh" />
6 <property name="src.dir" value="${basedir}/src" />
7 <property name="lib.dir" value="${basedir}/lib" />
8 <property name="dest.dir" value="${basedir}/dest" />
9 <property name="jar.name" value="weibo4j-${now.date}.jar" />
10 <property name="jar.dir" value="${basedir}/dict" />
11 <fileset id="libDir" dir="${lib.dir}">
12 <include name="**/*.jar" />
13 <exclude name="./junit-4.1.jar" />
16 <fileset refid="libDir">
19 <target name="compile">
20 <mkdir dir="${dest.dir}" />
21 <javac srcdir="${src.dir}" destdir="${dest.dir}" encoding="UTF-8" classpathref="classpath" />
23 <target name="jar" depends="compile">
24 <mkdir dir="${jar.dir}" />
26 <fileset dir="${jar.dir}">
27 <include name="**/*" />
30 <jar destfile="${jar.dir}/${jar.name}" basedir="${dest.dir}" />
31 <copy todir="${jar.dir}" overwrite="true">
32 <fileset refid="libDir" />
35 <target name="clean" description="Cleans up all build-generated output">
36 <delete dir="${dest.dir}" failonerror="false" />
39 <target name="all" depends="jar,clean" />