-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
77 lines (69 loc) · 2.89 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
<!-- $Id: build.xml,v 1.9 2009/03/06 22:24:15 jklett Exp $ -->
<project name="MovieQOTD" default="all" basedir=".">
<property name="build" value="build"/>
<property name="classes" value="classes"/>
<property name="etc" value="etc"/>
<property name="jsp" value="jsp"/>
<property name="lib" value="lib"/>
<property name="src" value="src"/>
<property name="templ" value="templ"/>
<property name="webapp" value="webapp"/>
<property name="xml" value="xml" />
<property name="jarfile" value="movieqotd.jar"/>
<property name="warfile" value="movieqotd.war"/>
<property name="metainf" value="**/META-INF/"/>
<path id="classpath">
<pathelement path="${lib}/org.mortbay.jetty.jar:${lib}/javax.servlet.jar:${lib}/blipsql.jar:${lib}/javaforge.jar:${lib}/jdom.jar:${lib}/junit.jar:${lib}/logback-classic-0.9.6.jar:${lib}/logback-core-0.9.6.jar:${lib}/rome-0.9.jar:${lib}/slf4j-api-1.5.0.jar:${lib}/twitter4j.jar:${lib}/log4j.jar" />
</path>
<target name="compile" depends="clean">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${classes}" />
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${classes}" debug="on" deprecation="off">
<classpath refid="classpath" />
</javac>
</target>
<target name="makejar" depends="compile">
<mkdir dir="${build}"/>
<copy todir="${build}">
<fileset dir="${classes}"/>
</copy>
<copy todir="${build}">
<fileset dir="${templ}"/>
</copy>
<copy todir="${build}">
<fileset dir="${etc}">
<include name="**/*.*"/>
</fileset>
</copy>
<!-- expand library jars -->
<unjar dest="${build}">
<patternset>
<exclude name="${metainf}"/>
</patternset>
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</unjar>
<jar destfile="${jarfile}" basedir="${build}" manifest="${etc}/MainClass"/>
</target>
<target name="makewar" depends="makejar">
<mkdir dir="${webapp}"/>
<copy file="${xml}/obviously.tld" tofile="${webapp}/WEB-INF/obviously.tld"/>
<mkdir dir="${webapp}/WEB-INF/classes"/>
<copy file="${etc}/poolman.xml" tofile="${webapp}/WEB-INF/classes/poolman.xml"/>
<copy todir="${webapp}">
<fileset dir="${jsp}"/>
</copy>
<copy file="${jarfile}" tofile="${webapp}/WEB-INF/lib/${jarfile}"/>
<war warfile="${warfile}" basedir="${webapp}" webxml="${xml}/web.xml"/>
</target>
<target name="all" depends="makewar"/>
<target name="clean">
<delete dir="${build}"/>
<delete dir="${classes}"/>
<delete dir="${webapp}"/>
<delete file="${jarfile}"/>
<delete file="${warfile}"/>
</target>
</project>