-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
executable file
·103 lines (90 loc) · 3.82 KB
/
build.xml
File metadata and controls
executable file
·103 lines (90 loc) · 3.82 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<project default="compile">
<!-- build.xml for lab06, S13, CS56
author: Phill Conrad
Note: for this lab, you should not need to edit this file -->
<property environment="env"/>
<!-- load the environment variables -->
<property name="packagePrefix" value="com.nguyenmp.grawler.tests"/>
<property name="mainClass" value="Test"/>
<property name="version" value="0.0.1"/>
<path id="project.class.path">
<pathelement location="build"/>
<pathelement location="libs/commons-codec-1.6.jar"/>
<pathelement location="libs/commons-logging-1.1.1.jar"/>
<pathelement location="libs/fluent-hc-4.2.1.jar"/>
<pathelement location="libs/httpclient-4.2.1.jar"/>
<pathelement location="libs/httpclient-cache-4.2.1.jar"/>
<pathelement location="libs/httpcore-4.2.1.jar"/>
<pathelement location="libs/httpmime-4.2.1.jar"/>
<pathelement location="libs/tagsoup-1.2.1.jar"/>
<pathelement location="libs/junit-4.11.jar"/>
<pathelement location="libs/hamcrest-all-1.3.jar"/>
</path>
<target name="compile" description="compile my code">
<mkdir dir="build"/>
<javac srcdir="src" destdir="build" debug="true" debuglevel="lines,source"
includeantruntime="false">
<classpath refid="project.class.path"/>
</javac>
</target>
<target name="run" depends="compile" description="runs the demo java file">
<java fork="true" classname="${packagePrefix}.${mainClass}">
<arg value="${arg0}"/>
<arg value="${arg1}"/>
<classpath refid="project.class.path"/>
</java>
</target>
<target name="test" depends="compile" description="run junit tests">
<junit haltonerror="no" haltonfailure="no">
<classpath refid="project.class.path"/>
<batchtest fork="yes">
<fileset dir="src">
<!-- this will pick up every class with a name ending in GrawlerTest -->
<include name="**/*Test.java"/>
</fileset>
</batchtest>
<formatter type="plain" usefile="false"/>
</junit>
</target>
<target name="clean" description="delete unnecessary files and directories">
<delete dir="build" failonerror="false" verbose="true"/>
<mkdir dir="build"/>
<delete dir="javadoc" failonerror="false" verbose="true"/>
<mkdir dir="javadoc"/>
<delete dir="dist" failonerror="false" verbose="true"/>
<mkdir dir="dist"/>
</target>
<target name="javadoc" depends="compile" description="generate Javadoc documentation">
<delete dir="javadoc" quiet="true"/>
<javadoc destdir="javadoc" author="true" version="true" use="true">
<classpath>
<fileset dir="libs"/>
</classpath>
<fileset dir="src" includes="**/*.java">
<exclude name="**/Credentials.java"/>
</fileset>
</javadoc>
</target>
<target name="dist" depends="clean, javadoc, compile" description="generates the jar file for distribution">
<jar jarfile="dist/csil-status-${version}-javadocs.jar">
<fileset dir="javadoc">
<exclude name="**/Credentials.html"/>
</fileset>
</jar>
<jar jarfile="dist/csil-status-${version}-sources.jar">
<fileset dir="src">
<exclude name="**/Credentials.java"/>
</fileset>
</jar>
<jar jarfile="dist/csil-status-${version}.jar">
<fileset dir="build">
<exclude name="**/Credentials.class"/>
</fileset>
<archives>
<zips>
<fileset dir="libs"/>
</zips>
</archives>
</jar>
</target>
</project>