-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrd-build.xml
More file actions
55 lines (45 loc) · 1.57 KB
/
Copy pathrd-build.xml
File metadata and controls
55 lines (45 loc) · 1.57 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
<project>
<!-- create our ant classpath using the fileset task -->
<path id="class.path">
<!-- include all jars in the lib directory -->
<fileset dir="WEB-INF/lib">
<include name="*.jar" />
</fileset>
</path>
<!-- compile the source files and generate class files -->
<target name="compile" depends="clean">
<mkdir dir="WEB-INF/classes"/>
<javac classpathref="class.path" srcdir="src" destdir="WEB-INF/classes"/>
</target>
<!-- clean the war and classes directory -->
<target name="clean">
<delete dir="war"/>
<delete dir="WEB-INF/classes"/>
</target>
<!-- package the war application file -->
<target name="create-war" description="creates a web application archive file" depends="compile">
<mkdir dir="war"/>
<war destfile="war/rd.war"
webxml="WEB-INF/web.xml">
<classes dir="WEB-INF/classes"/>
<lib dir="WEB-INF/lib"/>
<fileset dir=".">
<include name="**/*.*"/>
</fileset>
</war>
</target>
<!-- deploy the packaged war file into tomcat application server -->
<target name="deploy-war" depends="create-war">
<!--
<move todir="/usr/share/tomcat8/webapps/backup">
<filelist dir="/usr/share/tomcat8/webapps">
<file name="war/rd.war"/>
</filelist>
</move>
<rename src="/usr/share/tomcat8/webapps/backup/rd.war" dest="/usr/share/tomcat8/webapps/backup/rd.war.backup"/>
-->
<copy todir="/usr/share/tomcat8/webapps" overwrite="true">
<fileset dir="war"/>
</copy>
</target>
</project>