File: build.xml

package info (click to toggle)
dojo 1.10.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 97,980 kB
  • ctags: 10,348
  • sloc: php: 10,616; xml: 3,429; java: 3,098; sql: 928; sh: 484; pascal: 205; perl: 182; makefile: 77; python: 45; sed: 37; ruby: 10
file content (172 lines) | stat: -rw-r--r-- 6,285 bytes parent folder | download | duplicates (8)
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<project name="dojoweb" default="compile" basedir=".">
	<property file="build.properties"/>
	<import file="${tomcat.home}/bin/catalina-tasks.xml"/>
	

	<property name="app.name"      value="dojoweb"/>
	<property name="app.path"      value="/${app.name}"/>
	<property name="app.version"   value="0.1-dev"/>
	<property name="build.home"    value="${basedir}/build"/>
	<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="lib.home"      value="lib"/>
	<property name="jslib.home"      value="jslib"/>

	<property name="compile.debug"       value="true"/>
	<property name="compile.deprecation" value="true"/>
	<property name="compile.optimize"    value="false"/>

	<path id="compile.classpath">
		<pathelement location="${tomcat.home}/lib/servlet-api.jar"/>
		<pathelement location="${lib.home}/js.jar" />
		<pathelement location="${lib.home}/shinksafe.jar" />
	</path>


	<!-- ==================== All Target ==================================== -->
	<target name="all" depends="clean,compile" description="Clean build and dist directories, then compile"/>

	<!-- ==================== Clean Target ==================================== -->
	<target name="clean" description="Delete old build and dist directories">
		<delete dir="${build.home}"/>
		<delete dir="${dist.home}"/>
	</target>

	<!-- ==================== Prepare Target ================================== -->
	<target name="prepare">
		<!-- Create build directories as needed -->
		<mkdir  dir="${build.home}"/>
		<mkdir  dir="${build.home}/WEB-INF"/>
		<mkdir  dir="${build.home}/WEB-INF/classes"/>
		
		
		<!-- Copy static content of this web application -->
		<copy todir="${build.home}">
			<fileset dir="${web.home}"/>
		</copy>
		
		<!-- Copy external dependencies as required -->
		<mkdir  dir="${build.home}/WEB-INF/lib"/>
		<copy todir="${build.home}/WEB-INF/lib">
			<fileset dir="${lib.home}"/>
		</copy>
	</target>

	<!-- ==================== Compile Target ================================== -->
	<target name="compile" depends="prepare" description="Compile Java sources">
	
		<!-- Compile Java classes as necessary -->
		<mkdir    dir="${build.home}/WEB-INF/classes"/>
		<javac srcdir="${src.home}"
			destdir="${build.home}/WEB-INF/classes"
			debug="${compile.debug}"
			deprecation="${compile.deprecation}"
			optimize="${compile.optimize}">
			<classpath refid="compile.classpath"/>
		</javac>

		<!-- Copy application resources -->
		<copy  todir="${build.home}/WEB-INF/classes">
			<fileset dir="${src.home}" excludes="**/*.java"/>
		</copy>
	
	</target>

	<!-- ==================== Dist Target ===================================== -->
	<target name="dist" depends="compile,javadoc" description="Create binary distribution">	
		<!-- Copy documentation subdirectories -->
		<!-- mkdir   dir="${dist.home}/docs"/>
		<copy    todir="${dist.home}/docs">
			<fileset dir="${docs.home}"/>
		</copy -->
		
		<!-- Create application JAR file -->
		<jar jarfile="${dist.home}/${app.name}-${app.version}.war" basedir="${build.home}"/>
	</target>

	<!-- ==================== Install Target ================================== -->
	<!--
	
	The "install" target tells the specified Tomcat 6 installation to dynamically
	install this web application and make it available for execution.  It does
	*not* cause the existence of this web application to be remembered across
	Tomcat restarts; if you restart the server, you will need to re-install all
	this web application.
	
	If you have already installed this application, and simply want Tomcat to
	recognize that you have updated Java classes (or the web.xml file), use the
	"reload" target instead.
	
	NOTE:  This target will only succeed if it is run from the same server that
	Tomcat is running on.
	
	NOTE:  This is the logical opposite of the "remove" 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>


	<!-- ==================== Javadoc Target ================================== -->
	<!--
	
	  The "javadoc" target creates Javadoc API documentation for the Java
	  classes included in your application.  Normally, this is only required
	  when preparing a distribution release, but is available as a separate
	  target in case the developer wants to create Javadocs independently.
	
	-->
	<target name="javadoc" depends="compile" description="Create Javadoc API documentation">
		<mkdir dir="${dist.home}/docs/api"/>
		<javadoc sourcepath="${src.home}"
			destdir="${dist.home}/docs/api"
			packagenames="*">
			<classpath refid="compile.classpath"/>
		</javadoc>
	</target>

	<!-- ==================== Reload Target =================================== -->
	<!--
	
	  The "reload" signals the specified application Tomcat 6 to shut itself down
	  and reload. This can be useful when the web application context is not
	  reloadable and you have updated classes or property files in the
	  /WEB-INF/classes directory or when you have added or updated jar files in the
	  /WEB-INF/lib directory.
	
	  NOTE: The /WEB-INF/web.xml web application configuration file is not reread
	  on a reload. If you have made changes to your web.xml file you must stop
	  then start the web application. 
	
	-->
	<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>

	<!-- ==================== Remove Target =================================== -->
	<!--
	
	  The "remove" target tells the specified Tomcat 6 installation to dynamically
	  remove this web application from service.
	
	  NOTE:  This is the logical opposite of the "install" 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>