File: build.xml

package info (click to toggle)
c3p0 0.9.1.2-10
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 3,152 kB
  • sloc: java: 29,115; xml: 791; makefile: 14; sh: 11
file content (772 lines) | stat: -rw-r--r-- 28,829 bytes parent folder | download | duplicates (4)
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
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
<project name="c3p0" default="dist">

	<!-- ignore the CLASSPATH environment variable. force builds to specify classpaths -->
	<property name="build.sysclasspath" value="ignore" />

	<property file="private/build.properties" />
	<property file="build.properties" />
	<property file="version.properties" />

	<property name="c3p0.name" value="c3p0-${c3p0.version}" />
	<property name="bindist.name" value="${c3p0.name}.bin" />
	<property name="srcdist.name" value="${c3p0.name}.src" />
	<property name="src.dir" value="src" />
	<property name="empty.src.dir" value="${src.dir}/empty" />
	<property name="java.src.dir" value="${src.dir}/classes" />
	<property name="rsrc.src.dir" value="${src.dir}/resources" />
	<property name="codegen.src.dir" value="${src.dir}/codegen" />
	<property name="doc.src.dir" value="${src.dir}/doc" />
	<property name="docwebapp.src.dir" value="${src.dir}/docweb/docwebapp" />
	<property name="docwebear.src.dir" value="${src.dir}/docweb/docwebear" />
	<property name="static.dist.src" value="${src.dir}/dist-static" />
	<property name="relproj.dir" value="relproj" />
	<property name="relproj.dist.dir" value="${relproj.dir}/dist" />
	<property name="test.props.dir" value="test-properties" />
	<property name="test.logging.props.file" location="${test.props.dir}/logging.properties" />
	<property name="build.dir" value="build" />
	<property name="build.codegen.dir"     value="${build.dir}/codegen" />
	<property name="build.classes.dir"     value="${build.dir}/classes" />
	<property name="build.apidocs.dir"     value="${build.dir}/apidocs" />
	<property name="build.docwebapp.dir"   value="${build.dir}/docweb/docwebapp" />
	<property name="build.docwebear.dir"   value="${build.dir}/docweb/docwebear" />
	<property name="build.testresults.dir" value="${build.dir}/testresults" />
	<property name="build.jar.file"         value="${build.dir}/${c3p0.name}.jar" />
	<property name="build.jdk13.java.src.dir"      value="${build.dir}/jdk13src" />
	<property name="build.jdk13.build.dir"         value="${build.dir}/jdk13build" />
	<property name="build.jdk13.build.classes.dir" value="${build.jdk13.build.dir}/classes" />
	<property name="build.jar.file.jdk13"           value="${build.dir}/${c3p0.name}-jdk1.3.jar" />		
	<property name="dbms.dir" value="dbms" />
	<property name="dbms.oracle.thin.antproj.dir" value="${dbms.dir}/oracle-thin" />
	<property name="dbms.oracle.thin.antproj.dist.dir" value="${dbms.oracle.thin.antproj.dir}/dist" />
	<property name="test.classes.dir" value="${build.dir}/testclasses" />
	<property name="dist.dir" value="dist" />
	<property name="license.header.file" value="src/legal.prepend" />
	<property name="open.dist" value="${dist.dir}/${bindist.name}" />
	<property name="open.dist.doc.dir" value="${open.dist}/doc" />
	<property name="open.dist.lib.dir" value="${open.dist}/lib" />
	<property name="docwebapp.war.file.name" value="docweb.war" />
	<property name="docwebapp.war.file" value="${build.docwebear.dir}/${docwebapp.war.file.name}" />
	<property name="docwebear.file" value="${build.dir}/c3p0-docweb.ear" />

	<!-- these properties should be set externally if desired  -->
	<!-- we set them here only to keep classpaths valid -->
	<!-- when users do not set the path                         -->
	<property name="j2ee.jar.base.dir" value="${empty.src.dir}" />
	<property name="j2ee.jar.dir"      value="${empty.src.dir}" />

	<!--
   <property name="log4j.jar.file" value="" />
   <property name="junit.jar.file" value="" />
  -->

	<!-- these properties should often be preempted in build.properties -->
	<property name="c3p0-build.debug" value="false" />
	<property name="c3p0-build.trace" value="5" />

	<property name="c3p0.target.version" value="1.4" />

	<path id="codegen-classpath">
		<pathelement location="${build.classes.dir}" />
		<pathelement path="${j2ee.classpath}" />
		<fileset dir="${j2ee.jar.base.dir}" includes="**/*.jar" />
		<fileset dir="${j2ee.jar.dir}" includes="*.jar" />
	</path>

	<property name="codegen.classpath" refid="codegen-classpath" />

	<path id="build-classpath">
		<pathelement location="${build.classes.dir}" />
		<pathelement path="${j2ee.classpath}" />
		<fileset dir="${j2ee.jar.base.dir}" includes="**/*.jar" />
		<fileset dir="${j2ee.jar.dir}" includes="*.jar" />
	</path>

	<patternset id="common-excludes">
		<exclude name="**/old/**" />	
		<exclude name="**/bad/**" />	
		<exclude name="**/off/**" />	
		<exclude name="**/private/**" />	
	</patternset>

	<patternset id="init-codegen-classes">
		<include name="com/mchange/v2/c3p0/codegen/**/*.java" />
		<include name="com/mchange/v2/codegen/**/*.java" />
		<include name="com/mchange/v2/log/*.java" />
		<include name="com/mchange/v2/cfg/*.java" />
		<include name="com/mchange/v2/io/IndentedWriter.java" />
		<include name="com/mchange/v1/util/StringTokenizerUtils.java" />
		<patternset refid="common-excludes" />
	</patternset>

	<patternset id="dist-jar-classes">
		<!-- excludes stuff only used by the code generator and by tests-->
		<exclude name="com/mchange/v2/codegen/bean/*.java" />
		<exclude name="com/mchange/v2/codegen/*.java" />
		<exclude name="com/mchange/v2/debug/DebugGen.java" />
		<exclude name="com/mchange/v1/lang/GentleThread.java" />
		<exclude name="com/mchange/v1/lang/NullUtils.java" />
		<exclude name="com/mchange/v1/lang/Synchronizer.java" />
		<exclude name="com/mchange/v1/lang/TVLUtils.java" />
		<exclude name="com/mchange/v1/jvm/**" />
		<exclude name="com/mchange/v1/lang/holders/**" />
		<exclude name="com/mchange/v2/c3p0/codegen/**" />
		<exclude name="com/mchange/v2/c3p0/test/**" />
		<exclude name="**/junit/**" />
		<exclude name="**/*JUnitTestCase.*" />
		<patternset refid="common-excludes" />
	</patternset>

	<patternset id="test-only-classes">
		<include name="com/mchange/v2/c3p0/test/**" />
		<include name="**/junit/**" />
		<include name="**/*JUnitTestCase.class" />
	</patternset>
	
	<path id="test-classpath">
		<pathelement location="${test.props.dir}" />
		<pathelement location="${build.jar.file}" />
		<pathelement location="${test.classes.dir}" />
		<pathelement path="${j2ee.classpath}" />
		<fileset dir="${j2ee.jar.base.dir}" includes="**/*.jar" />
		<fileset dir="${j2ee.jar.dir}" includes="*.jar" />
		<pathelement location="${test.jdbc.driver.jar.file}" />
		<pathelement location="${log4j.jar.file}" />
	</path>
	
	<target name="init">
		<tstamp>
			<!-- <format property="c3p0.timestamp" pattern="dd-MMMM-yyyy HH:mm:ss Z"/> -->

			<!-- jdk 1.3 compatible -->
			<format property="c3p0.timestamp" pattern="dd-MMMM-yyyy HH:mm:ss"/>
		</tstamp>

		<mkdir dir="${build.dir}" />
		<mkdir dir="${build.codegen.dir}" />
		<mkdir dir="${build.classes.dir}" />
		<mkdir dir="${build.apidocs.dir}" />
		<mkdir dir="${dist.dir}" />
	</target>

	<target name="clean" depends="dbms-oracle-thin-clean">
		<delete dir="${build.dir}" />
		<delete dir="${dist.dir}" />
	</target>

	<target name="relproj" depends="init" unless="up-to-date-relproj">
		<ant dir="${relproj.dir}" target="dist" inheritAll="false" />
	</target>

	<target name="init-debuggen" depends="relproj">
		<uptodate property="up-to-date-debugs" 
                srcfile="build.properties"
                targetfile="${build.codegen.dir}/com/mchange/Debug.java" />
	</target>

	<target name="debuggen" depends="init-debuggen" unless="up-to-date-debugs">
		<java classname="com.mchange.v2.debug.DebugGen" fork="true" dir=".">
			<sysproperty key="com.mchange.v2.log.MLog" value="com.mchange.v2.log.FallbackMLog" />
			<classpath>
				<fileset dir="${relproj.dist.dir}">
					<include name="*.jar" />
				</fileset>
			</classpath>
			<arg value="--packages=com.mchange" />
			<arg value="--codebase=src/classes" />
			<arg value="--outputbase=${build.codegen.dir}" />
			<arg value="--recursive" />
			<arg value="--debug=${c3p0-build.debug}" />
			<arg value="--trace=${c3p0-build.trace}" />
		</java>
	</target>

	<target name="subst">
		<copy todir="${build.codegen.dir}">
			<fileset dir="${java.src.dir}">
				<include name="**/subst/**" />
			</fileset>
			<filterchain>
				<replacetokens>
					<token key="c3p0.version"     value="${c3p0.version}"/>
					<token key="c3p0.debug"     value="${c3p0-build.debug}"/>
					<token key="c3p0.trace"     value="${c3p0-build.trace}"/>
					<token key="c3p0.timestamp" value="${c3p0.timestamp}"/>

					<!-- NO LONGER USED THIS WAY junit test stuff only 
	     <token key="test.jdbc.drivers" value="${test.jdbc.drivers}" />
	     <token key="test.jdbc.url" value="${test.jdbc.url}" />
	     <token key="test.jdbc.user" value="${test.jdbc.user}" />
	     <token key="test.jdbc.password" value="${test.jdbc.password}" />
	     -->
				</replacetokens>
			</filterchain>
		</copy>
	</target>

	<target name="init-codegen" depends="debuggen,subst">
		<javac destdir="${build.classes.dir}" 
	     source="${c3p0.target.version}"
	     target="${c3p0.target.version}"
             classpathref="codegen-classpath"
             debug="true" nowarn="on" deprecation="off">
			<src>
				<pathelement location="${build.codegen.dir}" />
				<pathelement location="${java.src.dir}" />
			</src>
			<patternset refid="init-codegen-classes" />
		</javac>

		<uptodate property="up-to-date-proxies" 
                srcfile="${java.src.dir}/com/mchange/v2/c3p0/codegen/JdbcProxyGenerator.java"
                targetfile="${build.codegen.dir}/com/mchange/v2/c3p0/impl/NewProxyConnection.java" />
	</target>


	<target name="beangen" depends="init-codegen">
		<echo message="Some warnings are expected here. Don't worry about them." />
		<apply executable="java" dest="${build.codegen.dir}">
			<arg value="-Dcom.mchange.v2.log.MLog=com.mchange.v2.log.FallbackMLog" />
			<arg value="-classpath" />
			<arg path="${codegen.classpath}" />
			<arg value="com.mchange.v2.c3p0.codegen.BeangenDataSourceGenerator" />
			<srcfile />
			<targetfile />
			<fileset dir="${codegen.src.dir}" includes="**/*.beangen-xml">
				<patternset refid="common-excludes" />
			</fileset>
			<mapper type="glob" from="*.beangen-xml" to="*.java" />
		</apply>
	</target>

	<target name="newproxygen" depends="init-codegen" unless="up-to-date-proxies">
		<java classname="com.mchange.v2.c3p0.codegen.JdbcProxyGenerator" fork="true" dir=".">
			<sysproperty key="com.mchange.v2.log.MLog" value="com.mchange.v2.log.FallbackMLog" />
			<classpath refid="codegen-classpath" />
			<arg value="${build.codegen.dir}" />
		</java>
	</target>

	<target name="codegen" depends="beangen,newproxygen" />

	<target name="compile-common" depends="codegen">
		<javac destdir="${build.classes.dir}" 
	     source="${c3p0.target.version}"
	     target="${c3p0.target.version}"
             classpathref="build-classpath" 
             debug="on" nowarn="on" deprecation="off">
			<sourcepath>
				<pathelement location="${build.codegen.dir}" />
				<pathelement location="${java.src.dir}" />
			</sourcepath>
			<src>
				<pathelement location="${build.codegen.dir}" />
				<pathelement location="${java.src.dir}" />
			</src>
			<exclude name="**/junit/**" />
			<exclude name="**/*JUnitTestCase.*" />
			<exclude name="**/subst/**" />
			<exclude name="com/mchange/v2/log/log4j/**" />
			<patternset refid="common-excludes" />
		</javac>
	</target>

	<target name="compile-subst" depends="codegen">
		<javac destdir="${build.classes.dir}" 
	     source="${c3p0.target.version}"
	     target="${c3p0.target.version}"
             classpathref="build-classpath" 
             debug="on" nowarn="on" deprecation="off">
			<sourcepath>
				<pathelement location="${build.codegen.dir}" />
			</sourcepath>
			<src>
				<pathelement location="${build.codegen.dir}" />
			</src>
			<include name="**/subst/**" />
		</javac>
	</target>

	<target name="compile-log4j" depends="init" if="log4j.jar.file">
		<javac destdir="${build.classes.dir}" 
	     source="${c3p0.target.version}"
	     target="${c3p0.target.version}"
             debug="on" nowarn="on" deprecation="off">
			<classpath>
				<path refid="build-classpath" />
				<pathelement location="${log4j.jar.file}" />
			</classpath>
			<sourcepath>
				<pathelement location="${build.codegen.dir}" />
				<pathelement location="${java.src.dir}" />
			</sourcepath>
			<src>
				<pathelement location="${build.codegen.dir}" />
				<pathelement location="${java.src.dir}" />
			</src>
			<include name="com/mchange/v2/log/log4j/**" />
		</javac>
	</target>

	<target name="compile-junit" depends="init" if="junit.jar.file">
		<javac destdir="${build.classes.dir}" 
	     source="${c3p0.target.version}"
	     target="${c3p0.target.version}"
             debug="on"  nowarn="on" deprecation="off">
			<classpath>
				<path refid="build-classpath" />
				<pathelement path="${junit.jar.file}" />
			</classpath>
			<sourcepath>
				<pathelement location="${build.codegen.dir}" />
				<pathelement location="${java.src.dir}" />
			</sourcepath>
			<src>
				<pathelement location="${build.codegen.dir}" />
				<pathelement location="${java.src.dir}" />
			</src>
			<include name="**/junit/**" />
			<include name="**/*JUnitTestCase.*" />
		</javac>
	</target>

	<target name="compile" depends="codegen,compile-common,compile-subst,compile-log4j,compile-junit" />

	<target name="jar" depends="compile">
		<jar destfile="${build.jar.file}">
			<manifest>
				<attribute name="Extension-Name" value="com.mchange.v2.c3p0" />
				<attribute name="Specification-Vendor" value="Machinery For Change, Inc." />
				<attribute name="Specification-Version" value="1.0" />
				<attribute name="Implementation-Vendor-Id" value="com.mchange" />
				<attribute name="Implementation-Vendor" value="Machinery For Change, Inc." />
				<attribute name="Implementation-Version" value="${c3p0.version}" />
			</manifest>
			<fileset dir="${build.classes.dir}">
				<patternset refid="dist-jar-classes"/>
			</fileset>
			<fileset dir="${rsrc.src.dir}" />
		</jar>
	</target>

	<target name="dbms-oracle-thin-ant">
		<ant dir="${dbms.oracle.thin.antproj.dir}" target="${subproject.target}" inheritAll="false">
			<property name="c3p0.version" value="${c3p0.version}" />
			<property name="c3p0.jar.file" location="${build.jar.file}" />
			<property name="oracle-thin.jdbc.jar.file" value="${oracle-thin.jdbc.jar.file}" />
		</ant>
	</target>

	<target name="dbms-oracle-thin-clean">
		<antcall target="dbms-oracle-thin-ant">
			<param name="subproject.target" value="clean" />
		</antcall>
	</target>

	<target name="dbms-oracle-thin" depends="jar" if="oracle-thin.jdbc.jar.file">
		<echo message="oracle-thin.jdbc.jar.file: ${oracle-thin.jdbc.jar.file}" />
		<antcall target="dbms-oracle-thin-ant">
			<param name="subproject.target" value="dist" />
		</antcall>
	</target>

	<target name="test-init" depends="jar">
		<mkdir dir="${test.classes.dir}" />
		<copy toDir="${test.classes.dir}">
			<fileset dir="${build.classes.dir}">
				<patternset refid="test-only-classes"/>
			</fileset>
		</copy>
		<property name="testcp" refid="test-classpath" />
		<echo message="test-classpath: ${testcp}" />
	</target>

	<target name="stats-test" depends="test-init">
		<java 
         classname="com.mchange.v2.c3p0.test.StatsTest" 
         classpathref="test-classpath" 
	 fork="true">
			<sysproperty key="jdbc.drivers" value="${test.jdbc.drivers}" />
			<sysproperty key="java.util.logging.config.file" value="${test.logging.props.file}" />
			<syspropertyset>
				<propertyref builtin="commandline" />
			</syspropertyset>

			<!--
           <jvmarg value="-ea" />
	   <sysproperty key="com.sun.management.jmxremote.port" value="38383" />
	   <sysproperty key="com.sun.management.jmxremote.authenticate" value="false" />
	   <sysproperty key="com.sun.management.jmxremote.ssl" value="false" />
	   -->

			<!-- <jvmarg value="-Xrunhprof:file=/tmp/java.hprof,doe=y,format=b" /> -->
			<!-- <jvmarg value="-verbose:class" /> -->
			<arg value="${test.jdbc.url}" />
			<arg value="${test.jdbc.user}" />
			<arg value="${test.jdbc.password}" />
		</java>
	</target>

	<target name="proxywrapper-test" depends="test-init">
		<java 
         classname="com.mchange.v2.c3p0.test.ProxyWrappersTest" 
         classpathref="test-classpath" 
	 	 fork="true">
			<sysproperty key="jdbc.drivers" value="${test.jdbc.drivers}" />
			<sysproperty key="java.util.logging.config.file" value="${test.logging.props.file}" />
			<syspropertyset>
				<propertyref builtin="commandline" />
			</syspropertyset>
			<!-- <jvmarg value="-Xrunhprof:file=/tmp/java.hprof,doe=y,format=b" /> -->
			<!-- <jvmarg value="-verbose:class" /> -->
			<arg value="${test.jdbc.url}" />
			<arg value="${test.jdbc.user}" />
			<arg value="${test.jdbc.password}" />
		</java>
	</target>

	<target name="benchmark-test" depends="test-init">
		<java 
         classname="com.mchange.v2.c3p0.test.C3P0BenchmarkApp" 
         classpathref="test-classpath" 
	 	 fork="true">
			<!-- <jvmarg value="-Xrunhprof:cpu=times,file=/tmp/java.hprof,doe=y,format=a" /> -->
			<!-- <jvmarg value="-server" /> -->
			<!-- <jvmarg value="-Xprof" /> -->
			<!-- <jvmarg value="-verbose:class" /> -->

			<sysproperty key="java.util.logging.config.file" value="${test.logging.props.file}" />

			<!--
			<jvmarg value="-ea" />
			<sysproperty key="com.sun.management.jmxremote.port" value="38383" />
			<sysproperty key="com.sun.management.jmxremote.authenticate" value="false" />
			<sysproperty key="com.sun.management.jmxremote.ssl" value="false" />
			-->

			<syspropertyset>
				<propertyref builtin="commandline" />
			</syspropertyset>
				<!-- we don't use cmd line args or -Djdbc.drivers any more. we set up test datasources via config files -->
<!--
			<sysproperty key="jdbc.drivers" value="${test.jdbc.drivers}" />
			<arg value="${test.jdbc.url}" />
			<arg value="${test.jdbc.user}" />
			<arg value="${test.jdbc.password}" />
-->
		</java>
	</target>

	<target name="rco-test" depends="test-init">
		<java 
         classname="com.mchange.v2.c3p0.test.RawConnectionOpTest" 
         classpathref="test-classpath" 
	 	 fork="true">
			<!-- <jvmarg value="-Xrunhprof:cpu=times,file=/tmp/java.hprof,doe=y,format=a" /> -->
			<!-- <jvmarg value="-Xprof" /> -->
			<sysproperty key="jdbc.drivers" value="${test.jdbc.drivers}" />
			<sysproperty key="java.util.logging.config.file" value="${test.logging.props.file}" />
			<syspropertyset>
				<propertyref builtin="commandline" />
			</syspropertyset>

			<!--
           <jvmarg value="-ea" />
	   <sysproperty key="com.sun.management.jmxremote.port" value="38383" />
	   <sysproperty key="com.sun.management.jmxremote.authenticate" value="false" />
	   <sysproperty key="com.sun.management.jmxremote.ssl" value="false" />
	   -->

			<arg value="${test.jdbc.url}" />
			<arg value="${test.jdbc.user}" />
			<arg value="${test.jdbc.password}" />
		</java>
	</target>

	<target name="load-test" depends="test-init">
		<java 
         classname="com.mchange.v2.c3p0.test.LoadPoolBackedDataSource" 
         classpathref="test-classpath" 
	 fork="true">
			<sysproperty key="java.util.logging.config.file" value="${test.logging.props.file}" />
			<syspropertyset>
				<propertyref builtin="commandline" />
			</syspropertyset>

           <jvmarg value="-ea" />
	   <sysproperty key="com.sun.management.jmxremote.port" value="38383" />
	   <sysproperty key="com.sun.management.jmxremote.authenticate" value="false" />
	   <sysproperty key="com.sun.management.jmxremote.ssl" value="false" />

			<!-- we don't use cmd line args or -Djdbc.drivers any more. we set up test datasources via config files -->
			<!--
			<sysproperty key="jdbc.drivers" value="${test.jdbc.drivers}" />
			<arg value="${test.jdbc.url}" />
			<arg value="${test.jdbc.user}" />
			<arg value="${test.jdbc.password}" />
			-->
		</java>
	</target>

	<target name="psload-test" depends="test-init">
		<java 
         classname="com.mchange.v2.c3p0.test.PSLoadPoolBackedDataSource" 
         classpathref="test-classpath" 
	 fork="true">
			<sysproperty key="java.util.logging.config.file" value="${test.logging.props.file}" />
			<syspropertyset>
				<propertyref builtin="commandline" />
			</syspropertyset>

	           <jvmarg value="-ea" />
	   <sysproperty key="com.sun.management.jmxremote.port" value="38383" />
	   <sysproperty key="com.sun.management.jmxremote.authenticate" value="false" />
	   <sysproperty key="com.sun.management.jmxremote.ssl" value="false" />
			
			
			<!-- we don't use cmd line args or -Djdbc.drivers any more. we set up test datasources via config files -->
			<!--
			<sysproperty key="jdbc.drivers" value="${test.jdbc.drivers}" />
			<arg value="${test.jdbc.url}" />
			<arg value="${test.jdbc.user}" />
			<arg value="${test.jdbc.password}" />
			-->
		</java>
	</target>

	<target name="dispersion-test" depends="test-init">
		<java 
         classname="com.mchange.v2.c3p0.test.ConnectionDispersionTest" 
         classpathref="test-classpath" 
	 fork="true">
			<sysproperty key="jdbc.drivers" value="${test.jdbc.drivers}" />
			<sysproperty key="java.util.logging.config.file" value="${test.logging.props.file}" />
			<syspropertyset>
				<propertyref builtin="commandline" />
			</syspropertyset>
			<arg value="${test.jdbc.url}" />
			<arg value="${test.jdbc.user}" />
			<arg value="${test.jdbc.password}" />
		</java>
	</target>

	<target name="onethreadrepeat-test" depends="test-init">
		<java 
         classname="com.mchange.v2.c3p0.test.OneThreadRepeatedInsertOrQueryTest" 
         classpathref="test-classpath" 
	 fork="true">
			<sysproperty key="jdbc.drivers" value="${test.jdbc.drivers}" />
			<sysproperty key="java.util.logging.config.file" value="${test.logging.props.file}" />
			<syspropertyset>
				<propertyref builtin="commandline" />
			</syspropertyset>
			<arg value="${test.jdbc.url}" />
			<arg value="${test.jdbc.user}" />
			<arg value="${test.jdbc.password}" />
		</java>
	</target>

	<target name="refser-test" depends="test-init">
		<java 
         classname="com.mchange.v2.c3p0.test.TestRefSerStuff" 
         classpathref="test-classpath" 
	     fork="true">
			<sysproperty key="java.util.logging.config.file" value="${test.logging.props.file}" />
			<syspropertyset>
				<propertyref builtin="commandline" />
			</syspropertyset>
	         <jvmarg value="-ea" />
			
			<!-- we don't use cmd line args or -Djdbc.drivers any more. we set up test datasources via config files -->
			<!--
			<sysproperty key="jdbc.drivers" value="${test.jdbc.drivers}" />
			<arg value="${test.jdbc.url}" />
			<arg value="${test.jdbc.user}" />
			<arg value="${test.jdbc.password}" />
			-->
		</java>
	</target>

	<target name="junit-tests" depends="test-init" if="junit.jar.file">
		<mkdir dir="${build.testresults.dir}" />
		<junit printsummary="true" showoutput="true" haltonfailure="true"> 
			<classpath refid="test-classpath" />
			<formatter type="plain"/>

			<!--
			<sysproperty key="jdbc.drivers" value="${test.jdbc.drivers}" />
			<sysproperty key="c3p0.test.jdbc.url" value="${test.jdbc.url}" />
			<sysproperty key="c3p0.test.jdbc.user" value="${test.jdbc.user}" />
			<sysproperty key="c3p0.test.jdbc.password" value="${test.jdbc.password}" />
			-->

			<syspropertyset>
				<propertyref builtin="commandline" />
			</syspropertyset>
			<batchtest fork="yes" toDir="${build.testresults.dir}">
				<fileset dir="${build.classes.dir}">
					<include name="**/*JUnitTestCase.class"/>
				</fileset>
			</batchtest>
		</junit>

		<!--
	 <junit printsummary="withOutAndErr" >
	   <test name="com.mchange.v2.c3p0.test.junit.MiscellaneousTopLevelJUnitTestCase"/>
	   <classpath refid="test-classpath" />
	   <formatter type="plain"/>
	 </junit>
	-->
	</target>

	<target name="javadocs" depends="init">
		<javadoc packagenames="com.mchange.v2.c3p0"
               sourcepath="${java.src.dir}"
               destdir="${build.apidocs.dir}" 
               classpathref="build-classpath" 
               windowtitle="${c3p0.name} API Documentation"
      />
	</target>

	<target name="jar-1.3" depends="jar">
		<mkdir dir="${build.jdk13.java.src.dir}" />
		<mkdir dir="${build.jdk13.build.classes.dir}" />
		
		<!-- filter away assertion lines -->
		<!-- source is jdk1.3 compatible except for assertions                         -->
		<!-- which (by adopted convention) are always one line beginning with "assert" -->
		<!-- these lines often use the 1.4 method Thread.holdsLock()                   -->
		<!-- for now, this is the only code that requires 1.4 in c3p0                  -->
		<copy toDir="${build.jdk13.java.src.dir}">
			<fileset dir="${java.src.dir}" includes="**/*.java" />
			<filterchain>
				<linecontainsregexp>
			  		<regexp pattern="(?m)^(?!\s*assert\b).*$"/>
				</linecontainsregexp>
			</filterchain>
		</copy>
		<antcall target="jar" inheritAll="false">
			<param name="java.src.dir" value="${build.jdk13.java.src.dir}" />
			<param name="build.classes.dir" value="${build.jdk13.build.classes.dir}" />
			<param name="c3p0.target.version" value="1.3" />
			<param name="build.jar.file" value="${build.jar.file.jdk13}" />			
			<param name="up-to-date-relproj" value="true" />
		</antcall>
	</target>	

	<target name="basic-open-dist" depends="jar, javadocs, jar-1.3">
		<copy toDir="${open.dist}">
			<fileset dir="${static.dist.src}">
				<exclude name="*~" />
				<exclude name="examples/*.class" />
				<patternset refid="common-excludes" />
			</fileset>
		</copy>
		<mkdir dir="${open.dist.doc.dir}/apidocs" />
		<copy toDir="${open.dist.doc.dir}">
			<fileset dir="${doc.src.dir}" excludes="*.png"/>
			<filterchain>
				<replacetokens>
					<token key="c3p0.version" value="${c3p0.version}"/>
				</replacetokens>
			</filterchain>
		</copy>
		<copy toDir="${open.dist.doc.dir}">
			<fileset dir="${doc.src.dir}" includes="*.png"/>
		</copy>
		<copy toDir="${open.dist.doc.dir}/apidocs">
			<fileset dir="${build.apidocs.dir}" />
		</copy>
		<copy file="${build.jar.file}" toDir="${open.dist.lib.dir}" />
		<copy file="${build.jar.file.jdk13}" toDir="${open.dist.lib.dir}" />
	</target>

	<target name="docwebapp" depends="basic-open-dist">
		<mkdir dir="${build.docwebapp.dir}" />
		<copy toDir="${build.docwebapp.dir}">
			<fileset dir="${docwebapp.src.dir}"/>
			<filterchain>
				<replacetokens>
					<token key="virtual.host" value="${docwebapp.virtual.host}"/>
				</replacetokens>
			</filterchain>
		</copy>
	</target>

	<target name="docwebear" depends="docwebapp">
		<mkdir dir="${build.docwebear.dir}" />
		<copy toDir="${build.docwebear.dir}">
			<fileset dir="${docwebear.src.dir}"/>
			<filterchain>
				<replacetokens>
					<token key="web.uri" value="${docwebapp.war.file.name}"/>
					<token key="context.root" value="${docwebapp.context.root}"/>
				</replacetokens>
			</filterchain>
		</copy>
		<jar destfile="${docwebapp.war.file}">
			<zipfileset dir="${build.docwebapp.dir}" />
			<zipfileset dir="${open.dist.doc.dir}" />
		</jar>
		<jar destfile="${docwebear.file}">
			<zipfileset dir="${build.docwebear.dir}" />
		</jar>
	</target>

	<target name="docwebear-deploy" depends="docwebear">
		<exec executable="scp">
			<arg line="${docwebear.file} ${docwebear.deploy.user}@${docwebear.deploy.host}:${docwebear.deploy.path}" />
		</exec>
	</target>

	<target name="oracle-thin-open-dist" depends="basic-open-dist, dbms-oracle-thin"  if="oracle-thin.jdbc.jar.file">
		<copy toDir="${open.dist}">
			<fileset dir="${dbms.oracle.thin.antproj.dist.dir}" />
		</copy>
	</target>

	<target name="open-dist" depends="basic-open-dist, oracle-thin-open-dist" />

	<target name="zip-dist" depends="open-dist">
		<zip destfile="${dist.dir}/${bindist.name}.zip">
			<zipfileset dir="${open.dist}" prefix="${c3p0.name}"/>
		</zip>
	</target>

	<target name="tar-dist" depends="open-dist">
		<tar destfile="${dist.dir}/${bindist.name}.tar">
			<tarfileset dir="${open.dist}" prefix="${c3p0.name}"/>
		</tar>
	</target>

	<target name="tgz-dist" depends="tar-dist">
		<gzip zipfile="${dist.dir}/${bindist.name}.tgz" src="${dist.dir}/${bindist.name}.tar" />
	</target>

	<target name="bindist" depends="tgz-dist, zip-dist" />

	<target name="dist" depends="bindist" />

	<target name="srcdist" depends="init">
		<zip destfile="${dist.dir}/${srcdist.name}.zip">
			<zipfileset dir="." prefix="${srcdist.name}">
				<exclude name="${build.dir}/**"/>
				<exclude name="${dist.dir}/**"/>
				<exclude name="**/*.class"/>
				<patternset refid="common-excludes" />
			</zipfileset>
		</zip>
		<tar destfile="${dist.dir}/${srcdist.name}.tar">
			<tarfileset dir="." prefix="${srcdist.name}">
				<exclude name="${build.dir}/**"/>
				<exclude name="${dist.dir}/**"/>
				<exclude name="**/*.class"/>
				<patternset refid="common-excludes" />
			</tarfileset>
		</tar>
		<gzip zipfile="${dist.dir}/${srcdist.name}.tgz" src="${dist.dir}/${srcdist.name}.tar" />
	</target>

	<target name="all" depends="dist,srcdist" />

</project>