File: build.xml

package info (click to toggle)
libapache-mod-jk 1%3A1.2.30-1squeeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 9,544 kB
  • ctags: 4,943
  • sloc: ansic: 53,961; xml: 12,930; sh: 9,363; java: 1,921; perl: 1,004; makefile: 275; awk: 59
file content (120 lines) | stat: -rw-r--r-- 4,564 bytes parent folder | download | duplicates (12)
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
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- @author Peter Rossbach -->
<project name="JkStatusTestcases" basedir="." default="test">
	<property file="../../../../build/build.properties" />
	<property file="../../../../build/build.properties.default" />
	<property name="test.report.logs" value="logs/reports" />
	<property name="test.results" value="logs/test-results" />

	<property name="compile.optimize" value="true" />
	<property name="compile.debug" value="true" />
	<property name="compile.source" value="1.4" />
	<property name="compile.deprecation" value="true" />
	<property name="compile.nowarn" value="off" />
	<property name="compile.encoding" value="ISO-8859-1" />
	<property name="build.dir" value="build/test" />
	<property name="src.dir" value="src/share" />
	<property name="catalina.home" value="../../../../build/build" />

	<!-- Build the classpath -->
	<path id="project.classpath">
		<pathelement location="../build/classes" />
		<pathelement location="${jmx.jar}" />
		<pathelement location="${commons-logging.jar}" />
		<pathelement location="${log4j.jar}" />
		<fileset dir="${catalina.home}/common/endorsed">
			<include name="*.jar" />
		</fileset>
		<fileset dir="${catalina.home}/common/lib">
			<include name="*.jar" />
		</fileset>
		<fileset dir="${catalina.home}/server/lib">
			<include name="*.jar" />
		</fileset>
	</path>

	<target name="build-prepare">
		<mkdir dir="${build.dir}" />
	</target>

	<target name="info" description="Shows a information about this ant script">
		<echo>
			This ant script implements some testcases to verify the key functions of tomcat apache mod_jk jkstatus module.
			You find this script at: ${ant.file}
		</echo>
	</target>

	<!-- This target compiles all sources out of the 
			projects source tree -->
	<target name="compile" depends="build-prepare" description="This target compiles all sources out of the projects source tree">

		<!-- Copies the static resources out of the src tree
				to the build/classes dir -->
		<copy todir="${build.dir}/classes">
			<fileset dir="${src.dir}">
				<include name="**" />
				<exclude name="**/*.java" />
			</fileset>
		</copy>

		<!-- Compiles all sources -->
		<javac destdir="${build.dir}/classes" srcdir="${src.dir}" includes="**/*.java" excludes="**/.svn/**" deprecation="${compile.deprecation}" debug="${compile.debug}" source="${compile.source}" optimize="${compile.optimize}" nowarn="${compile.nowarn}" encoding="${compile.encoding}">
			<classpath>
				<path refid="project.classpath" />
			</classpath>
		</javac>
	</target>

	<target name="test" depends="compile" description="Run unit tests">
		<delete dir="${test.results}" />
		<mkdir dir="${test.results}" />
		<junit fork="yes" failureProperty="test.failure">
			<jvmarg value="-Dcatalina.base=${basedir}" />
			<jvmarg value="-Dcatalina.home=${catalina.home}" />
			<jvmarg value="-Dlog4j.configuration=file:conf/log4j.xml" />
			<classpath>
				<pathelement location="${build.dir}/classes" />
				<path refid="project.classpath" />
			</classpath>
			<formatter type="plain" usefile="false" />
			<formatter type="xml" />
			<batchtest todir="${test.results}">
				<fileset dir="${build.dir}/classes" includes="**/*Test.class" />
			</batchtest>
		</junit>
		<mkdir dir="${test.report.logs}" />
		<junitreport todir="${test.report.logs}">
			<fileset dir="${test.results}" />
			<report format="frames" todir="${test.report.logs}" />
		</junitreport>
		<antcall target="checktest" />
	</target>

	<target name="checktest" if="test.failure">
		<fail message="some test failed" />
	</target>

	<target name="clean">
		<delete dir="${build}/dir" />
		<delete dir="build" />
		<delete dir="${test.report.logs}" />
		<delete dir="${test.results}" />
		<delete dir="logs" />
	</target>
</project>