-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
97 lines (76 loc) · 3.08 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<project name="leadapp" default="usage" basedir=".">
<description>Build Script to build the leadapp Project</description>
<property file="build.properties"/>
<path id="build.classpath">
<fileset dir="${webroot.webinf}/lib" includes="*.jar"/>
</path>
<target name="usage" depends="war">
<echo>
Usage: build [clean|compile|jar|war|deploy|incremental]
compile -- compile all project files
clean -- deletes the compiled classes and jar files
jar -- build drp appservice and web related jar files
war -- build drp admin and runtime war files
incremental -- build jar files and deploy them in related directories
</echo>
</target>
<target name="clean"
description="deletes bytecode for clean build">
<delete dir="${dist}" />
</target>
<target name = "compile" depends="clean"
description = "compiles project files to dist/classes">
<mkdir dir="${javac.dest}" />
<javac srcdir="${java.source.dir}"
destdir="${javac.dest}"
includes="**/*.java"
classpathref="build.classpath"
debug="${debug}"/>
</target>
<target name="jar" depends="compile"
description="jars the project files">
<mkdir dir="${jar.dest}" />
<delete file = "${jar.dest}/${app.name}.jar"/>
<jar jarfile = "${jar.dest}/${app.name}.jar"
basedir = "${javac.dest}"
includes = "**/*.class"/>
</target>
<target name="war"
depends="jar"
description="builds the application war file">
<war
destfile="${jar.dest}/${app.name}.war"
webxml="${webroot.webinf}/web.xml">
<fileset dir="${webroot.home}">
<include name="**" />
<exclude name="WEB-INF/**" />
</fileset>
<classes dir="${webroot.webinf}"
includes="hibernate.cfg.xml, mappings/*.xml,*.properties "/>
<lib dir="${jar.dest}" includes="**/*.jar"/>
<lib dir="${webroot.webinf}/lib" includes="*.jar" excludes="servlet-api.jar"/>
<webinf dir="${webroot.webinf}"
includes="*.xml, *.properties"
excludes="web.xml, hibernate.cfg.xml"/>
</war>
</target>
<!-- Target to clean the Tomcat -->
<target name="tomcat-clean"
description="deletes the expanded directory structure in tomcat
webapps and work\Standalone\localhost folders">
<delete dir="${tomcat.webapps}/${app.name}"/>
<delete dir="${tomcat.work}/${app.name}"/>
</target>
<!-- Deploys the Application to Tomcat -->
<target name="deploy" depends="war, tomcat-clean">
<copy file="${jar.dest}/${app.name}.war"
tofile="${tomcat.webapps}/${app.name}.war" />
</target>
<target name="javadoc">
<mkdir dir="docs/api"/>
<javadoc sourcepath="${java.source.dir}"
packagenames="com.javachap.*"
destdir="docs/api">
</javadoc>
</target>
</project>