-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.tomcat.xml
80 lines (65 loc) · 2.96 KB
/
build.tomcat.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
<project name="Tomcat" default="webapp.deploy" basedir=".">
<description>
Web apps for Dependency Finder
</description>
<property environment="env"/>
<property file="tomcat.properties"/>
<path id="classpath.tomcat">
<fileset dir="${tomcat.home}">
<include name="bin/*.jar"/>
<include name="lib/*.jar"/>
</fileset>
</path>
<taskdef resource="org/apache/catalina/ant/catalina.tasks">
<classpath refid="classpath.tomcat"/>
</taskdef>
<target name="init">
<property name="main.project.name" value="DependencyFinder"/>
<property name="release" value="SNAPSHOT"/>
<property name="distDir" value="dist"/>
<property name="warFile" value="${distDir}/${main.project.name}-${release}.war"/>
</target>
<target name="main.war" depends="init">
<ant antfile="build.xml" target="war" inheritall="false"/>
</target>
<target name="webapp.deploy" depends="init, main.war"
description="Deploys the web application to a Tomcat container">
<deploy url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="${tomcat.webapp.path}"
war="${warFile}"/>
</target>
<target name="webapp.undeploy" depends="init"
description="Undeploys the web application from a Tomcat container">
<undeploy url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="${tomcat.webapp.path}"/>
</target>
<target name="webapp.reload" depends="init"
description="Reloads the web application in a Tomcat container">
<reload url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="${tomcat.webapp.path}"/>
</target>
<target name="webapp.start" depends="init"
description="Starts the web application in a Tomcat container">
<start url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="${tomcat.webapp.path}"/>
</target>
<target name="webapp.stop" depends="init"
description="Stops the web application in a Tomcat container">
<stop url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="${tomcat.webapp.path}"/>
</target>
<target name="webapp.redeploy" depends="webapp.undeploy, webapp.deploy"
description="Undeploys and then deploys the web application to a Tomcat container"/>
<target name="webapp.restart" depends="webapp.stop, webapp.start"
description="Stops and then starts the web application in a Tomcat container"/>
</project>