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 (155 lines) | stat: -rw-r--r-- 6,188 bytes parent folder | download | duplicates (2)
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
<?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.
-->
<project name="JkStatus" default="dist" basedir=".">


  <!-- ===================== Initialize Property Values =================== -->

  <property file="build.properties" />
  <property file="build.properties.default" />

  <!-- Build Defaults -->
  <property name="jk.build"  value="build"/>
  <property name="jk.dist"   value="dist"/>

    <!-- Construct Catalina classpath -->
  <path id="jtc.classpath">
    <pathelement location="${catalina.build}/server/lib/catalina.jar"/>
    <pathelement location="${catalina.build}/server/lib/catalina-ant.jar"/>
    <pathelement location="${catalina.build}/server/lib/tomcat-util.jar"/>
    <pathelement location="${catalina.build}/server/lib/${commons-modeler.jar}"/>
    <pathelement location="${catalina.build}/bin/${commons-logging.jar}"/>
    <pathelement location="${jmx.jar}"/>
    <pathelement location="${ant.home}/lib/ant.jar"/>
      <pathelement location="${catalina.build}/common/lib/servlet-api.jar"/>
  </path>

    <!-- Source path -->
  <path id="javadoc.sourcepath">
    <pathelement location="src/share"/>
  </path>


  <!-- =================== BUILD: Set compile flags ======================= -->
  <target name="flags">
    <!-- JDK flags -->
    <available property="jdk.1.3.present" 
     classname="java.lang.reflect.Proxy" />
    <available property="jdk.1.4.present" classname="java.nio.Buffer" />
  </target>


  <!-- =================== BUILD: Set compile flags ======================= -->
  <target name="flags.display" depends="flags" unless="flags.hide">

    <echo message="--- Build environment for Catalina ---" />

    <echo message="If ${property_name} is displayed, then the property is not set)" />

    <echo message="--- Build options ---" />
    <echo message="full.dist=${full.dist}" />
    <echo message="build.sysclasspath=${build.sysclasspath}" />
    <echo message="compile.debug=${compile.debug}" />
    <echo message="compile.deprecation=${compile.deprecation}" />
    <echo message="compile.optimize=${compile.optimize}" />

    <echo message="--- Ant Flags ---" />
    <echo message="&lt;style&gt; task available (required)=${style.available}" />

    <echo message="--- JDK ---" />
    <echo message="jdk.1.3.present=${jdk.1.3.present}" />
    <echo message="jdk.1.4.present=${jdk.1.4.present}" />

  </target>

  <!-- =================== BUILD: Create Directories ====================== -->
  <target name="build-prepare">
    <mkdir dir="${catalina.build}"/>
    <mkdir dir="${catalina.build}/classes"/>
    <mkdir dir="${jk.dist}"/>
    <mkdir dir="${jk.build}"/>
    <mkdir dir="${jk.build}/classes"/>
  </target>

  <!-- ================ BUILD: Compile Catalina Components ================ -->
  
  <target name="build-jk-status" depends="build-prepare">
    <!-- Compile internal server components -->
    <javac srcdir="${basedir}/src/share" destdir="${jk.build}/classes"
           debug="${compile.debug}" deprecation="${compile.deprecation}"
           optimize="${compile.optimize}"
           excludes="**/.svn/**"
           encoding="ISO-8859-1">
        <classpath refid="jtc.classpath" />
    </javac>
    <copy file="${basedir}/src/share/org/apache/jk/status/LocalStrings.properties"
    	  tofile="${jk.build}/classes/org/apache/jk/status/LocalStrings.properties"/>
    <copy file="${basedir}/src/share/org/apache/jk/status/mbeans-descriptors.xml"
    	  tofile="${jk.build}/classes/org/apache/jk/status/mbeans-descriptors.xml"/>
    <copy file="${basedir}/src/share/org/apache/jk/status/antlib.xml"
    	  tofile="${jk.build}/classes/org/apache/jk/status/antlib.xml"/>
    <copy file="${basedir}/src/share/org/apache/jk/status/jkstatus.tasks"
    	  tofile="${jk.build}/classes/org/apache/jk/status/jkstatus.tasks"/>
   </target>


  <!-- ================ BUILD: Create Catalina Javadocs =================== -->
  <target name="javadoc">
    <delete dir="${jk.build}/javadoc"/>
    <mkdir dir="${jk.build}/javadoc"/>
    <javadoc packagenames="org.apache.jk.status.*"
      classpathref="jtc.classpath"
      sourcepathref="javadoc.sourcepath"
      destdir="${jk.build}/javadoc"
      author="true"
      version="true"
      windowtitle="Jk Status Internal API Documentation"
      doctitle="Jk Status API"
      bottom="Copyright &amp;#169; 2000-2010 Apache Software Foundation.  All Rights Reserved."
    />
  </target>

  <!-- ======================= BUILD: Clean Directory ===================== -->
  <target name="build-clean">
    <delete dir="${jk.build}"/>
  </target>

  <!-- ==================== BUILD: Rebuild Everything ===================== -->


  <!-- ================ DIST: Create Distribution ========================= -->
  <target name="dist" depends="build-jk-status">
    
    <jar destfile="${jk.dist}/tomcat-jkstatus-ant.jar"
         basedir="${jk.build}/classes">
       <include name="org/apache/jk/status/**" />
       <exclude name="**/package.html" />
       <exclude name="**/LocalStrings_*" />
    </jar>
  </target>

  <target name="copy" depends="dist" >
     <copy file="${jk.dist}/tomcat-jkstatus-ant.jar" todir="${catalina.build}/server/lib" />
     <copy file="conf/jkstatus-tasks.xml" todir="${catalina.build}/bin" />
  </target>
  
  <!-- ======================== DIST: Clean Directory ===================== -->

  <!-- ====================== Convenient Synonyms ========================= -->

</project>