Build_jdbct4.xml – HP Integrity NonStop H-Series User Manual
Page 358

</javac>
<copy todir="${build.dir}" preservelastmodified="true">
<fileset dir="${src.dir}">
<include name="**/*.xml"/>
<include name="**/*.properties"/>
<exclude name="**/ build_jdbct4.xml"/>
<exclude name="**/ build_jdbct2.xml"/>
</fileset>
</copy>
<mkdir dir="${dist.dir}"/>
<jar jarfile="${dist.dir}/${name}.jar" compress="true" basedir="bin">
<include name="**/*.*" />
</jar>
</target>
<target name="all" depends="clean,build" description="Clean,build"/>
</project>
build_jdbct4.xml
(<My SASH Home>\hibernate\samples\eg\build_jdbct4.xml)
This is the build file for Caveat Emptor application while using JDBC Type 4 driver for database
connectivity. The content of this file is:
<?xml version="1.0"?>
<project name="eg" basedir="." default="usage">
<property name="name" value="caveatemptor"/>
<property name="src.dir" value="."/>
<property name="build.dir" value="bin"/>
<property name="dist.dir" value="dist"/>
<property name="jdbct4.root" value="<JDBC T4 installation directory>"/>
<property name="hibernate.root" value="<Hibernate Home>"/>
<path id="master-classpath">
<fileset dir="${hibernate.root}/lib">
<include name="log4j-1.2.11.jar"/>
</fileset>
<fileset dir="${hibernate.root}">
<include name="hibernate3.jar"/>
</fileset>
</path>
<target name="usage">
<echo message=""/>
<echo message="Hibernate Cavetemptor application build"/>
<echo message="------------------------------------------------------"/>
<echo message=""/>
<echo message="Available targets are:"/>
<echo message=""/>
<echo message="clean --> Clean output directories (bin, dist )"/>
<echo message="build --> Compile main Java sources and create jar file"/>
<echo message="all --> Clean, build"/>
<echo message=""/>
</target>
<target name="clean" description="Clean output directories (build, dist)">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="build" description="Compile main source tree java files into class files, generate jar files">
<mkdir dir="${build.dir}"/>
<javac destdir="${build.dir}" source="1.5" target="1.5" debug="true"
deprecation="true" optimize="false" failonerror="true">
<src path="${src.dir}"/>
<classpath refid="master-classpath"/>
</javac>
<copy todir="${build.dir}" preservelastmodified="true">
<fileset dir="${src.dir}">
<include name="**/*.xml"/>
<include name="**/*.properties"/>
<exclude name="**/ build_jdbct4.xml"/>
<exclude name="**/ build_jdbct2.xml"/>
</fileset>
<fileset dir="${jdbct4.root}">
358
Customizing Sample Application