-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
80 lines (62 loc) · 2.22 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
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="UTF-8"?>
<project name="Twitter Parser" default="run" basedir=".">
<description>
Build and run the Twitter parsing client
</description>
<!-- set global properties for this build -->
<!-- Property Files -->
<property file="properties/default.properties" />
<property file="properties/library.properties" />
<path id="project.class.path">
<pathelement path="${java.class.path}" />
<!-- property files -->
<pathelement location="${file.log4j}" />
<pathelement location="${file.runtime.properties}" />
<!-- third party libraries -->
<pathelement location="${log4j.jar}" />
<pathelement location="${commons-cli.jar}" />
<pathelement location="${commons-io.jar}" />
<pathelement location="${mysql-connector-java.jar}" />
<pathelement location="${twitter4j-core.jar}" />
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${dir.build}" />
</target>
<target name="compile" depends="init" description="compile the source ">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${dir.src}" destdir="${dir.build}">
<classpath>
<fileset dir="${dir.lib}">
<include name="**/*.jar" />
</fileset>
</classpath>
</javac>
</target>
<target name="build" depends="compile" description="generate the distribution">
<!--
Put everything in ${build} into the MyProject-${DSTAMP}.jar file
-->
<jar jarfile="${file.parser.jar}" basedir="${dir.build}">
<manifest>
<attribute name="Main-Class" value="${value.parser.main.classname}" />
</manifest>
</jar>
</target>
<target name="clean" description="clean up">
<delete dir="${dir.build}" />
<delete file="${file.parser.jar}"/>
</target>
<target name="run" description="Executes the Twitter Parser" depends="build">
<java classname="${value.parser.main.classname}" fork="true">
<classpath refid="project.class.path" />
<sysproperty key="log4j.configuration" value="file:${file.log4j}" />
<sysproperty key="file.runtime.properties" value="${file.runtime.properties}" />
<classpath>
<pathelement location="${file.parser.jar}" />
</classpath>
</java>
</target>
</project>