-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
72 lines (61 loc) · 2.25 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<project name="RedditTraders" default="dist" basedir=".">
<description>
This bot responds to Reddit private messages in order to maintain an Ebay-like feedback system for
users of swap meet-style subreddits. It is available under the MIT license.
</description>
<!-- set global properties for this build -->
<property name="src" location="src" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<path id="master-classpath">
<fileset dir="lib" id="libpath">
<include name="*.jar" />
</fileset>
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
</target>
<target name="compile" depends="init" description="compile the source ">
<!-- Compile the java code from ${src} into ${build} -->
<javac destdir="${build}">
<src path="${src}" />
<classpath refid="master-classpath" />
</javac>
</target>
<target name="dist" depends="compile" description="generate the distribution">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib" />
<mkdir dir="${dist}/src" />
<mkdir dir="${dist}/javadoc" />
<javadoc sourcepath="${src}" destdir="${dist}/javadoc" classpathref="master-classpath">
<package name="com.*" />
<excludepackage name="com.omrlnr.*" />
</javadoc>
<copy file="build.xml" todir="${dist}" />
<copy file="config.xml" todir="${dist}" />
<copy file="License.txt" todir="${dist}" />
<copy file="log4j.properties" todir="${dist}" />
<copy file="sample-config.xml" todir="${dist}" />
<copy todir="${dist}/src">
<fileset dir="${src}" />
</copy>
<copy todir="${dist}/lib">
<fileset dir="lib" />
</copy>
<copy todir="${dist}">
<fileset dir="${build}" />
</copy>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="RedditTraders.jar" basedir="${dist}">
<manifest>
<attribute name="Main-Class" value="com.darkenedsky.reddit.traders.RedditTraders" />
<attribute name="Class-Path" value="./lib/jdom.jar ./lib/json-simple-1.1.1.jar ./lib/postgresql-9.0-801.jdbc4.jar ./lib/log4j-1.2.17.jar" />
</manifest>
</jar>
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
</project>