-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
57 lines (49 loc) · 2.24 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?xml version="1.0"?>
<project name="bit4j" basedir="." default="help">
<property name="java-src.dir" value="src" />
<property name="lib.dir" value="lib" />
<property name="build.dir" value="build" />
<property name="project.name" value="bit4j" />
<property name="project.version" value="0.2" />
<property name="dist.dir" value="dist" />
<property name="archive.name-bit4j" value="bit4j-${project.version}" />
<property name="exclude-classes" value="com/bit4j/dummy/**,com/bit4j/facebook/test/**"></property>
<path id="classpath">
<fileset dir="${lib.dir}"/>
<pathelement path="${build.dir}" />
</path>
<target name="help">
<echo message="" />
<echo message="${project.name} build file" />
<echo message="-----------------------------------" />
<echo message="" />
<echo message="Available targets are:" />
<echo message="" />
<echo message="clean --> Deletes compiled classes and JAR" />
<echo message="" />
<echo message="compile --> Compile all Java files" />
<echo message="jar --> Package as JAR file" />
</target>
<target name="compile" description="Compile main source java files">
<mkdir dir="${build.dir}/classes" />
<javac destdir="${build.dir}/classes" debug="true" optimize="false" encoding="iso-8859-1" deprecation="false" failonerror="true" excludes="${exclude-classes}">
<src path="${java-src.dir}" />
<classpath refid="classpath" />
</javac>
</target>
<target name="jar" depends="compile" description="packages up the bit4j class files into jar files">
<jar destfile="${lib.dir}/${archive.name-bit4j}.jar" basedir="${build.dir}/classes" />
<copy todir="${dist.dir}/dependencies" >
<fileset dir="${lib.dir}" includes="commons-codec-1.3.jar,commons-httpclient-3.1.jar,commons-logging-1.1.1.jar,gson-1.3.jar" />
</copy>
<copy todir="${dist.dir}" >
<fileset dir="${lib.dir}" includes="${archive.name-bit4j}.jar" />
</copy>
<delete file="${lib.dir}/${archive.name-bit4j}.jar"/>
</target>
<target name="clean" description="Clean output directories">
<property name="archive.name" value="${project.name}-${project.version}" />
<delete dir="build" />
<delete file="${archive.name}.jar" />
</target>
</project>