forked from valeriansaliou/palladium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
123 lines (96 loc) · 4.24 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!--
PALLADIUM v1.5.1
Description: build file to use with Ant and Tomcat (5.5 is better to compile that)
Authors: Stefan Strigler, Vanaryon, Tim Bortnik
Last revision: 18/07/2016
-->
<project name="Palladium BOSH" default="compile" basedir=".">
<property file="build.properties" />
<property file="${user.home}/build.properties" />
<property name="app.name" value="JabberHTTPBind" />
<property name="app.path" value="/${app.name}" />
<property name="app.version" value="1.5.1" />
<property name="build.home" value="${basedir}/build" />
<property name="catalina.home" value="/usr/share/tomcat7" />
<property name="dist.home" value="${basedir}/dist" />
<property name="docs.home" value="${basedir}/docs" />
<property name="src.home" value="${basedir}/src" />
<property name="web.home" value="${basedir}/web" />
<property name="compile.debug" value="true" />
<property name="compile.deprecation" value="false" />
<property name="compile.optimize" value="true" />
<path id="compile.classpath">
<pathelement location="${catalina.home}/lib" />
<fileset dir="${catalina.home}/lib">
<include name="*.jar" />
</fileset>
</path>
<target name="all" depends="clean,compile" description="Clean build and dist directories, then compile" />
<target name="clean" description="Delete old build and dist directories">
<delete dir="${build.home}" />
<delete dir="${dist.home}" />
</target>
<target name="compile" depends="prepare" description="Compile Java sources">
<mkdir dir="${build.home}/WEB-INF/classes" />
<javac includeantruntime="false" srcdir="${src.home}" destdir="${build.home}/WEB-INF/classes" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}">
<classpath refid="compile.classpath" />
<compilerarg value="-Xlint:unchecked"/>
</javac>
<copy todir="${build.home}/WEB-INF/classes">
<fileset dir="${src.home}" excludes="**/*.java" />
</copy>
</target>
<target name="dist" depends="compile,javadoc" description="Create binary distribution">
<mkdir dir="${dist.home}/docs" />
<copy todir="${dist.home}/docs">
<fileset dir="${docs.home}" />
</copy>
<jar jarfile="http-bind.war" basedir="${build.home}" />
<mkdir dir="${dist.home}/src" />
<copy todir="${dist.home}/src">
<fileset dir="${src.home}" />
</copy>
<mkdir dir="${dist.home}/web" />
<copy todir="${dist.home}/web">
<fileset dir="${web.home}" />
</copy>
<copy todir="${dist.home}">
<fileset file="${basedir}/build.xml" />
</copy>
<copy todir="${dist.home}">
<fileset file="${basedir}/build.properties" />
</copy>
</target>
<target name="srcdist" depends="clean,dist" description="Create source distribution">
<zip destfile="${basedir}/${app.name}-${app.version}.zip">
<zipfileset dir="${dist.home}" prefix="${app.name}-${app.version}/" />
</zip>
</target>
<target name="install" depends="compile" description="Install application to servlet container">
<deploy url="${manager.url}" username="${manager.username}" password="${manager.password}" path="${app.path}" localWar="file://${build.home}" />
</target>
<target name="javadoc" depends="compile" description="Create Javadoc API documentation">
<mkdir dir="${docs.home}/api" />
<javadoc sourcepath="${src.home}" destdir="${docs.home}/api" packagenames="*">
<classpath refid="compile.classpath" />
</javadoc>
</target>
<target name="list" description="List installed applications on servlet container">
<list url="${manager.url}" username="${manager.username}" password="${manager.password}" />
</target>
<target name="prepare">
<mkdir dir="${build.home}" />
<mkdir dir="${build.home}/WEB-INF" />
<mkdir dir="${build.home}/WEB-INF/classes" />
<copy todir="${build.home}">
<fileset dir="${web.home}" />
</copy>
<mkdir dir="${build.home}/WEB-INF/lib" />
</target>
<target name="reload" depends="compile" description="Reload application on servlet container">
<reload url="${manager.url}" username="${manager.username}" password="${manager.password}" path="${app.path}" />
</target>
<target name="remove" description="Remove application on servlet container">
<undeploy url="${manager.url}" username="${manager.username}" password="${manager.password}" path="${app.path}" />
</target>
</project>