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_jdbc" 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_jdbc"/> 37 38 <!-- name of jar file created, without .jar extension --> 39 <property name="jarname" value="sdbc_jdbc"/> 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="${COMMONS_LANG_JAR}" else="commons-lang3-3.3.jar"> 67 <equals arg1="${SYSTEM_APACHE_COMMONS}" arg2="YES"/> 68 </condition> 69 <condition property="commons-lang-jar" value="${COMMONS_LANG_JAR}" else="${OUTDIR}/bin/commons-lang3-3.3.jar"> 70 <equals arg1="${SYSTEM_APACHE_COMMONS}" arg2="YES"/> 71 </condition> 72 <path id="classpath"> 73 <pathelement location="${OUTDIR}/bin/juh.jar"/> 74 <pathelement location="${OUTDIR}/bin/jurt.jar"/> 75 <pathelement location="${OUTDIR}/bin/ridl.jar"/> 76 <pathelement location="${OUTDIR}/bin/unoil.jar"/> 77 <pathelement location="${out}/class/dbtools/dbtools.jar"/> 78 <!-- 3rd party libs --> 79 <pathelement location="${commons-lang-jar}"/> 80 </path> 81 82 <!-- name to display in documentation --> 83 <property name="docname" value="sdbc_jdbc"/> 84 85 <!-- set "modern" java compiler --> 86 <property name="build.compiler" value="modern"/> 87 88 <!-- set whether we want to compile with debug information --> 89 <property name="debug" value="on"/> 90 91 <!-- set whether we want to compile with optimisation --> 92 <property name="optimize" value="off"/> 93 94 <!-- set whether we want to compile with or without deprecation --> 95 <property name="deprecation" value="on"/> 96 97 <target name="info"> 98 <echo message="--------------------"/> 99 <echo message="${target}"/> 100 <echo message="--------------------"/> 101 </target> 102 103 <!-- ================================================================= --> 104 <!-- custom targets --> 105 <!-- ================================================================= --> 106 107 <!-- the main target, called in recursive builds --> 108 <target name="main" depends="info,prepare,compile,jar,javadoc,zipdoc"/> 109 110 <!-- prepare output directories --> 111 <target name="prepare"> 112 <mkdir dir="${build.dir}"/> 113 <mkdir dir="${build.dir}/doc/${target}"/> 114 <mkdir dir="${build.class}"/> 115 <mkdir dir="${build.misc}"/> 116 </target> 117 118 119 <target name="res" depends="prepare"> 120 <copy todir="${build.class}"> 121 <fileset dir="${java.dir}"> 122 <include name="**/*.properties"/> 123 <include name="**/*.css"/> 124 <include name="**/*.dtd"/> 125 <include name="**/*.form"/> 126 <include name="**/*.gif "/> 127 <include name="**/*.htm"/> 128 <include name="**/*.html"/> 129 <include name="**/*.js"/> 130 <include name="**/*.mod"/> 131 <include name="**/*.sql"/> 132 <include name="**/*.xml"/> 133 <include name="**/*.xsl"/> 134 <include name="**/*.map"/> 135 136 </fileset> 137 </copy> 138 </target> 139 140 141 <target name="compile" depends="prepare,res"> 142 <javac destdir="${build.class}" 143 debug="${debug}" 144 debuglevel="lines,vars,source" 145 deprecation="${deprecation}" 146 optimize="${optimize}" 147 classpathref="classpath"> 148 <src path="${java.dir}"/> 149 <include name="**/*.java"/> 150 </javac> 151 </target> 152 153 <!-- check if javadoc is up to date --> 154 <target name="javadoc_check" depends="prepare" if="build.dir"> 155 <uptodate property="javadocBuild.notRequired" value="true" 156 targetfile="${build.dir}/doc/${target}/${target}_javadoc.zip"> 157 <srcfiles dir="${java.dir}" includes="**/*.java"/> 158 </uptodate> 159 </target> 160 161 <!-- generate java documentation --> 162 <target name="javadoc" depends="prepare,javadoc_check,compile" 163 unless="javadocBuild.notRequired" 164 if="build.dir"> 165 166 <javadoc destdir="${build.dir}/doc/${target}/javadoc" 167 verbose="false" 168 author="false" 169 nodeprecated="true" 170 nodeprecatedlist="true" 171 use="true" 172 Doctitle="${docname}" 173 windowtitle="${docname}" 174 classpathref="classpath"> 175 176 <packageset dir="${java.dir}" defaultexcludes="yes"> 177 <include name="com/**"/> 178 <include name="org/**"/> 179 </packageset> 180 181 <link offline="true" href="http://java.sun.com/j2se/1.4.2/docs/api" 182 packagelistLoc="${common.doc}/jdk1.4.2"/> 183 <link offline="true" 184 href="http://java.sun.com/products/servlet/2.3/javadoc" 185 packagelistLoc="${common.doc}/servlet2.3"/> 186 <link offline="true" 187 href="http://logging.apache.org/log4j/docs/api" 188 packagelistLoc="${common.doc}/log4j-1.2.8"/> 189 <link offline="true" 190 href="http://java.sun.com/products/javabeans/glasgow/javadocs" 191 packagelistLoc="${common.doc}/jaf-1.0.2"/> 192 <link offline="true" 193 href="http://java.sun.com/products/javamail/javadocs" 194 packagelistLoc="${common.doc}/javamail-1.3.1"/> 195 <link offline="true" 196 href="http://ws.apache.org/soap/docs" 197 packagelistLoc="${common.doc}/soap-2.3.1"/> 198 199 <bottom><i>Copyright &#169; 2004 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA</i></bottom> 200 <header>${docname}</header> 201 202 </javadoc> 203 </target> 204 205 <!-- zip documentation and store in build/doc/${target} --> 206 <target name="zipdoc" depends="javadoc" if="build.dir" unless="javadocBuild.notRequired"> 207 <zip zipfile="${build.dir}/doc/${target}/${target}_javadoc.zip" 208 basedir="${build.dir}/doc/${target}/javadoc" 209 update="true"/> 210 </target> 211 212 <!-- clean up --> 213 <target name="clean" depends="prepare"> 214 <delete dir="${build.class}" includeEmptyDirs="true"/> 215 <delete dir="${build.dir}/doc/${target}" includeEmptyDirs="true"/> 216 </target> 217 218 <!-- create jar file --> 219 <target name="jar" depends="prepare,compile" if="build.class"> 220 <jar jarfile="${build.class}/${jarname}.jar" 221 basedir="${build.class}"> 222 <manifest> 223 <attribute name="Class-Path" value="${jar-class-path} juh.jar jurt.jar ridl.jar unoil.jar dbtools.jar"/> 224 <attribute name="Solar-Version" value="${RSCREVISION}"/> 225 <attribute name="RegistrationClassName" value="com.sun.star.comp.sdbc.JDBCDriver"/> 226 <attribute name="Sealed" value="true"/> 227 <attribute name="UNO-Type-Path" value=""/> 228 </manifest> 229 <include name="**/*.class"/> 230 <include name="**/*.properties"/> 231 <include name="**/*.css"/> 232 <include name="**/*.dtd"/> 233 <include name="**/*.form"/> 234 <include name="**/*.gif "/> 235 <include name="**/*.htm"/> 236 <include name="**/*.html"/> 237 <include name="**/*.js"/> 238 <include name="**/*.mod"/> 239 <include name="**/*.sql"/> 240 <include name="**/*.xml"/> 241 <include name="**/*.xsl"/> 242 <include name="**/*.map"/> 243 </jar> 244 </target> 245 246 <target name="test" depends="prepare"> 247 </target> 248 249</project> 250 251