diff options
Diffstat (limited to 'java-hibernate/build.xml')
-rw-r--r-- | java-hibernate/build.xml | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/java-hibernate/build.xml b/java-hibernate/build.xml new file mode 100644 index 0000000..2a78bef --- /dev/null +++ b/java-hibernate/build.xml @@ -0,0 +1,104 @@ +<project default="all"> + <property name="JAVA_LIB_HOME" location="lib" /> + <property name="HIBERNATE_DIR" location="${JAVA_LIB_HOME}/hibernate" /> + + <property name="cfg-dir" location="cfg" /> + <property name="src-dir" location="src" /> + <property name="obj-dir" location="classes" /> + <property name="meta-dir" location="META-INF" /> + <property name="verbose" value="false" /> + + <path id="classpath.base"> + <pathelement location="${obj-dir}" /> + <pathelement location="${JAVA_LIB_HOME}/h2-1.3.161.jar" /> + <!--pathelement location="${JAVA_LIB_HOME}/logback-access-1.0.0.jar" /--> + <pathelement location="${JAVA_LIB_HOME}/logback-classic-1.0.0.jar" /> + <pathelement location="${JAVA_LIB_HOME}/logback-core-1.0.0.jar" /> + <pathelement location="${HIBERNATE_DIR}/hibernate3.jar" /> + <fileset dir="${HIBERNATE_DIR}/lib" includes="**/*.jar" /> + </path> + + <path id="classpath.run"> + <path refid="classpath.base" /> + </path> + <path id="classpath.test"> + <pathelement location="${cfg-dir}" /> + <pathelement location="${JAVA_LIB_HOME}/junit-4.10.jar" /> + <path refid="classpath.base" /> + </path> + <path id="classpath.test-basic"> + <path refid="classpath.test" /> + <pathelement location="${cfg-dir}/basic" /> + </path> + <path id="classpath.test-annotations"> + <path refid="classpath.test" /> + <pathelement location="${cfg-dir}/annotations" /> + </path> + <path id="classpath.test-jpa"> + <path refid="classpath.test" /> + </path> + + <target name="init"> + <mkdir dir="${obj-dir}" /> + </target> + + <target name="clean-compile"> + <delete verbose="${verbose}" dir="${obj-dir}" /> + </target> + + <target name="resources"> + <copy todir="${obj-dir}/META-INF"> + <fileset dir="${meta-dir}" /> + </copy> + </target> + + <target name="compile-test" depends="init,resources"> + <javac srcdir="${src-dir}" destdir="${obj-dir}" includeantruntime="false"> + <classpath refid="classpath.test" /> + <compilerarg value="-Xlint"/> + </javac> + </target> + + <target name="test-basic" depends="compile-test"> + <junit> + <classpath refid="classpath.test-basic" /> + <formatter type="brief" usefile="false" /> + <test name="ch.asynk.hibernate.basic.HibernateBasicTest" /> + </junit> + </target> + + <target name="test-annotations" depends="compile-test"> + <junit> + <classpath refid="classpath.test-annotations" /> + <formatter type="brief" usefile="false" /> + <test name="ch.asynk.hibernate.annotations.HibernateAnnotationsTest" /> + </junit> + </target> + + <target name="test-jpa" depends="compile-test"> + <junit> + <classpath refid="classpath.test-jpa" /> + <formatter type="brief" usefile="false" /> + <test name="ch.asynk.hibernate.jpa.HibernateJPATest" /> + </junit> + </target> + + <target name="test-all"> + <antcall target="test-basic"/> + <antcall target="test-annotations"/> + <antcall target="test-jpa"/> + </target> + + <target name="dist"> + <jar destfile="distrib.jar" + basedir="." + includes="build.xml,src/**,cfg/**" + excludes="" + /> + </target> + + <target name="all" depends="test-all" /> + <target name="clean" depends="clean-compile" /> +</project> + +<!-- $Id: build.xml,v 1.6 2003/07/07 19:29:01 dwight Exp $ --> |