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_postgresql" 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_postgresql"/> 37 38 <!-- name of jar file created, without .jar extension --> 39 <property name="jarname" value="sdbc_postgresql"/> 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 <path id="classpath"> 67 <pathelement location="${OUTDIR}/bin/juh.jar"/> 68 <pathelement location="${OUTDIR}/bin/jurt.jar"/> 69 <pathelement location="${OUTDIR}/bin/ridl.jar"/> 70 <pathelement location="${OUTDIR}/bin/unoil.jar"/> 71 <pathelement location="${out}/class/dbtools/dbtools.jar"/> 72 </path> 73 74 <!-- name to display in documentation --> 75 <property name="docname" value="sdbc_postgresql"/> 76 77 <!-- set "modern" java compiler --> 78 <property name="build.compiler" value="modern"/> 79 80 <!-- set wether we want to compile with debug information --> 81 <property name="debug" value="on"/> 82 83 <!-- set wether we want to compile with optimisation --> 84 <property name="optimize" value="off"/> 85 86 <!-- set wether we want to compile with or without deprecation --> 87 <property name="deprecation" value="on"/> 88 89 <target name="info"> 90 <echo message="--------------------"/> 91 <echo message="${target}"/> 92 <echo message="--------------------"/> 93 </target> 94 95 <!-- ================================================================= --> 96 <!-- custom targets --> 97 <!-- ================================================================= --> 98 99 <!-- the main target, called in recursive builds --> 100 <target name="main" depends="info,prepare,compile,jar,javadoc,zipdoc"/> 101 102 <!-- prepare output directories --> 103 <target name="prepare"> 104 <mkdir dir="${build.dir}"/> 105 <mkdir dir="${build.dir}/doc/${target}"/> 106 <mkdir dir="${build.class}"/> 107 <mkdir dir="${build.misc}"/> 108 </target> 109 110 111 <target name="res" depends="prepare"> 112 <copy todir="${build.class}"> 113 <fileset dir="${java.dir}"> 114 <include name="**/*.properties"/> 115 <include name="**/*.css"/> 116 <include name="**/*.dtd"/> 117 <include name="**/*.form"/> 118 <include name="**/*.gif "/> 119 <include name="**/*.htm"/> 120 <include name="**/*.html"/> 121 <include name="**/*.js"/> 122 <include name="**/*.mod"/> 123 <include name="**/*.sql"/> 124 <include name="**/*.xml"/> 125 <include name="**/*.xsl"/> 126 <include name="**/*.map"/> 127 128 </fileset> 129 </copy> 130 </target> 131 132 133 <target name="compile" depends="prepare,res"> 134 <javac destdir="${build.class}" 135 debug="${debug}" 136 debuglevel="lines,vars,source" 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} juh.jar jurt.jar ridl.jar unoil.jar dbtools.jar"/> 216 <attribute name="Solar-Version" value="${RSCREVISION}"/> 217 <attribute name="RegistrationClassName" value="com.sun.star.sdbcx.comp.postgresql.PostgresqlDriver"/> 218 <attribute name="Sealed" value="true"/> 219 <attribute name="UNO-Type-Path" value=""/> 220 </manifest> 221 <include name="**/*.class"/> 222 <include name="**/*.properties"/> 223 <include name="**/*.css"/> 224 <include name="**/*.dtd"/> 225 <include name="**/*.form"/> 226 <include name="**/*.gif "/> 227 <include name="**/*.htm"/> 228 <include name="**/*.html"/> 229 <include name="**/*.js"/> 230 <include name="**/*.mod"/> 231 <include name="**/*.sql"/> 232 <include name="**/*.xml"/> 233 <include name="**/*.xsl"/> 234 <include name="**/*.map"/> 235 </jar> 236 </target> 237 238 <target name="test" depends="prepare"> 239 </target> 240 241</project> 242 243