Author: gbadner
Date: 2008-05-15 16:04:42 -0400 (Thu, 15 May 2008)
New Revision: 14665
Modified:
core/branches/Branch_3_2_4_SP1_CP/build.xml
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/legacy/ConfigurationPerformanceTest.java
Log:
HIBERNATE-96 : Split distribution into separate source and binary distributions
Modified: core/branches/Branch_3_2_4_SP1_CP/build.xml
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/build.xml 2008-05-15 18:10:32 UTC (rev 14664)
+++ core/branches/Branch_3_2_4_SP1_CP/build.xml 2008-05-15 20:04:42 UTC (rev 14665)
@@ -176,10 +176,7 @@
<delete dir="${dir.out.db}" />
</target>
-
- <!-- The ANTLR related targets -->
-
- <target name="init.antlr" depends="init"
description="Check ANTLR dependencies.">
+ <target name="init.antlr" depends="init"
unless="antlr.isUpToDate" description="Check ANTLR dependencies.">
<uptodate property="antlr.isUpToDate"
targetfile="${dir.out.antlr-package}/.antlr_run">
<srcfiles dir="${dir.grammar}" includes="*.g"/>
</uptodate>
@@ -223,7 +220,7 @@
<!-- Compilation targets -->
- <target name="compile" depends="init,antlr"
description="Compile the Java source code">
+ <target name="compile" depends="init,antlr"
unless="classes.isUpToDate" description="Compile the Java source
code">
<mkdir dir="${dir.out.classes}"/>
<available classname="org.eclipse.core.launcher.Main"
property="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"
classpath="${java.class.path}"/>
@@ -246,7 +243,7 @@
</copy>
</target>
- <target name="compiletest" depends="compile"
description="Compile the tests">
+ <target name="compiletest" depends="compile"
unless="test-classes.isUpToDate" description="Compile the tests">
<mkdir dir="${dir.out.test-classes}"/>
<available classname="org.eclipse.core.launcher.Main"
property="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"
classpath="${java.class.path}"/>
@@ -295,8 +292,19 @@
<unzip src="${basedir}/${jar.name}.jar"
dest="${dir.out.classes}" />
<unzip src="${basedir}/${testjar.name}.jar"
dest="${dir.out.test-classes}" />
<delete dir="${dir.out.generated-source}" />
- <mkdir dir="${dir.out.antlr-package}" />
- <touch file="${dir.out.antlr-package}/.antlr_run"/>
+ <available file="${dir.out.classes}/org/hibernate/hql/antlr"
+ type="dir"
+ property="antlr.isUpToDate"/>
+ <available file="${dir.out.classes}/org/hibernate"
+ type="dir"
+ property="classes.isUpToDate"/>
+ <available file="${dir.out.test-classes}/org/hibernate/test"
+ type="dir"
+ property="test-classes.isUpToDate"/>
+ <property name="test-classes.isFromJar"
value="$test-classes.isUpToDate" />
+ <echo message="antlr.isUpToDate=${antlr.isUpToDate}" />
+ <echo message="classes.isUpToDate=${classes.isUpToDate}" />
+ <echo message="test-classes.isUpToDate=${test-classes.isUpToDate}" />
</target>
<target name="junit" depends="junit.prepare">
@@ -515,7 +523,7 @@
<!-- Instrumentation tasks -->
- <target name="instrument.prepare">
+ <target name="instrument.clean">
<delete>
<fileset dir="${dir.out.test-classes}">
<patternset refid="ps.instrument.domain" />
@@ -523,28 +531,35 @@
</delete>
</target>
- <target name="instrument.cglib"
depends="instrument.prepare,compiletest" description="Performs cglib-based
instrumentation">
- <taskdef name="instrument"
classname="org.hibernate.tool.instrument.cglib.InstrumentTask">
- <classpath path="${dir.out.classes}"/>
- <classpath refid="path.lib"/>
- </taskdef>
- <available classname="org.eclipse.core.launcher.Main"
property="build.compiler"
+ <target name="instrument.prepare-from-testjar"
depends="instrument.clean" if="test-classes.isFromJar">
+ <unzip src="${basedir}/${testjar.name}.jar"
dest="${dir.out.test-classes}" />
+ </target>
+
+ <target name="instrument.prepare"
depends="instrument.prepare-from-testjar"
unless="test-classes.isFromJar">
+ <available classname="org.eclipse.core.launcher.Main"
property="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"
classpath="${java.class.path}"/>
- <javac destdir="${dir.out.test-classes}"
+ <javac destdir="${dir.out.test-classes}"
debug="${javac.debug}"
optimize="${javac.optimize}"
target="${javac.target}"
source="${javac.source}"
nowarn="on">
- <classpath>
- <path refid="path.lib" />
- <pathelement path="${dir.out.classes}" />
- </classpath>
+ <classpath>
+ <path refid="path.lib" />
+ <pathelement path="${dir.out.classes}" />
+ </classpath>
<src path="${dir.test}" />
<patternset refid="ps.instrument.domain" />
</javac>
+ </target>
+
+ <target name="instrument.cglib"
depends="instrument.prepare,compiletest" description="Performs cglib-based
instrumentation">
+ <taskdef name="instrument"
classname="org.hibernate.tool.instrument.cglib.InstrumentTask">
+ <classpath path="${dir.out.classes}"/>
+ <classpath refid="path.lib"/>
+ </taskdef>
<instrument verbose="true">
<fileset dir="${dir.out.test-classes}">
<patternset refid="ps.instrument.domain" />
@@ -553,27 +568,10 @@
</target>
<target name="instrument.javassist"
depends="instrument.prepare,compiletest" description="Performs
javassist-based instrumentation">
- <taskdef name="instrument"
classname="org.hibernate.tool.instrument.javassist.InstrumentTask">
- <classpath path="${dir.out.classes}"/>
- <classpath refid="path.lib"/>
- </taskdef>
-
- <available classname="org.eclipse.core.launcher.Main"
property="build.compiler"
- value="org.eclipse.jdt.core.JDTCompilerAdapter"
classpath="${java.class.path}"/>
- <javac destdir="${dir.out.test-classes}"
- debug="${javac.debug}"
- optimize="${javac.optimize}"
- target="${javac.target}"
- source="${javac.source}"
- nowarn="on">
- <classpath>
- <path refid="path.lib" />
- <pathelement path="${dir.out.classes}" />
- </classpath>
- <src path="${dir.test}" />
- <patternset refid="ps.instrument.domain" />
- </javac>
-
+ <taskdef name="instrument"
classname="org.hibernate.tool.instrument.javassist.InstrumentTask">
+ <classpath path="${dir.out.classes}"/>
+ <classpath refid="path.lib"/>
+ </taskdef>
<instrument verbose="true">
<fileset dir="${dir.out.test-classes}">
<patternset refid="ps.instrument.domain" />
@@ -581,7 +579,6 @@
</instrument>
</target>
-
<!-- Distribution related targets -->
<target name="versioncheck" description="Check version.properties up
against lib directory">
@@ -672,11 +669,11 @@
</jar>
</target>
- <target name="dist"
depends="init,versioncheck,jar,testjar,javadoc,refdoc,antlr.bnf"
- description="Build everything and package">
- <mkdir dir="${dir.dist}" />
+ <target name="dist" depends="init,versioncheck,jar,testjar"
+ description="Build everything and package">
+ <mkdir dir="${dir.dist}" />
- <!-- prepare build.xml -->
+ <!-- prepare build.xml -->
<copy file="${basedir}/build.xml" todir="${dir.dist}"/>
<replace file="${dir.dist}/build.xml">
<replacetoken><![CDATA[../${name}-${version}]]></replacetoken>
@@ -687,70 +684,45 @@
<replacevalue><![CDATA[name="dir.jdbc"
value="lib"]]></replacevalue>
</replace>
- <zip zipfile="${dir.dist}/${fullname}.zip">
- <zipfileset
prefix="${name}-${version.major_minor}/doc/reference"
dir="${dir.doc.ref}/build" />
- <zipfileset prefix="${name}-${version.major_minor}/doc/tutorial"
dir="${dir.doc.ref}/tutorial" >
- <include name="src/**" />
- <include name="lib/**" />
- <include name="build.xml" />
- <include name="runCleanDatabase.sh" />
- <include name="web.xml" />
- </zipfileset>
- <zipfileset prefix="${name}-${version.major_minor}/doc/other"
dir="${dir.doc}/other" />
- <zipfileset prefix="${name}-${version.major_minor}/doc"
dir="${dir.out.doc}" />
- <zipfileset prefix="${name}-${version.major_minor}/eg"
dir="${dir.eg}"/>
- <zipfileset prefix="${name}-${version.major_minor}/etc"
dir="${dir.etc}"/>
- <zipfileset prefix="${name}-${version.major_minor}/grammar"
dir="${dir.grammar}"/>
+ <zip zipfile="${dir.dist}/${fullname}.zip">
+ <zipfileset prefix="${name}-${version.major_minor}"
file="${dir.build}/${jar.name}.jar" />
<zipfileset prefix="${name}-${version.major_minor}/lib"
dir="${dir.build}/versioncheck-dist"/>
- <zipfileset prefix="${name}-${version.major_minor}/src"
dir="${dir.src}"/>
- <zipfileset prefix="${name}-${version.major_minor}/test"
dir="${dir.test}"/>
- <zipfileset prefix="${name}-${version.major_minor}"
file="${basedir}/readme.txt" />
- <zipfileset prefix="${name}-${version.major_minor}"
file="${basedir}/lgpl.txt" />
- <zipfileset prefix="${name}-${version.major_minor}"
file="${basedir}/JBossORG-EULA.txt" />
- <zipfileset prefix="${name}-${version.major_minor}"
file="${basedir}/changelog.txt" />
- <zipfileset prefix="${name}-${version.major_minor}"
file="${basedir}/build.bat" />
- <zipfileset prefix="${name}-${version.major_minor}"
file="${basedir}/build.sh" />
- <zipfileset prefix="${name}-${version.major_minor}"
file="${basedir}/hibernate_logo.gif" />
- <zipfileset prefix="${name}-${version.major_minor}"
file="${dir.dist}/build.xml" />
- <zipfileset prefix="${name}-${version.major_minor}"
file="${dir.build}/${jar.name}.jar" />
- <zipfileset prefix="${name}-${version.major_minor}"
file="${dir.build}/${testjar.name}.jar" />
- </zip>
- <checksum file="${dir.dist}/${fullname}.zip"
algorithm="MD5" fileext=".md5.txt"/>
+ <zipfileset prefix="${name}-${version.major_minor}/eg"
dir="${dir.eg}"/>
+ <zipfileset prefix="${name}-${version.major_minor}"
file="${basedir}/build.bat" />
+ <zipfileset prefix="${name}-${version.major_minor}"
file="${basedir}/build.sh" />
+ <zipfileset prefix="${name}-${version.major_minor}"
file="${dir.dist}/build.xml" />
+ <zipfileset prefix="${name}-${version.major_minor}/etc"
dir="${dir.etc}">
+ <exclude name="ehcache.xml" />
+ <exclude name="oscache.properties" />
+ </zipfileset>
+ <zipfileset prefix="${name}-${version.major_minor}"
file="${basedir}/lgpl.txt" />
+ <zipfileset prefix="${name}-${version.major_minor}"
file="${basedir}/JBossORG-EULA.txt" />
+ <zipfileset prefix="${name}-${version.major_minor}"
file="${basedir}/readme.txt" />
+ <zipfileset prefix="${name}-${version.major_minor}"
file="${dir.build}/${testjar.name}.jar" />
+ <zipfileset prefix="${name}-${version.major_minor}"
file="${basedir}/hibernate_logo.gif" />
+ </zip>
+ <checksum file="${dir.dist}/${fullname}.zip" algorithm="MD5"
fileext=".md5.txt"/>
- <tar tarfile="${dir.dist}/${fullname}.tar">
- <tarfileset
prefix="${name}-${version.major_minor}/doc/reference"
dir="${dir.doc.ref}/build" />
- <tarfileset prefix="${name}-${version.major_minor}/doc/tutorial"
dir="${dir.doc.ref}/tutorial" >
- <include name="src/**" />
- <include name="lib/**" />
- <include name="build.xml" />
- <include name="runCleanDatabase.sh" />
- <include name="web.xml" />
- </tarfileset>
- <tarfileset prefix="${name}-${version.major_minor}/doc/other"
dir="${dir.doc}/other" />
- <tarfileset prefix="${name}-${version.major_minor}/doc"
dir="${dir.out.doc}" />
- <tarfileset prefix="${name}-${version.major_minor}/eg"
dir="${dir.eg}"/>
- <tarfileset prefix="${name}-${version.major_minor}/etc"
dir="${dir.etc}"/>
- <tarfileset prefix="${name}-${version.major_minor}/grammar"
dir="${dir.grammar}"/>
- <tarfileset prefix="${name}-${version.major_minor}/lib"
dir="${dir.build}/versioncheck-dist"/>
- <tarfileset prefix="${name}-${version.major_minor}/src"
dir="${dir.src}"/>
- <tarfileset prefix="${name}-${version.major_minor}/test"
dir="${dir.test}"/>
- <tarfileset prefix="${name}-${version.major_minor}"
file="${basedir}/readme.txt" />
- <tarfileset prefix="${name}-${version.major_minor}"
file="${basedir}/lgpl.txt" />
- <tarfileset prefix="${name}-${version.major_minor}"
file="${basedir}/JBossORG-EULA.txt" />
- <tarfileset prefix="${name}-${version.major_minor}"
file="${basedir}/changelog.txt" />
- <tarfileset prefix="${name}-${version.major_minor}"
file="${basedir}/build.bat" />
- <tarfileset prefix="${name}-${version.major_minor}"
file="${basedir}/build.sh" />
- <tarfileset prefix="${name}-${version.major_minor}"
file="${basedir}/hibernate_logo.gif" />
- <tarfileset prefix="${name}-${version.major_minor}"
file="${dir.dist}/build.xml" />
- <tarfileset prefix="${name}-${version.major_minor}"
file="${dir.build}/${jar.name}.jar" />
- <tarfileset prefix="${name}-${version.major_minor}"
file="${dir.build}/${testjar.name}.jar" />
- </tar>
- <gzip src="${dir.dist}/${fullname}.tar"
zipfile="${dir.dist}/${fullname}.tar.gz"/>
- <checksum file="${dir.dist}/${fullname}.tar.gz"
algorithm="MD5" fileext=".md5.txt"/>
+ <zip zipfile="${dir.dist}/${fullname}-src.zip">
+ <zipfileset prefix="${name}-${version.major_minor}-src/src"
dir="${dir.src}"/>
+ <zipfileset prefix="${name}-${version.major_minor}-src/grammar"
dir="${dir.grammar}"/>
+ <zipfileset prefix="${name}-${version.major_minor}-src/grammar/gensrc"
dir="${dir.out.generated-source}"/>
+ <zipfileset prefix="${name}-${version.major_minor}-src/test"
dir="${dir.test}"/>
+ <zipfileset prefix="${name}-${version.major_minor}-src/lib"
dir="${dir.build}/versioncheck-dist"/>
+ <zipfileset prefix="${name}-${version.major_minor}-src/eg"
dir="${dir.eg}"/>
+ <zipfileset prefix="${name}-${version.major_minor}-src"
file="${basedir}/build.bat" />
+ <zipfileset prefix="${name}-${version.major_minor}-src"
file="${basedir}/build.sh" />
+ <zipfileset prefix="${name}-${version.major_minor}-src"
file="${dir.dist}/build.xml" />
+ <zipfileset prefix="${name}-${version.major_minor}-src/etc"
dir="${dir.etc}">
+ <exclude name="ehcache.xml" />
+ <exclude name="oscache.properties" />
+ </zipfileset>
+ <zipfileset prefix="${name}-${version.major_minor}-src"
file="${basedir}/hibernate_logo.gif" />
+ </zip>
+ <checksum file="${dir.dist}/${fullname}-src.zip"
algorithm="MD5" fileext=".md5.txt"/>
- <delete file="${dir.dist}/${fullname}.tar"/>
- <delete file="${dir.dist}/build.xml"/>
- </target>
+ <delete file="${dir.dist}/build.xml"/>
+ </target>
<target name="dist.complete"
depends="init,versioncheck,jar,javadoc,refdoc,antlr.bnf"
description="Build and package everything, and run test suite and eg
example">
Modified:
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/legacy/ConfigurationPerformanceTest.java
===================================================================
---
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/legacy/ConfigurationPerformanceTest.java 2008-05-15
18:10:32 UTC (rev 14664)
+++
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/test/legacy/ConfigurationPerformanceTest.java 2008-05-15
20:04:42 UTC (rev 14665)
@@ -83,7 +83,7 @@
public void testLoadingAndSerializationOfConfiguration() throws HibernateException,
FileNotFoundException, IOException, ClassNotFoundException {
- String prefix = "./test/org/hibernate/test/";
+ String prefix = "./build/testclasses/org/hibernate/test/";
try {
// first time
System.err.println("###FIRST SAVELOAD###");