Author: stliu
Date: 2010-03-03 17:37:00 -0500 (Wed, 03 Mar 2010)
New Revision: 18921
Added:
annotations/branches/v3_3_1_GA_CP/lib/ejb3-persistence-1.0.1.GA.jar
annotations/branches/v3_3_1_GA_CP/lib/hibernate-commons-annotations-3.0.0.GA.jar
Removed:
annotations/branches/v3_3_1_GA_CP/ivy.xml
annotations/branches/v3_3_1_GA_CP/ivy/
Modified:
annotations/branches/v3_3_1_GA_CP/build.xml
annotations/branches/v3_3_1_GA_CP/common-build.xml
Log:
JBPAPP-3837 clean up build script
Modified: annotations/branches/v3_3_1_GA_CP/build.xml
===================================================================
--- annotations/branches/v3_3_1_GA_CP/build.xml 2010-03-03 14:50:25 UTC (rev 18920)
+++ annotations/branches/v3_3_1_GA_CP/build.xml 2010-03-03 22:37:00 UTC (rev 18921)
@@ -6,8 +6,7 @@
-->
-<project name="Hibernate Annotations" default="dist"
basedir="."
- xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
+<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) -->
@@ -21,65 +20,133 @@
<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="${basedir}"/>
- <property name="ivy.dep.dir" value="${basedir}/build/lib"
/>
+ <property name="src.dir" location="src/java"/>
+ <property name="test.dir" location="src/test"/>
+ <property name="lib.dir" location="lib"/>
+ <property name="build.dir" location="build"/>
+ <property name="classes.dir"
location="${build.dir}/classes"/>
+ <property name="testclasses.dir"
location="${build.dir}/testclasses"/>
+ <property name="dist.target.dir" location="target"/>
+ <property name="dist.dir"
location="${build.dir}/${name}"/>
+ <property name="instrumenttest.out.dir"
value="instrumenttestout"/>
+ <property name="doc.dir" location="doc"/>
+ <property name="doc.api.dir" location="${doc.dir}/api"/>
+ <property name="doc.reference.dir"
location="${doc.dir}/reference"/>
+ <property name="dist.doc.dir"
location="${dist.dir}/doc"/>
+ <property name="dist.api.dir"
location="${dist.dir}/doc/api"/>
+ <property name="dist.src.dir" location="${dist.dir}/src"/>
+ <property name="dist.test.dir" location="${dist.dir}/test"/>
+ <property name="dist.lib.dir" location="${dist.dir}/lib"/>
+ <property name="jar.name" value="${name}"/>
+ <property name="jar.file.name"
value="${dist.dir}/${jar.name}.jar"/>
+ <property name="jartest.file.name"
value="${dist.dir}/${jar.name}-tests.jar"/>
+ <property name="javac.debug" value="on"/>
+ <property name="javac.optimize" value="off"/>
+ <property name="javac.source" value="1.5"/>
+ <property name="javac.target" value="1.5"/>
<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">
- <fileset dir="${ivy.dep.dir}/core">
- <include name="*.jar"/>
- </fileset>
+ <property name="test.output.dir"
value="${build.dir}/test_output"/>
+ <!-- set Hibernate core related properties -->
+ <property name="hibernate-core.home" location="../core"/>
+ <property name="hibernate-core.jar"
location="${hibernate-core.home}/hibernate3.jar"/>
+ <property name="hibernate-core.lib.dir"
location="${hibernate-core.home}/lib"/>
+ <path id="lib.class.path">
+ <path location="${hibernate-core.jar}" />
+ <fileset dir="${hibernate-core.lib.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${lib.dir}">
+ <include name="*.jar"/>
+ </fileset>
</path>
-
- <path id="junit.moduleclasspath">
- <pathelement location="${src.dir}"/>
- <pathelement location="${test.dir}"/>
- <pathelement
location="lib/testlibs/org.eclipse.jdt.core_3.1.0.jar"/>
- <fileset dir="${jdbc.dir}">
+ <path id="junit.classpath">
+ <pathelement path="${classes.dir}"/>
+ <pathelement path="${testclasses.dir}"/>
+ <path refid="lib.class.path"/>
+ <pathelement location="${src.dir}"/>
+ <pathelement location="${test.dir}"/>
+ <fileset dir="${jdbc.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
- </fileset>
- <fileset dir="${ivy.dep.dir}/test">
- <include name="*.jar"/>
- </fileset>
+ </fileset>
</path>
+ <patternset id="support.files">
+ <include name="**/*.jpg"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.dtd"/>
+ <include name="**/*.xsd"/>
+ <include name="**/*.xml"/>
+ <include name="**/*.xslt"/>
- <!-- ivy load -->
- <property name="ivy.jar.dir" value="${basedir}/ivy" />
- <property name="ivy.conf.dir" value="${basedir}" />
- <path id="ivy.lib.path">
- <fileset dir="${ivy.jar.dir}" includes="*.jar"/>
- </path>
- <taskdef resource="fr/jayasoft/ivy/ant/antlib.xml"
- uri="antlib:fr.jayasoft.ivy.ant"
classpathref="ivy.lib.path"/>
+ <!-- exclude everything we don't want in the jar -->
+ <exclude name="${build.dir}/**/*"/>
+ <exclude name="${doc.dir}/**/*"/>
+ <exclude name="classes/**/*"/>
+ <exclude name="build.xml"/>
+ <exclude name="**/*.properties"/>
+ <exclude name="**/*.ccf"/>
+ <exclude name="**/*.cfg.xml"/>
+ <exclude name="**/ehcache.xml"/>
+ </patternset>
- <target name="init">
- <antcall target="common-build.init"/>
+ <patternset id="source.files">
+ <include name="**/*.java"/>
+ <include name="**/*.properties"/>
+ </patternset>
+
+ <!-- junit paths/filesets -->
+ <fileset dir="${testclasses.dir}"
id="junit.batchtestset">
+ <include name="**/*Test.class"/>
+ </fileset>
+
+ <path id="testsrc.path">
+ <pathelement location="${test.dir}"/>
+ </path>
+
+ <target name="info" description="Echoes useful system
properties">
+ <echo message="java.vm.info=${java.vm.info}"/>
+ <echo message="java.vm.name=${java.vm.name}"/>
+ <echo message="java.vm.vendor=${java.vm.vendor}"/>
+ <echo message="java.vm.version=${java.vm.version}"/>
+ <echo message="os.arch=${os.arch}"/>
+ <echo message="os.name=${os.name}"/>
+ <echo message="os.version=${os.version}"/>
+ <echo message="java.home = ${java.home}"/>
+ <echo message="java.class.path = ${java.class.path}"/>
+ <echo message="file.encoding=${file.encoding}"/>
+ <echo message="user.home = ${user.home}"/>
+ <echo message="user.language=${user.language}"/>
+ </target>
+ <target name="init" description="Initialize the build">
<tstamp>
- <format property="now" pattern="yyyyMMddhhmmss"/>
+ <format property="subversion" pattern="yyyy-MM-dd
hh:mm:ss"/>
</tstamp>
- <mkdir dir="${lib.dir}/test"/>
- <mkdir dir="${ivy.dep.dir}/core"/>
- <mkdir dir="${ivy.dep.dir}/test"/>
- <ivy:configure file="${ivy.jar.dir}/ivyconf.xml" />
+ <echo message="Build ${Name}-${version} (${subversion})"/>
+ <mkdir dir="${classes.dir}"/>
+ <mkdir dir="${testclasses.dir}"/>
+ <copy todir="${classes.dir}">
+ <fileset dir="${src.dir}">
+ <patternset refid="support.files"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${build.dir}">
+ <fileset dir=".">
+ <include name="readme.txt"/>
+ <include name="lgpl.txt"/>
+ </fileset>
+ </copy>
+
+ <available file="${hibernate-core.jar}" type="file"
property="hibernate-core.jar.available"/>
+ <fail unless="hibernate-core.jar.available" message="Cannot locate
hibernate-core.jar: ${hibernate-core.jar}"/>
</target>
- <target name="get.deps.core" depends="init"
description="retrieve the core dependencies">
- <ivy:resolve conf="core" />
- <ivy:retrieve pattern="${ivy.dep.dir}/core/[artifact].[ext]"
conf="core" />
+ <target name="clean" description="Cleans up build and dist
directories">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.target.dir}"/>
</target>
-
- <target name="compile" depends="init,get.deps.core"
+ <target name="compile" depends="init"
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}"
@@ -99,17 +166,7 @@
</copy>
</target>
- <target name="get.deps.test" depends="init"
description="retrieve the test dependencies">
- <ivy:resolve conf="test" />
- <ivy:retrieve pattern="${ivy.dep.dir}/test/[artifact].[ext]"
conf="test" />
- </target>
-
- <target name="compiletest" depends="compile,get.deps.test"
description="Compile the tests">
- <available
- classname="org.eclipse.core.launcher.Main"
- property="build.compiler"
- value="org.eclipse.jdt.core.JDTCompilerAdapter"
- classpath="${java.class.path}"/>
+ <target name="compiletest" depends="compile"
description="Compile the tests">
<javac
destdir="${testclasses.dir}"
classpathref="junit.classpath"
@@ -121,26 +178,77 @@
<src refid="testsrc.path"/>
</javac>
</target>
+ <target name="junit" depends="compiletest">
+ <mkdir dir="${test.output.dir}"/>
+ <taskdef name="junit"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
+ <classpath>
+ <fileset dir="${hibernate-core.lib.dir}">
+ <include name="junit-*.jar"/>
+ <include name="ant-junit-*.jar"/>
+ </fileset>
+ </classpath>
+ </taskdef>
+ <junit printsummary="yes" haltonfailure="yes"
forkmode="once">
+ <classpath refid="junit.classpath"/>
+ <formatter type="plain"/>
+ <formatter type="xml"/>
+ <batchtest fork="yes" todir="${test.output.dir}"
haltonfailure="no">
+ <fileset refid="junit.batchtestset"/>
+ </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">
+ <mkdir dir="${test.output.dir}"/>
+ <taskdef name="junit"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
<classpath>
- <fileset dir="${jdbc.dir}">
- <include name="**/*.jar"/>
- <include name="**/*.zip"/>
+ <fileset dir="${hibernate-core.lib.dir}">
+ <include name="junit-*.jar"/>
+ <include name="ant-junit-*.jar"/>
</fileset>
- <path refid="lib.class.path"/>
- <pathelement path="${classes.dir}"/>
- <pathelement path="${src.dir}"/>
- <pathelement path="${test.dir}"/>
</classpath>
+ </taskdef>
+ <junit printsummary="yes" fork="yes"
haltonfailure="yes">
+ <classpath refid="junit.classpath"/>
<formatter type="plain"/>
<formatter type="xml"/>
- <test fork="yes" todir="test_output"
haltonfailure="no" name="${testname}"/>
+ <test fork="yes" todir="${test.output.dir}"
haltonfailure="no" name="${testname}"/>
</junit>
</target>
+ <!-- actually this instrument target is broken, I will fix it soon
+ <target name="junitinstrument" depends="compiletest,instrument"
+ description="Run the instrument test suite (requires driver.jar
property)">
+ <mkdir dir="${instrumenttest.out.dir}"/>
+ <junit printsummary="yes" haltonfailure="yes"
dir="${basedir}"
+ maxmemory="256M" fork="yes" forkmode="perBatch">
+ <classpath refid="junit.classpath"/>
+ <formatter type="plain"/>
+ <formatter type="xml"/>
+ <batchtest todir="${instrumenttest.out.dir}"
haltonfailure="no">
+ <fileset dir="${classes.dir}">
+ <include name="org/hibernate/test/**/*Test.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+-->
+ <target name="junitreport" depends="junit">
+ <taskdef name="junitreport"
classname="org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator">
+ <classpath>
+ <fileset dir="${hibernate-core.lib.dir}">
+ <include name="junit-*.jar"/>
+ <include name="ant-junit-*.jar"/>
+ </fileset>
+ </classpath>
+ </taskdef>
+ <junitreport todir="${test.output.dir}">
+ <fileset dir="${test.output.dir}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="frames"
todir="${test.output.dir}"/>
+ </junitreport>
+ </target>
<target name="jar" depends="compile" description="Build the
distribution .jar file">
<mkdir dir="${classes.dir}/META-INF"/>
@@ -154,16 +262,28 @@
<attribute name="Specification-Version" value="1.0"/>
<attribute name="Specification-Vendor"
value="jcp.org"/>
</manifest>
- <antcall target="common-build.jar"/>
- <ivy:resolve conf="core"/>
- <ivy:publish artifactspattern="${dist.dir}/[artifact].[ext]"
- resolver="local"
- pubrevision="${version}"
- pubdate="${now}"
- status="integration"
- />
+ <mkdir dir="${dist.dir}"/>
+ <jar filesetmanifest="merge" jarfile="${jar.file.name}"
basedir="${classes.dir}"/>
</target>
-
+ <target name="javadoc" description="Compile the Javadoc API
documentation to dist dir">
+ <mkdir dir="${dist.api.dir}"/>
+ <javadoc
+ packagenames="${javadoc.packagenames}"
+ classpathref="lib.class.path"
+ destdir="${dist.api.dir}"
+ use="true"
+ protected="true"
+ version="true"
+ windowtitle="${Name} API Documentation"
+ Overview="${doc.api.dir}/package.html"
+ doctitle="${Name} API Documentation"
+ stylesheetfile="${doc.api.dir}/jdstyle.css"
+
link="http://java.sun.com/j2se/1.5.0/docs/api/">
+ <packageset dir="${src.dir}" defaultexcludes="yes" >
+ <include name="**/*" />
+ </packageset>
+ </javadoc>
+ </target>
<target name="jpa-javadoc" if="jpa-present">
<mkdir dir="${jpa-javadoc.dir}"/>
<ant dir="../jpa-api" target="javadoc"
inheritAll="false"/>
@@ -174,57 +294,67 @@
</copy>
</target>
- <!-- Some of this can probably be moved to common-build... -->
- <target name="dist"
depends="get.deps.core,get.deps.test,jar,javadoc,jpa-javadoc,copysource,copytest,copylib,extras"
+ <target name="dist"
depends="jar,jartest,javadoc,jpa-javadoc,copytest,copysource"
description="Build everything">
-
-<!-- <ant inheritall="true"
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 todir="${dist.dir}/ivy" failonerror="false">
- <fileset dir="${ivy.jar.dir}">
- <include name="**/*.*"/>
- </fileset>
- </copy>
-
- <!-- copy dependencies -->
<copy todir="${dist.lib.dir}" failonerror="false">
- <fileset dir="${ivy.dep.dir}/core">
- <include name="*.jar"/>
- </fileset>
+ <fileset file="${lib.dir}/*.*"/>
</copy>
- <mkdir dir="${dist.lib.dir}/test"/>
- <copy todir="${dist.lib.dir}/test"
failonerror="false">
- <fileset dir="${ivy.dep.dir}/test">
- <include name="*.jar"/>
- </fileset>
- </copy>
- <copy todir="${dist.lib.dir}/test"
failonerror="false">
- <fileset file="${lib.dir}/test/*.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">
+ <copy file="readme.txt" todir="${dist.dir}"/>
+ <copy file="lgpl.txt" todir="${dist.dir}"/>
+ <copy file="changelog.txt" todir="${dist.dir}"/>
+ <copy file="build.xml" todir="${dist.dir}"/>
+ <copy file="${basedir}/build.properties.dist"
tofile="${dist.dir}/build.properties" failonerror="false" />
+ <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>
+ <!-- actually this target is broken, will be fixed soon
+ <target name="instrument" depends="compiletest"
+ description="Instrument the persistent classes">
+ <taskdef name="instrument"
classname="org.hibernate.tool.instrument.InstrumentTask">
+ <classpath path="${classes.dir}"/>
+ <classpath path="${testclasses.dir}"/>
+ <classpath refid="lib.class.path"/>
+ </taskdef>
+ <instrument verbose="true">
+ <fileset dir="${testclasses.dir}/org/hibernate/test">
+ <include name="**/*.class"/>
+ <exclude name="**/*Test$*.class"/>
+ <exclude name="**/*Test.class"/>
+ <exclude name="**/*Tests.class"/>
+ </fileset>
+ </instrument>
+ </target>
+-->
+ <target name="copytest" description="Copy tests to dist dir"
if="copy.test" >
+ <copy todir="${dist.test.dir}">
+ <fileset dir="${test.dir}"/>
+ </copy>
+ </target>
+
+ <target name="copysource" depends="copytest"
description="Copy sources to dist dir">
+ <copy todir="${dist.src.dir}">
+ <fileset dir="${src.dir}">
+ <patternset refid="source.files"/>
+ </fileset>
+ <fileset dir="${src.dir}">
+ <patternset refid="support.files"/>
+ </fileset>
+ </copy>
+ </target>
+
+
+ <target name="jartest" depends="compiletest"
description="Build the distribution .jar file">
+ <jar filesetmanifest="merge"
jarfile="${jartest.file.name}" basedir="${testclasses.dir}"/>
+ </target>
</project>
Modified: annotations/branches/v3_3_1_GA_CP/common-build.xml
===================================================================
--- annotations/branches/v3_3_1_GA_CP/common-build.xml 2010-03-03 14:50:25 UTC (rev
18920)
+++ annotations/branches/v3_3_1_GA_CP/common-build.xml 2010-03-03 22:37:00 UTC (rev
18921)
@@ -1,23 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="common-build" default="dist">
- <description>Common properties and targets for the HibernateExt
project</description>
-
- <!-- my.basedir property can be used to refer to files/directories relatively to the
common-build.xml file -->
- <dirname property="common-build.basedir"
file="${ant.file.common-build}"/>
-
- <!-- Give user a chance to override without editing this file
- (and without typing -D each time it compiles it) -->
- <property file="${common-build.basedir}/build.properties"/>
- <property file="${user.home}/.ant.properties"/>
-
<property name="src.dir" location="src/java"/>
<property name="test.dir" location="src/test"/>
<property name="lib.dir" location="lib"/>
<property name="build.dir" location="build"/>
+
<property name="classes.dir"
location="${build.dir}/classes"/>
<property name="testclasses.dir"
location="${build.dir}/testclasses"/>
<property name="dist.target.dir" location="target"/>
- <property name="dist.dir"
location="${dist.target.dir}/${name}"/>
+ <property name="dist.dir"
location="${build.dir}/${name}"/>
<property name="instrumenttest.out.dir"
value="instrumenttestout"/>
<property name="doc.dir" location="doc"/>
<property name="doc.api.dir" location="${doc.dir}/api"/>
@@ -32,348 +23,19 @@
<property name="jar.name" value="${name}"/>
<property name="jar.file.name"
value="${dist.dir}/${jar.name}.jar"/>
<property name="jartest.file.name"
value="${dist.dir}/${jar.name}-tests.jar"/>
-
- <property name="javadoc"
value="http://java.sun.com/j2se/1.5.0/docs/api/"/>
<property name="javac.debug" value="on"/>
<property name="javac.optimize" value="off"/>
<property name="javac.source" value="1.5"/>
<property name="javac.target" value="1.5"/>
- <!-- set Hibernate core related properties -->
- <property name="hibernate-core.home"
location="${common-build.basedir}/../hibernate-3.2"/>
- <property name="hibernate-core.jar"
location="${hibernate-core.home}/hibernate3.jar"/>
- <property name="hibernate-core.lib.dir"
location="${hibernate-core.home}/lib"/>
- <property name="hibernate-core.jdbc.dir"
location="${hibernate-core.home}/lib"/> <!-- for some reason jdbc.dir is
renamed to lib instead of jdbc when doing a dist of hibernate3 -->
- <property name="hibernate-core.doc.api"
location="${hibernate-core.home}/doc/api"/>
- <property name="hibernate-cvs.doc.reference"
location="${common-build.basedir}/../core/doc/reference"/>
- <taskdef name="junit"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
- <classpath>
- <fileset dir="${hibernate-core.lib.dir}">
- <include name="junit-*.jar"/>
- <include name="ant-junit-*.jar"/>
- </fileset>
- </classpath>
- </taskdef>
- <taskdef name="junitreport"
classname="org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator">
- <classpath>
- <fileset dir="${hibernate-core.lib.dir}">
- <include name="junit-*.jar"/>
- <include name="ant-junit-*.jar"/>
- </fileset>
- </classpath>
- </taskdef>
- <path id="lib.class.path">
- <path location="${hibernate-core.jar}"></path>
- <fileset dir="${hibernate-core.lib.dir}">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="${lib.dir}">
- <include name="*.jar"/>
- </fileset>
- <path refid="lib.moduleclass.path"/>
- </path>
- <!-- overridable in modules -->
- <path id="lib.moduleclass.path"/>
- <patternset id="support.files">
- <include name="**/*.jpg"/>
- <include name="**/*.gif"/>
- <include name="**/*.dtd"/>
- <include name="**/*.xsd"/>
- <include name="**/*.xml"/>
- <include name="**/*.xslt"/>
- <!-- exclude everything we don't want in the jar -->
- <exclude name="${build.dir}/**/*"/>
- <exclude name="${doc.dir}/**/*"/>
- <exclude name="classes/**/*"/>
- <exclude name="build.xml"/>
- <exclude name="**/*.properties"/>
- <exclude name="**/*.ccf"/>
- <exclude name="**/*.cfg.xml"/>
- <exclude name="**/ehcache.xml"/>
- </patternset>
- <patternset id="source.files">
- <include name="**/*.java"/>
- <include name="**/*.properties"/>
- </patternset>
- <!-- junit paths/filesets -->
- <fileset dir="${testclasses.dir}"
id="junit.batchtestset">
- <include name="**/*Test.class"/>
- </fileset>
-
- <path id="testsrc.path">
- <pathelement location="${test.dir}"/>
- </path>
- <path id="junit.classpath">
- <fileset dir="${lib.dir}">
- <include name="*.jar"/>
- </fileset>
- <pathelement path="${classes.dir}"/>
- <pathelement path="${testclasses.dir}"/>
- <path refid="lib.class.path"/>
- <path refid="junit.moduleclasspath"/>
- </path>
- <!-- Tasks -->
- <target name="clean" description="Cleans up build and dist
directories">
- <delete dir="${build.dir}"/>
- <delete dir="${dist.target.dir}"/>
- </target>
- <target name="init" description="Initialize the build">
- <tstamp>
- <format property="subversion" pattern="yyyy-MM-dd
hh:mm:ss"/>
- </tstamp>
- <echo message="Build ${Name}-${version} (${subversion})"/>
- <mkdir dir="${classes.dir}"/>
- <mkdir dir="${testclasses.dir}"/>
- <copy todir="${classes.dir}">
- <fileset dir="${src.dir}">
- <patternset refid="support.files"/>
- </fileset>
- </copy>
-
- <copy todir="${build.dir}">
- <fileset dir=".">
- <include name="readme.txt"/>
- <include name="lgpl.txt"/>
- </fileset>
- </copy>
-
- <available file="${hibernate-core.jar}" type="file"
property="hibernate-core.jar.available"/>
- <fail unless="hibernate-core.jar.available" message="Cannot
locate hibernate-core.jar: ${hibernate-core.jar}"/>
- </target>
-
- <target name="compile" depends="init"
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
- target="${javac.target}"
- source="${javac.source}"
- srcdir="${src.dir}"
- destdir="${classes.dir}"
- classpathref="lib.class.path"
- debug="${javac.debug}"
- optimize="${javac.optimize}"
- nowarn="on">
- </javac>
- </target>
-
- <target name="compiletest" depends="compile"
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
- target="${javac.target}"
- source="${javac.source}"
- destdir="${testclasses.dir}"
- classpathref="junit.classpath"
- debug="${javac.debug}"
- optimize="${javac.optimize}"
- nowarn="on">
- <src refid="testsrc.path"/>
- </javac>
- </target>
-
- <target name="instrument" depends="compiletest"
- description="Instrument the persistent classes"> <!--
depends="jar" -->
-
- <taskdef name="instrument"
classname="org.hibernate.tool.instrument.InstrumentTask">
- <classpath path="${classes.dir}"/>
- <classpath path="${testclasses.dir}"/>
- <classpath refid="lib.class.path"/>
- </taskdef>
-
- <instrument verbose="true">
- <fileset dir="${testclasses.dir}/org/hibernate/test">
- <include name="**/*.class"/>
- <exclude name="**/*Test$*.class"/>
- <exclude name="**/*Test.class"/>
- <exclude name="**/*Tests.class"/>
- </fileset>
- </instrument>
- </target>
-
- <target name="copytest" description="Copy tests to dist dir"
if="copy.test" >
- <mkdir dir="${dist.test.dir}"/>
- <copy todir="${dist.test.dir}">
- <fileset dir="${test.dir}"/>
- </copy>
- </target>
-
- <target name="copysource" depends="copytest"
description="Copy sources to dist dir">
- <mkdir dir="${dist.src.dir}"/>
- <copy todir="${dist.src.dir}">
- <fileset dir="${src.dir}">
- <patternset refid="source.files"/>
- </fileset>
- <fileset dir="${src.dir}">
- <patternset refid="support.files"/>
- </fileset>
- </copy>
- <mkdir dir="${dist.src.dir}"/>
- <copy todir="${dist.src.dir}">
- <fileset dir="${src.dir}">
- <patternset refid="source.files"/>
- </fileset>
- <fileset dir="${src.dir}">
- <patternset refid="support.files"/>
- </fileset>
- </copy>
- </target>
-
- <target name="copylib" description="Copy jars to lib dir">
- <mkdir dir="${dist.lib.dir}"/>
- <copy todir="${dist.lib.dir}">
- <fileset dir="${lib.dir}">
- <include name="*.jar"/>
- <exclude name="log4j.jar"/>
- <exclude name="checkstyle*.jar"/>
- <include name="*.txt"/>
- </fileset>
- </copy>
- </target>
-
- <target name="copydoc" description="Copy doc to dist dir"
if="copy.doc">
- <mkdir dir="${dist.doc.dir}"/>
- <copy todir="${dist.doc.dir}">
- <fileset dir="${doc.dir}">
- <include name="**/*.html"/>
- </fileset>
- </copy>
- </target>
-
- <target name="jar" depends="compile" description="Build
the distribution .jar file">
- <mkdir dir="${dist.dir}"/>
- <jar filesetmanifest="merge" jarfile="${jar.file.name}"
basedir="${classes.dir}"/>
- </target>
-
- <target name="jartest" depends="compiletest"
description="Build the distribution .jar file">
- <mkdir dir="${dist.dir}"/>
- <jar filesetmanifest="merge"
jarfile="${jartest.file.name}" basedir="${testclasses.dir}"/>
- </target>
-
- <!-- DOCUMENTATION -->
-
- <target name="javadoc" description="Compile the Javadoc API
documentation to dist dir">
- <mkdir dir="${dist.api.dir}"/>
- <javadoc
- packagenames="${javadoc.packagenames}"
- classpathref="lib.class.path"
- destdir="${dist.api.dir}"
- use="true"
- protected="true"
- version="true"
- windowtitle="${Name} API Documentation"
- Overview="${doc.api.dir}/package.html"
- doctitle="${Name} API Documentation"
- stylesheetfile="${doc.api.dir}/jdstyle.css"
- link="${javadoc}">
- <packageset dir="${src.dir}" defaultexcludes="yes" >
- <include name="**/*" />
- </packageset>
- </javadoc>
- </target>
-
-
- <target name="extras" description="Copies miscellaneous files to root
dir">
- <copy todir="${dist.dir}/bin" failonerror="false">
- <fileset dir="bin">
- <include name="*.bat"/>
- </fileset>
- </copy>
- <copy file="readme.txt" todir="${dist.dir}"/>
- <copy file="lgpl.txt" todir="${dist.dir}"/>
- <copy file="changelog.txt" todir="${dist.dir}"/>
- <copy file="build.xml" todir="${dist.dir}"/>
- <replace file="${dist.dir}/build.xml">
- <replacetoken><![CDATA[../${name}-${version}]]></replacetoken>
- <replacevalue><![CDATA[../${name}]]></replacevalue>
- </replace>
- </target>
-
- <target name="dist"
depends="jar,javadoc,copysource,copylib,copydoc,extras" description="Build
everything">
- <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>
-
- <target name="info" description="Echoes useful system
properties">
- <echo message="java.vm.info=${java.vm.info}"/>
- <echo message="java.vm.name=${java.vm.name}"/>
- <echo message="java.vm.vendor=${java.vm.vendor}"/>
- <echo message="java.vm.version=${java.vm.version}"/>
- <echo message="os.arch=${os.arch}"/>
- <echo message="os.name=${os.name}"/>
- <echo message="os.version=${os.version}"/>
- <echo message="java.home = ${java.home}"/>
- <echo message="java.class.path = ${java.class.path}"/>
- <echo message="build.compiler = ${build.compiler}"/>
- <echo message="file.encoding=${file.encoding}"/>
- <echo message="user.home = ${user.home}"/>
- <echo message="user.language=${user.language}"/>
- </target>
-
- <target name="junit" depends="compiletest">
- <mkdir dir="test_output"/>
- <junit printsummary="yes" haltonfailure="yes"
forkmode="once">
- <classpath refid="junit.classpath"/>
- <formatter type="plain"/>
- <formatter type="xml"/>
- <batchtest fork="yes" todir="test_output"
haltonfailure="no">
- <fileset refid="junit.batchtestset"/>
- </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 refid="junit.classpath"/>
- <formatter type="plain"/>
- <formatter type="xml"/>
- <test fork="yes" todir="test_output"
haltonfailure="no" name="${testname}"/>
- </junit>
- </target>
-
- <target name="junitinstrument" depends="compiletest,instrument"
- description="Run the instrument test suite (requires driver.jar
property)">
- <mkdir dir="${instrumenttest.out.dir}"/>
- <junit printsummary="yes" haltonfailure="yes"
dir="${basedir}"
- maxmemory="256M" fork="yes" forkmode="perBatch">
- <classpath refid="junit.classpath"/>
- <formatter type="plain"/>
- <formatter type="xml"/>
- <batchtest todir="${instrumenttest.out.dir}"
haltonfailure="no">
- <fileset dir="${classes.dir}">
- <include name="org/hibernate/test/**/*Test.class"/>
- </fileset>
- </batchtest>
- </junit>
- </target>
-
- <target name="junitreport" depends="">
- <junitreport todir="./test_output">
- <fileset dir="test_output">
- <include name="TEST-*.xml"/>
- </fileset>
- <report format="frames" todir="./test_output"/>
- </junitreport>
- </target>
</project>
\ No newline at end of file
Deleted: annotations/branches/v3_3_1_GA_CP/ivy.xml
===================================================================
--- annotations/branches/v3_3_1_GA_CP/ivy.xml 2010-03-03 14:50:25 UTC (rev 18920)
+++ annotations/branches/v3_3_1_GA_CP/ivy.xml 2010-03-03 22:37:00 UTC (rev 18921)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ivy-module version="1.3"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation=
- "http://www.jayasoft.org/misc/ivy/ivy.xsd">
- <info organisation="org.hibernate"
module="hibernate-annotations"/>
- <configurations>
- <conf name="core" description="Core module
dependencies"/>
- <conf name="test" visibility="private"
description="Dependencies needed for testing purposes"/>
- </configurations>
- <publications>
- <artifact name="hibernate-annotations" conf="core"/>
- </publications>
- <dependencies>
- <dependency name="ejb3-persistence" rev="1.0.1.GA"
conf="core->default"/>
- <dependency name="commons-annotations" rev="3.0.0.GA"
conf="core->core"/>
- </dependencies>
-</ivy-module>
\ No newline at end of file
Added: annotations/branches/v3_3_1_GA_CP/lib/ejb3-persistence-1.0.1.GA.jar
===================================================================
(Binary files differ)
Property changes on: annotations/branches/v3_3_1_GA_CP/lib/ejb3-persistence-1.0.1.GA.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: annotations/branches/v3_3_1_GA_CP/lib/hibernate-commons-annotations-3.0.0.GA.jar
===================================================================
(Binary files differ)
Property changes on:
annotations/branches/v3_3_1_GA_CP/lib/hibernate-commons-annotations-3.0.0.GA.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream