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