1<?xml version="1.0" encoding="UTF-8"?> 2<!--*********************************************************** 3 * 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 * 21 ***********************************************************--> 22 23 24<project name="sdbc_hsqldb" default="main" basedir="."> 25 26 <!-- ================================================================= --> 27 <!-- settings --> 28 <!-- ================================================================= --> 29 30 <!-- global properties --> 31 <property file="../../../ant.properties"/> 32 <!-- version info --> 33 <property file="../../../solenv/inc/minor.mk"/> 34 35 <!-- name of this sub target used in recursive builds --> 36 <property name="target" value="sdbc_hsqldb"/> 37 38 <!-- name of jar file created, without .jar extension --> 39 <property name="jarname" value="sdbc_hsqldb"/> 40 41 <!-- relative path to project directory --> 42 <property name="prj" value="../.."/> 43 44 <!-- build output directory --> 45 <!-- FIXME: there are also extremely rare/obsolete dbcs/bndchk/truetime/hbtoolkit cases in main/solenv/inc/settings.mk --> 46 <condition property="out" value="${prj}/${OUTPATH}.cap"> 47 <isset property="${profile}"/> 48 </condition> 49 <condition property="out" value="${prj}/${OUTPATH}.pro"> 50 <isset property="${PRODUCT}"/> 51 </condition> 52 <property name="out" value="${prj}/${OUTPATH}"/> 53 54 <!-- build directories --> 55 <property name="build.dir" value="${out}"/> 56 <property name="build.class" value="${build.dir}/class/${target}"/> 57 <property name="build.misc" value="${build.dir}/misc/${target}"/> 58 59 <!-- start of java source code package structure --> 60 <property name="java.dir" value="src"/> 61 62 <!-- define how to handle CLASSPATH environment --> 63 <property name="build.sysclasspath" value="ignore"/> 64 65 <!-- classpath settings for compile and javadoc tasks --> 66 <condition property="jar-class-path" value="${HSQLDB_JAR}" else="hsqldb.jar"> 67 <equals arg1="${SYSTEM_HSQLDB}" arg2="YES"/> 68 </condition> 69 <property name="HSQLDB_JAR" value="${OUTDIR}/bin/hsqldb.jar"/> 70 <path id="classpath"> 71 <!-- 3rd party libs --> 72 <pathelement location="${HSQLDB_JAR}"/> 73 </path> 74 75 <!-- name to display in documentation --> 76 <property name="docname" value="sdbc_hsqldb"/> 77 78 <!-- set "modern" java compiler --> 79 <property name="build.compiler" value="modern"/> 80 81 <!-- set wether we want to compile with debug information --> 82 <property name="debug" value="on"/> 83 84 <!-- set wether we want to compile with optimisation --> 85 <property name="optimize" value="off"/> 86 87 <!-- set wether we want to compile with or without deprecation --> 88 <property name="deprecation" value="on"/> 89 90 <target name="info"> 91 <echo message="--------------------"/> 92 <echo message="${target}"/> 93 <echo message="--------------------"/> 94 </target> 95 96 <!-- ================================================================= --> 97 <!-- custom targets --> 98 <!-- ================================================================= --> 99 100 <!-- the main target, called in recursive builds --> 101 <target name="main" depends="info,prepare,compile,jar,javadoc,zipdoc"/> 102 103 <!-- prepare output directories --> 104 <target name="prepare"> 105 <mkdir dir="${build.dir}"/> 106 <mkdir dir="${build.dir}/doc/${target}"/> 107 <mkdir dir="${build.class}"/> 108 <mkdir dir="${build.misc}"/> 109 </target> 110 111 112 <target name="res" depends="prepare"> 113 <copy todir="${build.class}"> 114 <fileset dir="${java.dir}"> 115 <include name="**/*.properties"/> 116 <include name="**/*.css"/> 117 <include name="**/*.dtd"/> 118 <include name="**/*.form"/> 119 <include name="**/*.gif "/> 120 <include name="**/*.htm"/> 121 <include name="**/*.html"/> 122 <include name="**/*.js"/> 123 <include name="**/*.mod"/> 124 <include name="**/*.sql"/> 125 <include name="**/*.xml"/> 126 <include name="**/*.xsl"/> 127 <include name="**/*.map"/> 128 129 </fileset> 130 </copy> 131 </target> 132 133 134 <target name="compile" depends="prepare,res"> 135 <javac destdir="${build.class}" 136 debug="${debug}" 137 deprecation="${deprecation}" 138 optimize="${optimize}" 139 classpathref="classpath"> 140 <src path="${java.dir}"/> 141 <include name="**/*.java"/> 142 </javac> 143 </target> 144 145 <!-- check if javadoc is up to date --> 146 <target name="javadoc_check" depends="prepare" if="build.dir"> 147 <uptodate property="javadocBuild.notRequired" value="true" 148 targetfile="${build.dir}/doc/${target}/${target}_javadoc.zip"> 149 <srcfiles dir="${java.dir}" includes="**/*.java"/> 150 </uptodate> 151 </target> 152 153 <!-- generate java documentation --> 154 <target name="javadoc" depends="prepare,javadoc_check,compile" 155 unless="javadocBuild.notRequired" 156 if="build.dir"> 157 158 <javadoc destdir="${build.dir}/doc/${target}/javadoc" 159 verbose="false" 160 author="false" 161 nodeprecated="true" 162 nodeprecatedlist="true" 163 use="true" 164 Doctitle="${docname}" 165 windowtitle="${docname}" 166 classpathref="classpath"> 167 168 <packageset dir="${java.dir}" defaultexcludes="yes"> 169 <include name="com/**"/> 170 <include name="org/**"/> 171 </packageset> 172 173 <link offline="true" href="http://java.sun.com/j2se/1.4.2/docs/api" 174 packagelistLoc="${common.doc}/jdk1.4.2"/> 175 <link offline="true" 176 href="http://java.sun.com/products/servlet/2.3/javadoc" 177 packagelistLoc="${common.doc}/servlet2.3"/> 178 <link offline="true" 179 href="http://logging.apache.org/log4j/docs/api" 180 packagelistLoc="${common.doc}/log4j-1.2.8"/> 181 <link offline="true" 182 href="http://java.sun.com/products/javabeans/glasgow/javadocs" 183 packagelistLoc="${common.doc}/jaf-1.0.2"/> 184 <link offline="true" 185 href="http://java.sun.com/products/javamail/javadocs" 186 packagelistLoc="${common.doc}/javamail-1.3.1"/> 187 <link offline="true" 188 href="http://ws.apache.org/soap/docs" 189 packagelistLoc="${common.doc}/soap-2.3.1"/> 190 191 <bottom><i>Copyright &#169; 2004 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA</i></bottom> 192 <header>${docname}</header> 193 194 </javadoc> 195 </target> 196 197 <!-- zip documentation and store in build/doc/${target} --> 198 <target name="zipdoc" depends="javadoc" if="build.dir" unless="javadocBuild.notRequired"> 199 <zip zipfile="${build.dir}/doc/${target}/${target}_javadoc.zip" 200 basedir="${build.dir}/doc/${target}/javadoc" 201 update="true"/> 202 </target> 203 204 <!-- clean up --> 205 <target name="clean" depends="prepare"> 206 <delete dir="${build.class}" includeEmptyDirs="true"/> 207 <delete dir="${build.dir}/doc/${target}" includeEmptyDirs="true"/> 208 </target> 209 210 <!-- create jar file --> 211 <target name="jar" depends="prepare,compile" if="build.class"> 212 <jar jarfile="${build.class}/${jarname}.jar" 213 basedir="${build.class}"> 214 <manifest> 215 <attribute name="Class-Path" value="${jar-class-path} .."/> 216 <attribute name="Solar-Version" value="${RSCREVISION}"/> 217 </manifest> 218 <include name="**/*.class"/> 219 <include name="**/*.properties"/> 220 <include name="**/*.css"/> 221 <include name="**/*.dtd"/> 222 <include name="**/*.form"/> 223 <include name="**/*.gif "/> 224 <include name="**/*.htm"/> 225 <include name="**/*.html"/> 226 <include name="**/*.js"/> 227 <include name="**/*.mod"/> 228 <include name="**/*.sql"/> 229 <include name="**/*.xml"/> 230 <include name="**/*.xsl"/> 231 <include name="**/*.map"/> 232 </jar> 233 </target> 234 235 <target name="test" depends="prepare"> 236 </target> 237 238</project> 239 240