1 <?xml version="1.0" encoding="UTF-8"?>
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
10 http://www.apache.org/licenses/LICENSE-2.0
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.
18 <project name="JkStatus" default="dist" basedir=".">
21 <!-- ===================== Initialize Property Values =================== -->
23 <property file="build.properties" />
24 <property file="build.properties.default" />
26 <!-- Build Defaults -->
27 <property name="jk.build" value="build"/>
28 <property name="jk.dist" value="dist"/>
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"/>
43 <path id="javadoc.sourcepath">
44 <pathelement location="src/share"/>
48 <!-- =================== BUILD: Set compile 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" />
57 <!-- =================== BUILD: Set compile flags ======================= -->
58 <target name="flags.display" depends="flags" unless="flags.hide">
60 <echo message="--- Build environment for Catalina ---" />
62 <echo message="If ${property_name} is displayed, then the property is not set)" />
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}" />
71 <echo message="--- Ant Flags ---" />
72 <echo message="<style> task available (required)=${style.available}" />
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}" />
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"/>
89 <!-- ================ BUILD: Compile Catalina Components ================ -->
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}"
97 encoding="ISO-8859-1">
98 <classpath refid="jtc.classpath" />
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"/>
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"
121 windowtitle="Jk Status Internal API Documentation"
122 doctitle="Jk Status API"
123 bottom="Copyright &#169; 2000-2011 Apache Software Foundation. All Rights Reserved."
127 <!-- ======================= BUILD: Clean Directory ===================== -->
128 <target name="build-clean">
129 <delete dir="${jk.build}"/>
132 <!-- ==================== BUILD: Rebuild Everything ===================== -->
135 <!-- ================ DIST: Create Distribution ========================= -->
136 <target name="dist" depends="build-jk-status">
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_*" />
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" />
151 <!-- ======================== DIST: Clean Directory ===================== -->
153 <!-- ====================== Convenient Synonyms ========================= -->