bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / tomcat-connectors-1.2.32-src / jkstatus / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   Licensed to the Apache Software Foundation (ASF) under one or more
4   contributor license agreements.  See the NOTICE file distributed with
5   this work for additional information regarding copyright ownership.
6   The ASF licenses this file to You under the Apache License, Version 2.0
7   (the "License"); you may not use this file except in compliance with
8   the License.  You may obtain a copy of the License at
9
10       http://www.apache.org/licenses/LICENSE-2.0
11
12   Unless required by applicable law or agreed to in writing, software
13   distributed under the License is distributed on an "AS IS" BASIS,
14   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   See the License for the specific language governing permissions and
16   limitations under the License.
17 -->
18 <project name="JkStatus" default="dist" basedir=".">
19
20
21   <!-- ===================== Initialize Property Values =================== -->
22
23   <property file="build.properties" />
24   <property file="build.properties.default" />
25
26   <!-- Build Defaults -->
27   <property name="jk.build"  value="build"/>
28   <property name="jk.dist"   value="dist"/>
29
30     <!-- Construct Catalina classpath -->
31   <path id="jtc.classpath">
32     <pathelement location="${catalina.build}/server/lib/catalina.jar"/>
33     <pathelement location="${catalina.build}/server/lib/catalina-ant.jar"/>
34     <pathelement location="${catalina.build}/server/lib/tomcat-util.jar"/>
35     <pathelement location="${catalina.build}/server/lib/${commons-modeler.jar}"/>
36     <pathelement location="${catalina.build}/bin/${commons-logging.jar}"/>
37     <pathelement location="${jmx.jar}"/>
38     <pathelement location="${ant.home}/lib/ant.jar"/>
39       <pathelement location="${catalina.build}/common/lib/servlet-api.jar"/>
40   </path>
41
42     <!-- Source path -->
43   <path id="javadoc.sourcepath">
44     <pathelement location="src/share"/>
45   </path>
46
47
48   <!-- =================== BUILD: Set compile flags ======================= -->
49   <target name="flags">
50     <!-- JDK flags -->
51     <available property="jdk.1.3.present" 
52      classname="java.lang.reflect.Proxy" />
53     <available property="jdk.1.4.present" classname="java.nio.Buffer" />
54   </target>
55
56
57   <!-- =================== BUILD: Set compile flags ======================= -->
58   <target name="flags.display" depends="flags" unless="flags.hide">
59
60     <echo message="--- Build environment for Catalina ---" />
61
62     <echo message="If ${property_name} is displayed, then the property is not set)" />
63
64     <echo message="--- Build options ---" />
65     <echo message="full.dist=${full.dist}" />
66     <echo message="build.sysclasspath=${build.sysclasspath}" />
67     <echo message="compile.debug=${compile.debug}" />
68     <echo message="compile.deprecation=${compile.deprecation}" />
69     <echo message="compile.optimize=${compile.optimize}" />
70
71     <echo message="--- Ant Flags ---" />
72     <echo message="&lt;style&gt; task available (required)=${style.available}" />
73
74     <echo message="--- JDK ---" />
75     <echo message="jdk.1.3.present=${jdk.1.3.present}" />
76     <echo message="jdk.1.4.present=${jdk.1.4.present}" />
77
78   </target>
79
80   <!-- =================== BUILD: Create Directories ====================== -->
81   <target name="build-prepare">
82     <mkdir dir="${catalina.build}"/>
83     <mkdir dir="${catalina.build}/classes"/>
84     <mkdir dir="${jk.dist}"/>
85     <mkdir dir="${jk.build}"/>
86     <mkdir dir="${jk.build}/classes"/>
87   </target>
88
89   <!-- ================ BUILD: Compile Catalina Components ================ -->
90   
91   <target name="build-jk-status" depends="build-prepare">
92     <!-- Compile internal server components -->
93     <javac srcdir="${basedir}/src/share" destdir="${jk.build}/classes"
94            debug="${compile.debug}" deprecation="${compile.deprecation}"
95            optimize="${compile.optimize}"
96            excludes="**/.svn/**"
97            encoding="ISO-8859-1">
98         <classpath refid="jtc.classpath" />
99     </javac>
100     <copy file="${basedir}/src/share/org/apache/jk/status/LocalStrings.properties"
101           tofile="${jk.build}/classes/org/apache/jk/status/LocalStrings.properties"/>
102     <copy file="${basedir}/src/share/org/apache/jk/status/mbeans-descriptors.xml"
103           tofile="${jk.build}/classes/org/apache/jk/status/mbeans-descriptors.xml"/>
104     <copy file="${basedir}/src/share/org/apache/jk/status/antlib.xml"
105           tofile="${jk.build}/classes/org/apache/jk/status/antlib.xml"/>
106     <copy file="${basedir}/src/share/org/apache/jk/status/jkstatus.tasks"
107           tofile="${jk.build}/classes/org/apache/jk/status/jkstatus.tasks"/>
108    </target>
109
110
111   <!-- ================ BUILD: Create Catalina Javadocs =================== -->
112   <target name="javadoc">
113     <delete dir="${jk.build}/javadoc"/>
114     <mkdir dir="${jk.build}/javadoc"/>
115     <javadoc packagenames="org.apache.jk.status.*"
116       classpathref="jtc.classpath"
117       sourcepathref="javadoc.sourcepath"
118       destdir="${jk.build}/javadoc"
119       author="true"
120       version="true"
121       windowtitle="Jk Status Internal API Documentation"
122       doctitle="Jk Status API"
123       bottom="Copyright &amp;#169; 2000-2011 Apache Software Foundation.  All Rights Reserved."
124     />
125   </target>
126
127   <!-- ======================= BUILD: Clean Directory ===================== -->
128   <target name="build-clean">
129     <delete dir="${jk.build}"/>
130   </target>
131
132   <!-- ==================== BUILD: Rebuild Everything ===================== -->
133
134
135   <!-- ================ DIST: Create Distribution ========================= -->
136   <target name="dist" depends="build-jk-status">
137     
138     <jar destfile="${jk.dist}/tomcat-jkstatus-ant.jar"
139          basedir="${jk.build}/classes">
140        <include name="org/apache/jk/status/**" />
141        <exclude name="**/package.html" />
142        <exclude name="**/LocalStrings_*" />
143     </jar>
144   </target>
145
146   <target name="copy" depends="dist" >
147      <copy file="${jk.dist}/tomcat-jkstatus-ant.jar" todir="${catalina.build}/server/lib" />
148      <copy file="conf/jkstatus-tasks.xml" todir="${catalina.build}/bin" />
149   </target>
150   
151   <!-- ======================== DIST: Clean Directory ===================== -->
152
153   <!-- ====================== Convenient Synonyms ========================= -->
154
155 </project>