Author: epbernard
Date: 2007-08-15 20:00:10 -0400 (Wed, 15 Aug 2007)
New Revision: 13042
Added:
annotations/tags/v3_3_0_GA/build.xml
Log:
Move annotations tags/annotations_v3_3_0_GA to the new structure (v3_3_0_GA)
Copied: annotations/tags/v3_3_0_GA/build.xml (from rev 13041,
tags/annotations_v3_3_0_GA/HibernateExt/annotations/build.xml)
===================================================================
--- annotations/tags/v3_3_0_GA/build.xml (rev 0)
+++ annotations/tags/v3_3_0_GA/build.xml 2007-08-16 00:00:10 UTC (rev 13042)
@@ -0,0 +1,244 @@
+<!--
+
+ Hibernate Annotations ANT build script.
+
+ You need JDK 5.0 installed to build Hibernate Annotations.
+
+-->
+
+<project name="Hibernate Annotations" default="dist"
basedir=".">
+
+ <!-- Give user a chance to override without editing this file
+ (and without typing -D each time it compiles it) -->
+ <property file="build.properties"/>
+ <property file="${user.home}/.ant.properties"/>
+
+ <!-- Name of project and version, used to create filenames -->
+ <property name="Name" value="Hibernate Annotations"/>
+ <property name="name" value="hibernate-annotations"/>
+ <property name="version" value="3.3.0.GA"/>
+ <property name="javadoc.packagenames"
value="org.hibernate.*"/>
+ <property name="jdbc.dir" value="jdbc"/>
+ <property name="copy.test" value="true"/>
+ <property name="javac.source" value="1.5"/>
+ <property name="javac.target" value="1.5"/>
+ <property name="common.dir" value="../common"/>
+
+ <property name="jpa-api.jar"
value="${basedir}/../jpa-api/build/ejb3-persistence.jar"/>
+ <property name="validator.jar"
+
value="${basedir}/../validator/target/hibernate-validator/hibernate-validator.jar"/>
+ <property name="commons-annotations.jar"
+
value="${basedir}/../commons-annotations/target/hibernate-commons-annotations/hibernate-commons-annotations.jar"/>
+
+
+ <available property="jpa-present" file="${basedir}/../jpa-api"
type="dir"/>
+ <import file="${common.dir}/common-build.xml"/>
+ <property name="jpa-javadoc.dir"
value="${dist.doc.dir}/jpa-api"/>
+
+ <path id="lib.moduleclass.path">
+ <pathelement location="${jpa-api.jar}"/>
+ <pathelement location="${commons-annotations.jar}"/>
+ </path>
+
+ <path id="junit.moduleclasspath">
+ <pathelement location="${src.dir}"/>
+ <pathelement location="${test.dir}"/>
+ <pathelement location="${validator.jar}"/>
+ <pathelement
location="lib/testlibs/org.eclipse.jdt.core_3.1.0.jar"/>
+ <fileset dir="${jdbc.dir}">
+ <include name="**/*.jar"/>
+ <include name="**/*.zip"/>
+ </fileset>
+ </path>
+
+ <target name="init">
+ <antcall target="common-build.init"/>
+ <available file="${jpa-api.jar}" type="file"
property="jpa-api.jar.available"/>
+ <available file="${commons-annotations.jar}" type="file"
property="commons-annotations.jar.available"/>
+ <available file="${validator.jar}" type="file"
property="validator.jar.available"/>
+ <mkdir dir="${lib.dir}/test"/>
+ </target>
+
+ <target name="get.jpa-api" depends="init"
unless="jpa-api.jar.available">
+ <ant inheritall="false" dir="${basedir}/../jpa-api"
target="clean"/>
+ <ant inheritall="false" dir="${basedir}/../jpa-api"
target="jar"/>
+ </target>
+
+ <target name="get.commons-annotations" depends="init"
unless="commons-annotations.jar.available">
+ <ant inheritall="false" dir="${basedir}/../commons-annotations"
target="clean"/>
+ <ant inheritall="false" dir="${basedir}/../commons-annotations"
target="jar"/>
+ </target>
+
+ <target name="get.validator" depends="init"
unless="validator.jar.available">
+ <ant inheritall="false" dir="${basedir}/../validator"
target="clean"/>
+ <ant inheritall="false" dir="${basedir}/../validator"
target="jar"/>
+ </target>
+
+ <target name="compile"
depends="init,get.jpa-api,get.commons-annotations"
+ description="Compile the Java source code">
+ <available
+ classname="org.eclipse.core.launcher.Main"
+ property="build.compiler"
+ value="org.eclipse.jdt.core.JDTCompilerAdapter"
+ classpath="${java.class.path}"/>
+ <javac
+ srcdir="${src.dir}"
+ destdir="${classes.dir}"
+ classpathref="lib.class.path"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ nowarn="on"
+ source="${javac.source}"
+ target="${javac.target}">
+ <src path="${src.dir}"/>
+ </javac>
+ <copy todir="${classes.dir}">
+ <fileset dir="${src.dir}">
+ <include name="**/resources/*.properties"/>
+ <include name="**/*.xsd"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="compiletest" depends="compile,get.validator"
description="Compile the tests">
+ <available
+ classname="org.eclipse.core.launcher.Main"
+ property="build.compiler"
+ value="org.eclipse.jdt.core.JDTCompilerAdapter"
+ classpath="${java.class.path}"/>
+ <javac
+ destdir="${testclasses.dir}"
+ classpathref="junit.classpath"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ nowarn="on"
+ source="${javac.source}"
+ target="${javac.target}">
+ <src refid="testsrc.path"/>
+ </javac>
+ </target>
+
+
+ <!-- target name="junit" depends="compiletest">
+ <mkdir dir="test_output"/>
+ <junit fork="yes" printsummary="yes"
haltonfailure="yes"
+ forkmode="perBatch">
+ <classpath>
+ <fileset dir="${jdbc.dir}">
+ <include name="**/*.jar"/>
+ <include name="**/*.zip"/>
+ </fileset>
+ <path refid="lib.class.path"/>
+ <pathelement path="${classes.dir}"/>
+ <pathelement path="${src.dir}"/>
+ <pathelement path="${test.dir}"/>
+ </classpath>
+ <formatter type="plain"/>
+ <formatter type="xml"/>
+ <batchtest fork="yes" todir="test_output"
haltonfailure="no">
+ <fileset dir="${classes.dir}">
+ <include name="**/*Test.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target -->
+
+ <!-- Run a single unit test. -->
+ <target name="junitsingle" depends="compiletest"
+ description="Run a single test suite (requires testname and jdbc.driver
properties)">
+ <mkdir dir="test_output"/>
+ <junit printsummary="yes" fork="yes"
haltonfailure="yes">
+ <classpath>
+ <fileset dir="${jdbc.dir}">
+ <include name="**/*.jar"/>
+ <include name="**/*.zip"/>
+ </fileset>
+ <path refid="lib.class.path"/>
+ <pathelement path="${classes.dir}"/>
+ <pathelement path="${src.dir}"/>
+ <!-- pick up properties from here -->
+ <pathelement path="${test.dir}"/>
+ <!-- pick up mappings from here -->
+ </classpath>
+ <formatter type="plain"/>
+ <formatter type="xml"/>
+ <test fork="yes" todir="test_output"
haltonfailure="no" name="${testname}"/>
+ </junit>
+ </target>
+
+ <!-- target name="report">
+ <mkdir dir="test_output"/>
+ <junitreport todir="test_output">
+ <fileset dir="test_output">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="frames" todir="test_output/report"/>
+ </junitreport>
+ </target -->
+
+ <target name="jar" depends="compile" description="Build the
distribution .jar file">
+ <mkdir dir="${classes.dir}/META-INF"/>
+ <manifest file="${classes.dir}/META-INF/MANIFEST.MF">
+ <attribute name="Product" value="${Name}"/>
+ <attribute name="Version" value="${version}"/>
+ </manifest>
+ <antcall target="common-build.jar"/>
+ </target>
+
+ <!-- target name="javadoc" description="Compile the Javadoc API
documentation to dist dir">
+ <echo>Skipping java doc since ant's javadoc task cannot handle an
alternative javadoc</echo>
+ </target -->
+
+ <target name="jpa-javadoc" if="jpa-present">
+ <mkdir dir="${jpa-javadoc.dir}"/>
+ <ant dir="../jpa-api" target="javadoc"
inheritAll="false"/>
+ <copy todir="${jpa-javadoc.dir}">
+ <fileset dir="${basedir}/../jpa-api/build/api">
+ <include name="**/*.*"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- Some of this can probably be moved to common-build... -->
+ <target name="dist"
depends="jar,javadoc,jpa-javadoc,copysource,copytest,copylib,extras"
+ description="Build everything">
+
+ <ant inheritall="false" dir="${basedir}/doc/reference"/>
+ <copy todir="${dist.dir}/doc/reference" failonerror="false">
+ <fileset dir="${basedir}/doc/reference/build">
+ <include name="**/*.*"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${dist.dir}" failonerror="false">
+ <fileset dir="${common.dir}">
+ <include name="common-build.xml"/>
+ </fileset>
+ </copy>
+
+ <!-- copy dependencies -->
+ <copy todir="${dist.lib.dir}" failonerror="false">
+ <fileset file="${jpa-api.jar}"/>
+ <fileset file="${commons-annotations.jar}"/>
+ </copy>
+ <mkdir dir="${dist.lib.dir}/test"/>
+ <copy todir="${dist.lib.dir}/test"
failonerror="false">
+ <fileset file="${validator.jar}"/>
+ </copy>
+
+ <copy file="${basedir}/build.properties.dist"
tofile="${dist.dir}/build.properties" failonerror="false">
+ </copy>
+ <antcall target="common-build.dist"/>
+ </target>
+
+ <target name="zip-dist" description="zip the dist">
+ <zip zipfile="${dist.dir}-${version}.zip">
+ <zipfileset prefix="${name}-${version}" dir="${dist.dir}"/>
+ </zip>
+ <tar compression="gzip"
tarfile="${dist.dir}-${version}.tar.gz">
+ <tarfileset prefix="${name}-${version}" dir="${dist.dir}"/>
+ </tar>
+ </target>
+
+
+</project>
Show replies by date