File: build.xml

package info (click to toggle)
treeview 1.1.6.4+dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,304 kB
  • sloc: java: 33,287; xml: 1,728; perl: 132; sh: 16; makefile: 11
file content (351 lines) | stat: -rw-r--r-- 11,583 bytes parent folder | download | duplicates (3)
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<project name="Java TreeView" default="compile" basedir=".">
<!-- to  make doc: javadoc -private -classpath lib/nanoxml-2.2.2.jar -d javadoc `find src | grep java` -->
<target name="javadoc" description="make java docs">
	<javadoc destdir="javadoc" author="true" 
	          version="true"
           use="true"
           windowtitle="Java Treeview API"
					 access="private"
					 >
					 <classpath refid="classpath"/>
    <packageset dir="src/edu">
    </packageset>
    <packageset dir="src/com">
    </packageset>

    <doctitle><![CDATA[<h1>Java Treeview</h1>]]></doctitle>
    <bottom><![CDATA[<i>http://jtreeview.sourceforge.net</i>]]></bottom>
    <link href="http://developer.java.sun.com/developer/products/xml/docs/api/"/>
	</javadoc>
</target>


<!-- ========== Prerequisite Properties =================================== -->

<property name="app.name"            value="TreeView" />
<property name="build.home"            value="target" />
<property name="plugin.dir"            value="plugins" />

<!-- ========== Initialization Properties ================================= -->


<!--
        These property values may optionally be overridden with property
        settings from an "ant" command line, the "antrc" properties file
        in your home directory, or from settings in a superior build.xml
        script.
-->



<!-- Should Java compilations set the debug compiler option? -->
<property name="compile.debug"         value="false" />

<!-- libs only used for compiling -->
<property name="compile.lib"         value="compile_lib" />

<!-- Should Java compilations set the deprecation compiler option? -->
<property name="compile.deprecation"   value="false" />

<!-- Should Java compilations set the optimize compiler option? -->
<property name="compile.optimize"      value="false" />
 
<!-- The base directory for distribution targets -->
<property name="dist.home"             value="dist" />

<!-- directory in which to put output -->
<property name="app.target"            value="target" />

<!-- copy source? -->
<property name="app.suppress"            value="true" />

<!-- The source directory for Java compilations related to this app -->
<property name="app.src"            value="src" />

<!-- The source directory for static content related to this app -->
<property name="app.static"            value="static" />

<!-- The name of the web application archive file to be produced -->
<property name="app.jar"            value="${app.name}.jar" />
<property name="app.appletJar"            value="${app.name}Applet.jar" />

<property name="app.libs"            value="lib" />
<!-- ========== Derived Properties ======================================== -->


<!--
        These property values are derived from values defined above, and
        generally should NOT be overridden by command line settings
-->

<!-- The class path used for compiling this library -->
<path id="classpath">
	<fileset dir="${app.libs}">
    		<include name="*.jar"/>
    </fileset>
	<fileset dir="/usr/share/java">
		<include name="nanoxml.jar" />
	</fileset>
	<fileset dir="${compile.lib}">
		<include name="*.jar"/>
	</fileset>
	<pathelement location="src"/>
</path>


<!-- ========== Executable Targets ======================================== -->




<!--
        The "prepare" target creates a directory structure in the build target
        area for the unpacked files associated with this web application
-->
<target name="prepare" 
        description="Prepare target directory">
  <echo    message="Processing app ${app.name}"/>
  <mkdir   dir="${app.target}" />
  <mkdir   dir="${dist.home}" />
</target>


<!--
        The "libs" target copies specified library JAR files (if any) from the
        "${webapp.libs} directory into the WEB-INF/lib directory of this app.

<target name="libs" depends="prepare" 
        description="Copy dependent libraries">
  <echo    message="Processing configuration files and libraries for  webapp ${webapp.name}"/>
  <mkdir   dir="${webapp.target}/WEB-INF/lib" />
  <copy  todir="${webapp.target}/WEB-INF/lib">
    <fileset dir="${webapp.libs}" includes="*.jar"/>
  </copy>
  <copy  todir="${webapp.target}/WEB-INF">
    <fileset dir="etc" includes="**/*.xml"/>
   <fileset dir="etc/struts" includes="*"/>
  </copy>

</target>

-->
<target name="libs" depends="prepare" 
        description="Copy dependent libraries"/>

<!--
        The "source" target copies the Java source code of your web application
        into the build target area, IF AND ONLY IF the "webapp.source"
        property has been set to an arbitrary value.
-->

<target name="source" depends="prepare"
        unless="app.suppress"
        description="Copy Java sources">
  <echo    message="Copying source files webapp ${webapp.name}"/>
  <mkdir   dir="${app.target}/src"/>
  <copy  todir="${app.target}/src">
    <fileset dir="${app.src}"/>
  </copy>
</target>


<!--
        The "static" target copies the static web resources portion of your
        web application source into the build target area.
<target name="static" depends="prepare,source,libs"
        description="Copy static files">
  <echo    message="Copying static web content ${app.name}"/>
  <copy  todir="${app.target}">
    <fileset dir="${app.static}"/>
  </copy>
</target>
-->
<target name="static" depends="prepare,source,libs"
        description="Copy static files">
  <echo    message="Copying static web content ${app.name}"/>
  <copy  todir="${app.target}">
    <fileset dir="${app.static}"/>
  </copy>
</target>


<!--
        The "compile" target compiles the Java source code of your web
        application, if and only if the specified source directory
        actually exists.
-->
<target name="compile" depends="static"
        description="Compile Java sources">
  <echo    message="Compiling app ${app.name}"/>
  <javac   target = "1.5" source ="1.5" srcdir="${app.src}"
         destdir="${app.target}"
           debug="${compile.debug}"
     deprecation="${compile.deprecation}"
        optimize="${compile.optimize}">
    <classpath refid="classpath"/>
  </javac>
  <copy    todir="${app.target}">
    <fileset dir="${app.src}">
      <exclude name="**/*.java"/>
      <exclude name="**/*.pcl"/>
    </fileset>
  </copy>
</target>



<!--


7. Test the deployment

        The "dist" target creates a web application archive containing
        your completed web application, suitable for deployment on any
        compatible servlet container.
-->
<target name="jar" depends="compile"
        description="Create jar file ">
        
  <echo    message="Creating jar file for ${app.name}"/>
	 <!-- The ** bullshit matches any level of directories, * just matches one -->
  <jar  jarfile="${app.jar}"
        basedir="${app.target}"
  		includes="**/*.class"
		excludes="edu/stanford/genetics/treeview/plugin/**">
		<manifest>
         <attribute name="Main-Class" value="LinkedView"/>
		 <attribute name="Class-Path" value=". /usr/share/java/nanoxml.jar"/>
		</manifest>
  </jar>

</target>

<target name="appletJar" depends="compile"
	description="Create applet jar file">
  <echo    message="Creating applet jar file for ${app.name}"/>
  <jar  jarfile="${app.appletJar}"
        basedir="${app.target}"
		includes="**/*.class"
		excludes="*coordinates/*,edu/stanford/genetics/treeview/plugin/**,edu/stanford/genetics/treeview/reg/**">
		<manifest>
         <attribute name="Main-Class" value="LinkedView"/>
		 <attribute name="Class-Path" value="/usr/share/java/nanoxml.jar"/>
		</manifest>
  </jar>
</target>

<target name="applet" depends="appletJar,plugins"
	description="assembles applet test case">
  <echo    message="Creating applet test case for ${app.name}"/>
  <mkdir   dir="applet"/>
  <move  todir="applet">
  	<fileset file="TreeViewApplet.jar"/>
  </move>
  <copy  todir="applet">
  	<fileset dir="appletStatic"/>
  </copy>
  <copy  todir="applet">
  	<fileset file="/usr/share/java/nanoxml.jar"/>
  </copy>
	  <move  file ="${plugin.dir}" todir="applet">
	  </move>
</target>  

<target name="pluginDir">
	<mkdir dir="${plugin.dir}"/>
</target>
	
<target name="dendrogramPlugin" depends="pluginDir,compile">
	  <echo    message="Creating jar file for dendrogram plugin"/>
	  <copy file="${app.src}/edu/stanford/genetics/treeview/plugin/dendroview/tv_plugins.cd"
	        todir="${app.target}/edu/stanford/genetics/treeview/plugin/dendroview">
	  </copy>
		 <!-- The ** bullshit matches any level of directories, * just matches one -->
	  <jar  jarfile="${plugin.dir}/Dendrogram.jar"
	        basedir="${app.target}"
			includes="edu/stanford/genetics/treeview/plugin/dendroview**/*">
	  </jar>
</target>
	<target name="karyoscopePlugin" depends="pluginDir,compile">
		  <echo    message="Creating jar file for karyoscope plugin"/>
		  <copy file="${app.src}/edu/stanford/genetics/treeview/plugin/karyoview/tv_plugins.cd"
		        todir="${app.target}/edu/stanford/genetics/treeview/plugin/karyoview">
		  </copy>
			 <!-- The ** bullshit matches any level of directories, * just matches one -->
		  <jar  jarfile="${plugin.dir}/Karyoscope.jar"
		        basedir="${app.target}"
				includes="edu/stanford/genetics/treeview/plugin/karyoview**/*">
		  </jar>
	</target>
	<target name="scatterplotPlugin" depends="pluginDir,compile">
		  <echo    message="Creating jar file for scatterplot plugin"/>
		  <copy file="${app.src}/edu/stanford/genetics/treeview/plugin/scatterview/tv_plugins.cd"
		        todir="${app.target}/edu/stanford/genetics/treeview/plugin/scatterview">
		  </copy>
			 <!-- The ** bullshit matches any level of directories, * just matches one -->
		  <jar  jarfile="${plugin.dir}/Scatterplot.jar"
		        basedir="${app.target}"
				includes="edu/stanford/genetics/treeview/plugin/scatterview**/*">
		  </jar>
	</target>
	<target name="treeannoPlugin" depends="pluginDir,compile">
		  <echo    message="Creating jar file for treeanno plugin"/>
		  <copy file="${app.src}/edu/stanford/genetics/treeview/plugin/treeanno/tv_plugins.cd"
		        todir="${app.target}/edu/stanford/genetics/treeview/plugin/treeanno">
		  </copy>
			 <!-- The ** bullshit matches any level of directories, * just matches one -->
		  <jar  jarfile="${plugin.dir}/Treeanno.jar"
		        basedir="${app.target}"
				includes="edu/stanford/genetics/treeview/plugin/treeanno**/*">
		  </jar>
	</target>

<target name="plugins" depends="dendrogramPlugin,karyoscopePlugin,scatterplotPlugin,treeannoPlugin">
</target>

<target name="dist" depends="jar,plugins"
        description="Creates a complete running app in dist">
        
  <echo    message="Creating distribution app ${app.name}"/>

  <move  todir="${dist.home}">
    <fileset file="TreeView.jar"/>
  </move>

  <move  file ="${plugin.dir}" todir="${dist.home}">
  </move>

		  <mkdir   dir="${dist.home}/lib"/>
		  <copy  todir="${dist.home}/lib">
		  	<fileset dir="lib"/>
		  </copy>
		
		
  <copy  todir="${dist.home}">
  	<fileset dir="static"/>
  </copy>

</target>


<!--
        The "clean" task deletes any created directories that have resulted
        from running any of the other targets in this script.
-->

<target name="clean"
        description="Clean build and distribution directories">
  <echo    message="Processing app ${app.name}"/>
  <delete   dir="${app.target}" />
  <delete   file="${app.jar}" />
  <delete   dir="${dist.home}" />
  <delete   dir="applet" />
</target>

<!-- some stuff for Mac OSX application bundles... -->
<!-- unfortunately, this only work on max os X right now. -->
<!-- not needed for Debian so remove this -->



</project>