Hibernate SVN: r12947 - in trunk/HibernateExt: annotations/ivy and 10 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2007-08-15 16:40:27 -0400 (Wed, 15 Aug 2007)
New Revision: 12947
Added:
trunk/HibernateExt/annotations/ivy.xml
trunk/HibernateExt/annotations/ivy/
trunk/HibernateExt/annotations/ivy/ivy-1.4.1.jar
trunk/HibernateExt/annotations/ivy/ivyconf.xml
trunk/HibernateExt/commons-annotations/ivy.xml
trunk/HibernateExt/commons-annotations/ivy/
trunk/HibernateExt/commons-annotations/ivy/ivy-1.4.1.jar
trunk/HibernateExt/commons-annotations/ivy/ivyconf.xml
trunk/HibernateExt/entitymanager/ivy.xml
trunk/HibernateExt/entitymanager/ivy/
trunk/HibernateExt/entitymanager/ivy/ivy-1.4.1.jar
trunk/HibernateExt/entitymanager/ivy/ivyconf.xml
trunk/HibernateExt/jpa-api/ivy.xml
trunk/HibernateExt/jpa-api/ivy/
trunk/HibernateExt/jpa-api/ivy/ivy-1.4.1.jar
trunk/HibernateExt/jpa-api/ivy/ivyconf.xml
trunk/HibernateExt/search/ivy.xml
trunk/HibernateExt/search/ivy/
trunk/HibernateExt/search/ivy/ivy-1.4.1.jar
trunk/HibernateExt/search/ivy/ivyconf.xml
trunk/HibernateExt/validator/ivy.xml
trunk/HibernateExt/validator/ivy/
trunk/HibernateExt/validator/ivy/ivy-1.4.1.jar
trunk/HibernateExt/validator/ivy/ivyconf.xml
Modified:
trunk/HibernateExt/annotations/build.xml
trunk/HibernateExt/commons-annotations/build.xml
trunk/HibernateExt/entitymanager/build.xml
trunk/HibernateExt/jpa-api/build.xml
trunk/HibernateExt/search/build.xml
trunk/HibernateExt/validator/build.xml
Log:
Migrate internal dependency management to ivy
Modified: trunk/HibernateExt/annotations/build.xml
===================================================================
--- trunk/HibernateExt/annotations/build.xml 2007-08-15 20:23:35 UTC (rev 12946)
+++ trunk/HibernateExt/annotations/build.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -6,9 +6,10 @@
-->
-<project name="Hibernate Annotations" default="dist" basedir=".">
+<project name="Hibernate Annotations" default="dist" basedir="."
+ xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
- <!-- Give user a chance to override without editing this file
+ <!-- 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"/>
@@ -24,19 +25,23 @@
<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="jpa-api.jar" value="${basedir}/../jpa-api/build/ejb3-persistence.jar"/>
<property name="commons-annotations.jar"
- value="${basedir}/../commons-annotations/target/hibernate-commons-annotations/hibernate-commons-annotations.jar"/>
+ value="${basedir}/../commons-annotations/target/hibernate-commons-annotations/hibernate-commons-annotations.jar"/ -->
+ <property name="ivy.dep.dir" value="${basedir}/build/lib" />
- <available property="jpa-present" file="${basedir}/../jpa-api" type="dir"/>
+ <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>
+ <!-- pathelement location="${jpa-api.jar}"/>
+ <pathelement location="${commons-annotations.jar}"/ -->
+ <fileset dir="${ivy.dep.dir}/core">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
<path id="junit.moduleclasspath">
<pathelement location="${src.dir}"/>
@@ -46,16 +51,34 @@
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
+ <fileset dir="${ivy.dep.dir}/test">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <!-- 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"/>
- <target name="init">
+ <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"/>
+ <tstamp>
+ <format property="now" pattern="yyyyMMddhhmmss"/>
+ </tstamp>
+ <!-- available file="${jpa-api.jar}" type="file" property="jpa-api.jar.available"/>
+ <available file="${commons-annotations.jar}" type="file" property="commons-annotations.jar.available"/ -->
<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" />
</target>
- <target name="get.jpa-api" depends="init" unless="jpa-api.jar.available">
+ <!-- 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>
@@ -63,11 +86,17 @@
<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 -->
- <target name="compile" depends="init,get.jpa-api,get.commons-annotations"
+ <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>
+
+ <target name="compile" depends="init,get.deps.core"
description="Compile the Java source code">
- <available
+
+ <available
classname="org.eclipse.core.launcher.Main"
property="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"
@@ -91,8 +120,13 @@
</copy>
</target>
- <target name="compiletest" depends="compile" description="Compile the tests">
- <available
+ <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"
@@ -180,7 +214,14 @@
<attribute name="Specification-Vendor" value="jcp.org"/>
</manifest>
<antcall target="common-build.jar"/>
- </target>
+ <ivy:resolve conf="core"/>
+ <ivy:publish artifactspattern="${dist.dir}/[artifact].[ext]"
+ resolver="local"
+ pubrevision="latest"
+ pubdate="${now}"
+ status="integration"
+ />
+ </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>
@@ -197,7 +238,7 @@
</target>
<!-- Some of this can probably be moved to common-build... -->
- <target name="dist" depends="jar,javadoc,jpa-javadoc,copysource,copytest,copylib,extras"
+ <target name="dist" depends="get.deps.core,get.deps.test,jar,javadoc,jpa-javadoc,copysource,copytest,copylib,extras"
description="Build everything">
<ant inheritall="false" dir="${basedir}/doc/reference"/>
@@ -215,10 +256,18 @@
<!-- copy dependencies -->
<copy todir="${dist.lib.dir}" failonerror="false">
- <fileset file="${jpa-api.jar}"/>
- <fileset file="${commons-annotations.jar}"/>
+ <!-- fileset file="${jpa-api.jar}"/>
+ <fileset file="${commons-annotations.jar}"/ -->
+ <fileset dir="${ivy.dep.dir}/core">
+ <include name="*.jar"/>
+ </fileset>
</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 file="${basedir}/build.properties.dist" tofile="${dist.dir}/build.properties" failonerror="false">
</copy>
Added: trunk/HibernateExt/annotations/ivy/ivy-1.4.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/HibernateExt/annotations/ivy/ivy-1.4.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/HibernateExt/annotations/ivy/ivyconf.xml
===================================================================
--- trunk/HibernateExt/annotations/ivy/ivyconf.xml (rev 0)
+++ trunk/HibernateExt/annotations/ivy/ivyconf.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -0,0 +1,27 @@
+<ivyconf>
+ <conf defaultResolver="jboss-rep"/>
+ <resolvers>
+ <chain name="jboss-rep">
+ <url name="jboss-rep-regular">
+ <artifact pattern="http://repository.jboss.org/[module]/[revision]/lib/[artifact].[ext]"/>
+ </url>
+ </chain>
+ <chain name="rep-hibernate" returnFirst="true" latest="latest-revision">
+ <filesystem name="local">
+ <ivy pattern="../[module]/target/[revision]/ivy.xml"/>
+ <artifact pattern="../[module]/target/[revision]/[artifact].[ext]"/>
+ </filesystem>
+ <url name="jboss-rep-hibernate">
+ <ivy pattern="http://repository.jboss.org/hibernate-[module]/[revision]/ivy.xml"/>
+ <artifact pattern="http://repository.jboss.org/hibernate-[module]/[revision]/lib/[artifact]...."/>
+ </url>
+ <url name="jboss-rep-regular-with-ivy">
+ <ivy pattern="http://repository.jboss.org/[module]/[revision]/ivy.xml"/>
+ <artifact pattern="http://repository.jboss.org/[module]/[revision]/lib/[artifact].[ext]"/>
+ </url>
+ </chain>
+ </resolvers>
+ <modules>
+ <module organisation="org.hibernate" name="*" resolver="rep-hibernate"/>
+ </modules>
+</ivyconf>
Added: trunk/HibernateExt/annotations/ivy.xml
===================================================================
--- trunk/HibernateExt/annotations/ivy.xml (rev 0)
+++ trunk/HibernateExt/annotations/ivy.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -0,0 +1,18 @@
+<?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="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="jpa-api" rev="1.0.0.GA" conf="core->default"/>
+ <dependency name="commons-annotations" rev="latest.integration" conf="core->core"/>
+ </dependencies>
+</ivy-module>
\ No newline at end of file
Modified: trunk/HibernateExt/commons-annotations/build.xml
===================================================================
--- trunk/HibernateExt/commons-annotations/build.xml 2007-08-15 20:23:35 UTC (rev 12946)
+++ trunk/HibernateExt/commons-annotations/build.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -1,4 +1,5 @@
-<project name="Hibernate Commons Annotations" default="dist" basedir=".">
+<project name="Hibernate Commons Annotations" default="dist" basedir="."
+ xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it) -->
@@ -15,9 +16,10 @@
<property name="javac.target" value="1.5"/>
<property name="common.dir" value="${basedir}/../common"/>
<property name="hibernate-core.jar.available" value="true"/>
- <property name="jpa-api.jar" value="${basedir}/../jpa-api/build/ejb3-persistence.jar"/>
+ <!-- property name="jpa-api.jar" value="${basedir}/../jpa-api/build/ejb3-persistence.jar"/ -->
+ <property name="ivy.dep.dir" value="${basedir}/build/lib" />
- <import file="${common.dir}/common-build.xml"/>
+ <import file="${common.dir}/common-build.xml"/>
<path id="lib.class.path">
<fileset dir="${hibernate-core.lib.dir}">
@@ -27,20 +29,35 @@
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
- <path refid="lib.moduleclass.path"/>
+ <fileset dir="${ivy.dep.dir}/core">
+ <include name="*.jar"/>
+ </fileset>
+ <path refid="lib.moduleclass.path"/>
<pathelement path="${clover.jar}"/>
</path>
<path id="junit.moduleclasspath">
<pathelement location="${src.dir}"/>
<pathelement location="${test.dir}"/>
- <pathelement location="${jpa-api.jar}"/>
- <fileset dir="${hibernate-core.lib.dir}">
+ <!-- pathelement location="${jpa-api.jar}"/ -->
+ <fileset dir="${ivy.dep.dir}/test">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${hibernate-core.lib.dir}">
<include name="junit*.jar"/>
</fileset>
</path>
- <!-- target name="report">
+ <!-- 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"/>
+
+ <!-- target name="report">
<mkdir dir="test_output"/>
<junitreport todir="test_output">
<fileset dir="test_output">
@@ -55,7 +72,10 @@
<tstamp>
<format property="subversion" pattern="yyyy-MM-dd hh:mm:ss"/>
</tstamp>
- <echo message="Build ${Name}-${version} (${subversion})"/>
+ <tstamp>
+ <format property="now" pattern="yyyyMMddhhmmss"/>
+ </tstamp>
+ <echo message="Build ${Name}-${version} (${subversion})"/>
<mkdir dir="${classes.dir}"/>
<mkdir dir="${testclasses.dir}"/>
<copy todir="${classes.dir}">
@@ -70,13 +90,29 @@
<include name="lgpl.txt"/>
</fileset>
</copy>
-
+ <mkdir dir="${ivy.dep.dir}/core"/>
+ <mkdir dir="${ivy.dep.dir}/test"/>
+ <ivy:configure file="${ivy.jar.dir}/ivyconf.xml" />
<!-- check for dependency artefacts -->
- <available file="${jpa-api.jar}" type="file" property="jpa-api.jar.available"/>
+ <!-- available file="${jpa-api.jar}" type="file" property="jpa-api.jar.available"/ -->
</target>
- <target name="compiletest" depends="get.jpa-api,compile" description="Compile the tests">
- <available
+ <target name="get.deps.core" depends="init" description="retrieve the core dependencies">
+ <ivy:resolve conf="core" />
+ <ivy:retrieve pattern="${ivy.dep.dir}/test/[artifact].[ext]" conf="core" />
+ </target>
+
+ <target name="compile" depends="get.deps.core">
+ <antcall target="common-build.compile"/>
+ </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"
@@ -93,10 +129,10 @@
</javac>
</target>
- <target name="get.jpa-api" depends="init" unless="jpa-api.jar.available">
+ <!-- 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 -->
<target name="jar" depends="compile" description="Build the distribution .jar file">
<mkdir dir="${classes.dir}/META-INF"/>
@@ -108,10 +144,18 @@
<attribute name="Implementation-URL" value="http://annotations.hibernate.org"/>
</manifest>
<antcall target="common-build.jar"/>
- </target>
+ <delete file="${dist.dir}/ivy.xml"/> <!-- delete last produced ivy file to be sure a new one will be generated -->
+ <ivy:resolve conf="core"/>
+ <ivy:publish artifactspattern="${dist.dir}/[artifact].[ext]"
+ resolver="local"
+ pubrevision="latest"
+ pubdate="${now}"
+ status="integration"
+ />
+ </target>
<!-- Some of this can probably be moved to common-build... -->
- <target name="dist" depends="jar,javadoc,copysource,copytest,copylib,extras" description="Build everything">
+ <target name="dist" depends="jar,get.deps.core,get.deps.test,javadoc,copysource,copytest,copylib,extras" description="Build everything">
<copy todir="${dist.dir}" failonerror="false">
<fileset dir="${common.dir}">
@@ -120,7 +164,23 @@
</copy>
<copy file="${basedir}/build.properties.dist" tofile="${dist.dir}/build.properties" failonerror="false">
</copy>
- <antcall target="common-build.dist"/>
+
+ <!-- copy dependencies -->
+ <copy todir="${dist.lib.dir}" failonerror="false">
+ <!-- fileset file="${jpa-api.jar}"/>
+ <fileset file="${commons-annotations.jar}"/ -->
+ <fileset dir="${ivy.dep.dir}/core">
+ <include name="*.jar"/>
+ </fileset>
+ </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>
+
+ <antcall target="common-build.dist"/>
</target>
<target name="zip-dist" description="zip the dist">
Added: trunk/HibernateExt/commons-annotations/ivy/ivy-1.4.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/HibernateExt/commons-annotations/ivy/ivy-1.4.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/HibernateExt/commons-annotations/ivy/ivyconf.xml
===================================================================
--- trunk/HibernateExt/commons-annotations/ivy/ivyconf.xml (rev 0)
+++ trunk/HibernateExt/commons-annotations/ivy/ivyconf.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -0,0 +1,27 @@
+<ivyconf>
+ <conf defaultResolver="jboss-rep"/>
+ <resolvers>
+ <chain name="jboss-rep">
+ <url name="jboss-rep-regular">
+ <artifact pattern="http://repository.jboss.org/[module]/[revision]/lib/[artifact].[ext]"/>
+ </url>
+ </chain>
+ <chain name="rep-hibernate" returnFirst="true" latest="latest-revision">
+ <filesystem name="local">
+ <ivy pattern="../[module]/target/[revision]/ivy.xml"/>
+ <artifact pattern="../[module]/target/[revision]/[artifact].[ext]"/>
+ </filesystem>
+ <url name="jboss-rep-hibernate">
+ <ivy pattern="http://repository.jboss.org/hibernate-[module]/[revision]/ivy.xml"/>
+ <artifact pattern="http://repository.jboss.org/hibernate-[module]/[revision]/lib/[artifact]...."/>
+ </url>
+ <url name="jboss-rep-regular-with-ivy">
+ <ivy pattern="http://repository.jboss.org/[module]/[revision]/ivy.xml"/>
+ <artifact pattern="http://repository.jboss.org/[module]/[revision]/lib/[artifact].[ext]"/>
+ </url>
+ </chain>
+ </resolvers>
+ <modules>
+ <module organisation="org.hibernate" name="*" resolver="rep-hibernate"/>
+ </modules>
+</ivyconf>
Added: trunk/HibernateExt/commons-annotations/ivy.xml
===================================================================
--- trunk/HibernateExt/commons-annotations/ivy.xml (rev 0)
+++ trunk/HibernateExt/commons-annotations/ivy.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -0,0 +1,17 @@
+<?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="commons-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-commons-annotations" conf="core"/>
+ </publications>
+ <dependencies>
+ <dependency name="jpa-api" force="true" rev="1.0.0.GA" conf="test->default"/>
+ </dependencies>
+</ivy-module>
\ No newline at end of file
Modified: trunk/HibernateExt/entitymanager/build.xml
===================================================================
--- trunk/HibernateExt/entitymanager/build.xml 2007-08-15 20:23:35 UTC (rev 12946)
+++ trunk/HibernateExt/entitymanager/build.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -6,7 +6,8 @@
-->
-<project name="HibernateEntityManager" default="dist" basedir=".">
+<project name="HibernateEntityManager" default="dist" basedir="."
+ xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it) -->
@@ -25,11 +26,12 @@
<property name="common.dir" value="../common"/>
<available property="jpa-present" file="${basedir}/../jpa-api" type="dir"/>
- <property name="jpa-api.jar" value="${basedir}/../jpa-api/build/ejb3-persistence.jar"/>
+ <!-- property name="jpa-api.jar" value="${basedir}/../jpa-api/build/ejb3-persistence.jar"/>
<property name="annotations.jar"
value="${basedir}/../annotations/target/hibernate-annotations/hibernate-annotations.jar"/>
<property name="commons-annotations.jar"
- value="${basedir}/../commons-annotations/target/hibernate-commons-annotations/hibernate-commons-annotations.jar"/>
+ value="${basedir}/../commons-annotations/target/hibernate-commons-annotations/hibernate-commons-annotations.jar"/ -->
+ <property name="ivy.dep.dir" value="${basedir}/build/lib" />
<import file="${common.dir}/common-build.xml"/>
<property name="jpa-javadoc.dir" value="${dist.doc.dir}/jpa-api"/>
@@ -41,9 +43,12 @@
<property name="build.temp.dir" value="${build.dir}/temp"/>
<path id="lib.moduleclass.path">
- <pathelement location="${jpa-api.jar}"/>
+ <!-- pathelement location="${jpa-api.jar}"/>
<pathelement location="${commons-annotations.jar}"/>
- <pathelement location="${annotations.jar}"/>
+ <pathelement location="${annotations.jar}"/ -->
+ <fileset dir="${ivy.dep.dir}/core">
+ <include name="*.jar"/>
+ </fileset>
</path>
<path id="junit.moduleclasspath">
<pathelement location="${src.dir}"/>
@@ -56,18 +61,36 @@
<include name="*.jar"/>
<include name="*.zip"/>
</fileset>
+ <fileset dir="${ivy.dep.dir}/test">
+ <include name="*.jar"/>
+ </fileset>
</path>
+ <!-- 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"/>
+
<target name="init">
<antcall target="common-build.init"/>
- <!-- check for dependency artefacts -->
- <available file="${jpa-api.jar}" type="file" property="jpa-api.jar.available"/>
+ <tstamp>
+ <format property="now" pattern="yyyyMMddhhmmss"/>
+ </tstamp>
+ <!-- check for dependency artefacts -->
+ <!-- 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="${annotations.jar}" type="file" property="annotations.jar.available"/>
+ <available file="${annotations.jar}" type="file" property="annotations.jar.available"/ -->
<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" />
</target>
- <target name="get.jpa-api" depends="init" unless="jpa-api.jar.available">
+ <!-- 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>
@@ -80,9 +103,15 @@
<target name="get.annotations" depends="init" unless="annotations.jar.available">
<ant inheritall="false" dir="${basedir}/../annotations" target="clean"/>
<ant inheritall="false" dir="${basedir}/../annotations" target="jar"/>
- </target>
+ </target -->
- <target name="compile" depends="init,get.jpa-api,get.commons-annotations,get.annotations" description="Compile the Java source code">
+ <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>
+
+
+ <target name="compile" depends="init,get.deps.core" description="Compile the Java source code">
<available
classname="org.eclipse.core.launcher.Main"
property="build.compiler"
@@ -171,7 +200,12 @@
</antcall>
</target>
- <target name="compiletest" depends="compile" description="Compile the tests">
+ <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"
@@ -278,6 +312,13 @@
<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="latest"
+ pubdate="${now}"
+ status="integration"
+ />
</target>
<!-- target name="javadoc" description="Compile the Javadoc API documentation to dist dir">
@@ -295,7 +336,7 @@
</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">
+ <target name="dist" depends="get.deps.core,get.deps.test,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">
@@ -322,11 +363,18 @@
<!-- copy dependencies -->
<copy todir="${dist.lib.dir}" failonerror="false">
- <fileset file="${jpa-api.jar}"/>
- <fileset file="${commons-annotations.jar}"/>
- <fileset file="${annotations.jar}"/>
+ <!-- fileset file="${jpa-api.jar}"/>
+ <fileset file="${commons-annotations.jar}"/ -->
+ <fileset dir="${ivy.dep.dir}/core">
+ <include name="*.jar"/>
+ </fileset>
</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 file="${basedir}/build.properties.dist" tofile="${dist.dir}/build.properties" failonerror="false">
</copy>
Added: trunk/HibernateExt/entitymanager/ivy/ivy-1.4.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/HibernateExt/entitymanager/ivy/ivy-1.4.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/HibernateExt/entitymanager/ivy/ivyconf.xml
===================================================================
--- trunk/HibernateExt/entitymanager/ivy/ivyconf.xml (rev 0)
+++ trunk/HibernateExt/entitymanager/ivy/ivyconf.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -0,0 +1,27 @@
+<ivyconf>
+ <conf defaultResolver="jboss-rep"/>
+ <resolvers>
+ <chain name="jboss-rep">
+ <url name="jboss-rep-regular">
+ <artifact pattern="http://repository.jboss.org/[module]/[revision]/lib/[artifact].[ext]"/>
+ </url>
+ </chain>
+ <chain name="rep-hibernate" returnFirst="true" latest="latest-revision">
+ <filesystem name="local">
+ <ivy pattern="../[module]/target/[revision]/ivy.xml"/>
+ <artifact pattern="../[module]/target/[revision]/[artifact].[ext]"/>
+ </filesystem>
+ <url name="jboss-rep-hibernate">
+ <ivy pattern="http://repository.jboss.org/hibernate-[module]/[revision]/ivy.xml"/>
+ <artifact pattern="http://repository.jboss.org/hibernate-[module]/[revision]/lib/[artifact]...."/>
+ </url>
+ <url name="jboss-rep-regular-with-ivy">
+ <ivy pattern="http://repository.jboss.org/[module]/[revision]/ivy.xml"/>
+ <artifact pattern="http://repository.jboss.org/[module]/[revision]/lib/[artifact].[ext]"/>
+ </url>
+ </chain>
+ </resolvers>
+ <modules>
+ <module organisation="org.hibernate" name="*" resolver="rep-hibernate"/>
+ </modules>
+</ivyconf>
Added: trunk/HibernateExt/entitymanager/ivy.xml
===================================================================
--- trunk/HibernateExt/entitymanager/ivy.xml (rev 0)
+++ trunk/HibernateExt/entitymanager/ivy.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -0,0 +1,19 @@
+<?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="entitymanager"/>
+ <configurations>
+ <conf name="core" description="Core module dependencies"/>
+ <conf name="test" visibility="private" description="Dependencies needed for testing purposes"/>
+ </configurations>
+ <publications>
+ <artifact name="hibernate-entitymanager" conf="core"/>
+ </publications>
+ <dependencies>
+ <dependency name="jpa-api" rev="latest.integration" conf="core->default"/>
+ <dependency name="commons-annotations" rev="latest.integration" conf="core->core"/>
+ <dependency name="annotations" rev="latest.integration" conf="core->core"/>
+ </dependencies>
+</ivy-module>
\ No newline at end of file
Modified: trunk/HibernateExt/jpa-api/build.xml
===================================================================
--- trunk/HibernateExt/jpa-api/build.xml 2007-08-15 20:23:35 UTC (rev 12946)
+++ trunk/HibernateExt/jpa-api/build.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -6,7 +6,8 @@
-->
-<project name="EJB-API" default="jar" basedir=".">
+<project name="EJB-API" default="jar" basedir="."
+ xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
<!-- Give user a chance to override without editing this file or typing -D -->
<property file="build.properties"/>
@@ -33,9 +34,18 @@
<include name="META-INF/ra.xml"/>
</patternset>
+ <!-- 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"/>
- <!-- ############################ Targets #############################-->
+ <!-- ############################ Targets #############################-->
+
<target name="clean" description="Cleans up build and dist directories">
<delete dir="${build.dir}"/>
</target>
@@ -44,11 +54,15 @@
<tstamp>
<format property="subversion" pattern="yyyy-MM-dd hh:mm:ss"/>
</tstamp>
- <echo message="Build ${name}-${version} (${subversion})"/>
+ <tstamp>
+ <format property="now" pattern="yyyyMMddhhmmss"/>
+ </tstamp>
+ <echo message="Build ${name}-${version} (${subversion})"/>
<mkdir dir="${classes.dir}"/>
+ <ivy:configure file="${ivy.jar.dir}/ivyconf.xml" />
- </target>
+ </target>
<target name="compile" depends="init" description="Compile the Java source code">
<available
@@ -66,8 +80,7 @@
</javac>
</target>
-
- <target name="jar" depends="compile" description="Build the distribution .jar file">
+ <target name="jar" depends="compile" description="Build the distribution .jar file">
<jar jarfile="${build.dir}/${jar.name}.jar" basedir="${classes.dir}">
<include name="javax/**/*.class"/>
<manifest>
@@ -83,7 +96,15 @@
<include name="**/license.txt"/>
</metainf>
</jar>
- </target>
+ <delete file="${build.dir}/ivy.xml"/> <!-- delete last produced ivy file to be sure a new one will be generated -->
+ <ivy:resolve/>
+ <ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"
+ resolver="local"
+ pubrevision="latest"
+ pubdate="${now}"
+ status="integration"
+ />
+ </target>
<target name="javadoc" description="Compile the Javadoc API documentation">
<mkdir dir="${build.dir}/api"/>
Added: trunk/HibernateExt/jpa-api/ivy/ivy-1.4.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/HibernateExt/jpa-api/ivy/ivy-1.4.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/HibernateExt/jpa-api/ivy/ivyconf.xml
===================================================================
--- trunk/HibernateExt/jpa-api/ivy/ivyconf.xml (rev 0)
+++ trunk/HibernateExt/jpa-api/ivy/ivyconf.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -0,0 +1,27 @@
+<ivyconf>
+ <conf defaultResolver="jboss-rep"/>
+ <resolvers>
+ <chain name="jboss-rep">
+ <url name="jboss-rep-regular">
+ <artifact pattern="http://repository.jboss.org/[module]/[revision]/lib/[artifact].[ext]"/>
+ </url>
+ </chain>
+ <chain name="rep-hibernate" returnFirst="true" latest="latest-revision">
+ <filesystem name="local">
+ <ivy pattern="../[module]/target/[revision]/ivy.xml"/>
+ <artifact pattern="../[module]/target/[revision]/[artifact].[ext]"/>
+ </filesystem>
+ <url name="jboss-rep-hibernate">
+ <ivy pattern="http://repository.jboss.org/hibernate-[module]/[revision]/ivy.xml"/>
+ <artifact pattern="http://repository.jboss.org/hibernate-[module]/[revision]/lib/[artifact]...."/>
+ </url>
+ <url name="jboss-rep-regular-with-ivy">
+ <ivy pattern="http://repository.jboss.org/[module]/[revision]/ivy.xml"/>
+ <artifact pattern="http://repository.jboss.org/[module]/[revision]/lib/[artifact].[ext]"/>
+ </url>
+ </chain>
+ </resolvers>
+ <modules>
+ <module organisation="org.hibernate" name="*" resolver="rep-hibernate"/>
+ </modules>
+</ivyconf>
Added: trunk/HibernateExt/jpa-api/ivy.xml
===================================================================
--- trunk/HibernateExt/jpa-api/ivy.xml (rev 0)
+++ trunk/HibernateExt/jpa-api/ivy.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -0,0 +1,10 @@
+<?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="jpa-api" revision="1.0.0.GA" status="release"/>
+ <publications>
+ <artifact name="ejb3-persistence" type="jar" />
+ </publications>
+</ivy-module>
\ No newline at end of file
Modified: trunk/HibernateExt/search/build.xml
===================================================================
--- trunk/HibernateExt/search/build.xml 2007-08-15 20:23:35 UTC (rev 12946)
+++ trunk/HibernateExt/search/build.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -6,9 +6,10 @@
-->
-<project name="Hibernate Search" default="dist" basedir=".">
+<project name="Hibernate Search" default="dist" basedir="."
+ xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
- <!-- Give user a chance to override without editing this file
+ <!-- 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"/>
@@ -24,14 +25,24 @@
<property name="jdbc.dir" value="jdbc"/>
<property name="common.dir" value="${basedir}/../common"/>
- <property name="jpa-api.jar" value="${basedir}/../jpa-api/build/ejb3-persistence.jar"/>
+ <!-- property name="jpa-api.jar" value="${basedir}/../jpa-api/build/ejb3-persistence.jar"/>
<property name="annotations.jar"
value="${basedir}/../annotations/target/hibernate-annotations/hibernate-annotations.jar"/>
<property name="commons-annotations.jar"
value="${basedir}/../commons-annotations/target/hibernate-commons-annotations/hibernate-commons-annotations.jar"/>
<property name="entitymanager.jar"
- value="${basedir}/../entitymanager/target/hibernate-entitymanager/hibernate-entitymanager.jar"/>
+ value="${basedir}/../entitymanager/target/hibernate-entitymanager/hibernate-entitymanager.jar"/ -->
+ <property name="ivy.dep.dir" value="${basedir}/build/lib" />
+ <!-- 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"/>
+
<import file="${common.dir}/common-build.xml"/>
@@ -66,9 +77,12 @@
<path id="lib.moduleclass.path">
- <pathelement location="${jpa-api.jar}"/>
- <pathelement location="${commons-annotations.jar}"/>
- </path>
+ <!-- pathelement location="${jpa-api.jar}"/>
+ <pathelement location="${commons-annotations.jar}"/ -->
+ <fileset dir="${ivy.dep.dir}/core">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
<path id="junit.moduleclasspath">
<!-- order matters for JBoss XB proper bootstrap -->
<fileset dir="${lib.dir}/test">
@@ -77,8 +91,11 @@
</fileset>
<pathelement location="${src.dir}"/>
<pathelement location="${test.dir}"/>
- <pathelement location="${annotations.jar}"/>
- <pathelement location="${entitymanager.jar}"/>
+ <!-- pathelement location="${annotations.jar}"/>
+ <pathelement location="${entitymanager.jar}"/ -->
+ <fileset dir="${ivy.dep.dir}/test">
+ <include name="*.jar"/>
+ </fileset>
<fileset dir="${jdbc.dir}">
<include name="*.jar"/>
<include name="*.zip"/>
@@ -87,16 +104,23 @@
<target name="init">
<antcall target="common-build.init"/>
- <!-- check for dependency artefacts -->
- <available file="${jpa-api.jar}" type="file" property="jpa-api.jar.available"/>
+ <tstamp>
+ <format property="now" pattern="yyyyMMddhhmmss"/>
+ </tstamp>
+ <!-- check for dependency artefacts -->
+
+ <!-- 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="${annotations.jar}" type="file" property="annotations.jar.available"/>
- <available file="${entitymanager.jar}" type="file" property="entitymanager.jar.available"/>
+ <available file="${entitymanager.jar}" type="file" property="entitymanager.jar.available"/ -->
+ <mkdir dir="${ivy.dep.dir}/core"/>
+ <mkdir dir="${ivy.dep.dir}/test"/>
+ <ivy:configure file="${ivy.jar.dir}/ivyconf.xml" />
<mkdir dir="${lib.dir}/test"/>
<mkdir dir="${build.testresources.dir}"/>
</target>
- <target name="get.jpa-api" depends="init" unless="jpa-api.jar.available">
+ <!-- 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>
@@ -114,10 +138,15 @@
<target name="get.entitymanager" depends="init" unless="entitymanager.jar.available">
<ant inheritall="false" dir="${basedir}/../entitymanager" target="clean"/>
<ant inheritall="false" dir="${basedir}/../entitymanager" target="jar"/>
- </target>
+ </target -->
- <target name="compile" depends="init,get.commons-annotations" description="Compile the Java source code">
- <available
+ <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>
+
+ <target name="compile" depends="init,get.deps.core" description="Compile the Java source code">
+ <available
classname="org.eclipse.core.launcher.Main"
property="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"
@@ -141,8 +170,13 @@
</copy>
</target>
- <target name="compiletest" depends="init,get.jpa-api,get.annotations,get.entitymanager,compile" description="Compile the tests">
- <available
+ <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="init,get.deps.test,compile" description="Compile the tests">
+ <available
classname="org.eclipse.core.launcher.Main"
property="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"
@@ -257,7 +291,14 @@
<attribute name="Implementation-URL" value="http://search.hibernate.org"/>
</manifest>
<antcall target="common-build.jar"/>
- </target>
+ <ivy:resolve conf="core"/>
+ <ivy:publish artifactspattern="${dist.dir}/[artifact].[ext]"
+ resolver="local"
+ pubrevision="latest"
+ pubdate="${now}"
+ status="integration"
+ />
+ </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>
@@ -265,7 +306,7 @@
<!-- Some of this can probably be moved to common-build... -->
- <target name="dist" depends="jar,javadoc,copysource,copytest,copylib,extras"
+ <target name="dist" depends="get.deps.core,get.deps.test,jar,jar,javadoc,copysource,copytest,copylib,extras"
description="Build everything">
<ant inheritall="false" dir="${basedir}/doc/reference"/>
@@ -289,13 +330,17 @@
<!-- copy dependencies -->
<copy todir="${dist.lib.dir}" failonerror="false">
- <fileset file="${jpa-api.jar}"/>
- <fileset file="${commons-annotations.jar}"/>
+ <!-- fileset file="${jpa-api.jar}"/>
+ <fileset file="${commons-annotations.jar}"/ -->
+ <fileset dir="${ivy.dep.dir}/core">
+ <include name="*.jar"/>
+ </fileset>
</copy>
<mkdir dir="${dist.lib.dir}/test"/>
<copy todir="${dist.lib.dir}/test" failonerror="false">
- <fileset file="${annotations.jar}"/>
- <fileset file="${entitymanager.jar}"/>
+ <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"/>
Added: trunk/HibernateExt/search/ivy/ivy-1.4.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/HibernateExt/search/ivy/ivy-1.4.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/HibernateExt/search/ivy/ivyconf.xml
===================================================================
--- trunk/HibernateExt/search/ivy/ivyconf.xml (rev 0)
+++ trunk/HibernateExt/search/ivy/ivyconf.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -0,0 +1,27 @@
+<ivyconf>
+ <conf defaultResolver="jboss-rep"/>
+ <resolvers>
+ <chain name="jboss-rep">
+ <url name="jboss-rep-regular">
+ <artifact pattern="http://repository.jboss.org/[module]/[revision]/lib/[artifact].[ext]"/>
+ </url>
+ </chain>
+ <chain name="rep-hibernate" returnFirst="true" latest="latest-revision">
+ <filesystem name="local">
+ <ivy pattern="../[module]/target/[revision]/ivy.xml"/>
+ <artifact pattern="../[module]/target/[revision]/[artifact].[ext]"/>
+ </filesystem>
+ <url name="jboss-rep-hibernate">
+ <ivy pattern="http://repository.jboss.org/hibernate-[module]/[revision]/ivy.xml"/>
+ <artifact pattern="http://repository.jboss.org/hibernate-[module]/[revision]/lib/[artifact]...."/>
+ </url>
+ <url name="jboss-rep-regular-with-ivy">
+ <ivy pattern="http://repository.jboss.org/[module]/[revision]/ivy.xml"/>
+ <artifact pattern="http://repository.jboss.org/[module]/[revision]/lib/[artifact].[ext]"/>
+ </url>
+ </chain>
+ </resolvers>
+ <modules>
+ <module organisation="org.hibernate" name="*" resolver="rep-hibernate"/>
+ </modules>
+</ivyconf>
Added: trunk/HibernateExt/search/ivy.xml
===================================================================
--- trunk/HibernateExt/search/ivy.xml (rev 0)
+++ trunk/HibernateExt/search/ivy.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -0,0 +1,19 @@
+<?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="search"/>
+ <configurations>
+ <conf name="core" description="Core module dependencies"/>
+ <conf name="test" visibility="private" description="Dependencies needed for testing purposes"/>
+ </configurations>
+ <publications>
+ <artifact name="hibernate-search" conf="core"/>
+ </publications>
+ <dependencies>
+ <dependency name="jpa-api" rev="1.0.0.GA" conf="core->default"/>
+ <dependency name="commons-annotations" rev="3.0.0.GA" conf="core->core"/>
+ <dependency name="entitymanager" rev="3.3.1.GA" conf="test->core"/>
+ </dependencies>
+</ivy-module>
\ No newline at end of file
Modified: trunk/HibernateExt/validator/build.xml
===================================================================
--- trunk/HibernateExt/validator/build.xml 2007-08-15 20:23:35 UTC (rev 12946)
+++ trunk/HibernateExt/validator/build.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -14,9 +14,10 @@
alter lib.moduleclass.path or junit.moduleclasspath accordingly
-->
-<project name="Hibernate Validator" default="dist" basedir=".">
+<project name="Hibernate Validator" default="dist" basedir="."
+ xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
- <!-- Give user a chance to override without editing this file
+ <!-- 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"/>
@@ -32,8 +33,10 @@
<property name="jdbc.dir" value="jdbc"/>
<property name="common.dir" value="${basedir}/../common"/>
+ <property name="ivy.dep.dir" value="${basedir}/build/lib" />
+
<!-- dependencies -->
- <property name="jpa-api.jar" value="${basedir}/../jpa-api/build/ejb3-persistence.jar"/>
+ <!-- property name="jpa-api.jar" value="${basedir}/../jpa-api/build/ejb3-persistence.jar"/>
<property name="annotations.jar"
value="${basedir}/../annotations/target/hibernate-annotations/hibernate-annotations.jar"/>
<property name="jpa.jar"
@@ -41,21 +44,27 @@
<property name="archive-browsing.jar"
value="${basedir}/../entitymanager/lib/jboss-archive-browsing.jar"/>
<property name="commons-annotations.jar"
- value="${basedir}/../commons-annotations/target/hibernate-commons-annotations/hibernate-commons-annotations.jar"/>
+ value="${basedir}/../commons-annotations/target/hibernate-commons-annotations/hibernate-commons-annotations.jar"/ -->
<import file="${common.dir}/common-build.xml"/>
<path id="lib.moduleclass.path">
- <pathelement location="${jpa-api.jar}"/>
- <pathelement location="${commons-annotations.jar}"/>
- </path>
+ <!-- pathelement location="${jpa-api.jar}"/>
+ <pathelement location="${commons-annotations.jar}"/ -->
+ <fileset dir="${ivy.dep.dir}/core">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
<path id="junit.moduleclasspath">
<pathelement location="${src.dir}"/>
<pathelement location="${test.dir}"/>
- <pathelement location="${annotations.jar}"/>
+ <!-- pathelement location="${annotations.jar}"/>
<pathelement location="${jpa.jar}"/>
- <pathelement location="${archive-browsing.jar}"/>
+ <pathelement location="${archive-browsing.jar}"/ -->
+ <fileset dir="${ivy.dep.dir}/test">
+ <include name="*.jar"/>
+ </fileset>
<fileset dir="${jdbc.dir}">
<include name="*.jar"/>
<include name="*.zip"/>
@@ -66,17 +75,32 @@
</fileset>
</path>
- <target name="init">
+ <!-- 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"/>
+
+ <target name="init">
<antcall target="common-build.init"/>
- <!-- check for dependency artefacts -->
- <available file="${jpa-api.jar}" type="file" property="jpa-api.jar.available"/>
+ <tstamp>
+ <format property="now" pattern="yyyyMMddhhmmss"/>
+ </tstamp>
+ <!-- check for dependency artefacts -->
+ <!-- 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="${annotations.jar}" type="file" property="annotations.jar.available"/>
- <available file="${jpa.jar}" type="file" property="jpa.jar.available"/>
+ <available file="${jpa.jar}" type="file" property="jpa.jar.available"/ -->
+ <mkdir dir="${ivy.dep.dir}/core"/>
+ <mkdir dir="${ivy.dep.dir}/test"/>
+ <ivy:configure file="${ivy.jar.dir}/ivyconf.xml" />
<mkdir dir="${lib.dir}/test"/>
</target>
- <target name="get.jpa-api" depends="init" unless="jpa-api.jar.available">
+ <!-- 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>
@@ -94,9 +118,14 @@
<target name="get.jpa" depends="init" unless="jpa.jar.available">
<ant inheritall="false" dir="${basedir}/../entitymanager" target="clean"/>
<ant inheritall="false" dir="${basedir}/../entitymanager" target="jar"/>
- </target>
+ </target -->
- <target name="compile" depends="init,get.jpa-api,get.commons-annotations" description="Compile the Java source code">
+ <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>
+
+ <target name="compile" depends="init,get.deps.core" description="Compile the Java source code">
<available
classname="org.eclipse.core.launcher.Main"
property="build.compiler"
@@ -121,7 +150,12 @@
</copy>
</target>
- <target name="compiletest" depends="init,get.annotations,get.jpa,compile" description="Compile the tests">
+ <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="init,get.deps.test,compile" description="Compile the tests">
<available
classname="org.eclipse.core.launcher.Main"
property="build.compiler"
@@ -207,10 +241,17 @@
<attribute name="Implementation-URL" value="http://validator.hibernate.org"/>
</manifest>
<antcall target="common-build.jar"/>
- </target>
+ <ivy:resolve conf="core"/>
+ <ivy:publish artifactspattern="${dist.dir}/[artifact].[ext]"
+ resolver="local"
+ pubrevision="latest"
+ pubdate="${now}"
+ status="integration"
+ />
+ </target>
<!-- Some of this can probably be moved to common-build... -->
- <target name="dist" depends="jar,javadoc,copysource,copytest,copylib,extras"
+ <target name="dist" depends="get.deps.core,get.deps.test,jar,javadoc,copysource,copytest,copylib,extras"
description="Build everything">
<ant inheritall="false" dir="${basedir}/doc/reference"/>
@@ -228,14 +269,17 @@
<!-- copy dependencies -->
<copy todir="${dist.lib.dir}" failonerror="false">
- <fileset file="${jpa-api.jar}"/>
- <fileset file="${commons-annotations.jar}"/>
+ <!-- fileset file="${jpa-api.jar}"/>
+ <fileset file="${commons-annotations.jar}"/ -->
+ <fileset dir="${ivy.dep.dir}/core">
+ <include name="*.jar"/>
+ </fileset>
</copy>
<mkdir dir="${dist.lib.dir}/test"/>
<copy todir="${dist.lib.dir}/test" failonerror="false">
- <fileset file="${annotations.jar}"/>
- <fileset file="${jpa.jar}"/>
- <fileset file="${archive-browsing.jar}"/>
+ <fileset dir="${ivy.dep.dir}/test">
+ <include name="*.jar"/>
+ </fileset>
</copy>
<copy file="${basedir}/build.properties.dist" tofile="${dist.dir}/build.properties" failonerror="false">
Added: trunk/HibernateExt/validator/ivy/ivy-1.4.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/HibernateExt/validator/ivy/ivy-1.4.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/HibernateExt/validator/ivy/ivyconf.xml
===================================================================
--- trunk/HibernateExt/validator/ivy/ivyconf.xml (rev 0)
+++ trunk/HibernateExt/validator/ivy/ivyconf.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -0,0 +1,27 @@
+<ivyconf>
+ <conf defaultResolver="jboss-rep"/>
+ <resolvers>
+ <chain name="jboss-rep">
+ <url name="jboss-rep-regular">
+ <artifact pattern="http://repository.jboss.org/[module]/[revision]/lib/[artifact].[ext]"/>
+ </url>
+ </chain>
+ <chain name="rep-hibernate" returnFirst="true" latest="latest-revision">
+ <filesystem name="local">
+ <ivy pattern="../[module]/target/[revision]/ivy.xml"/>
+ <artifact pattern="../[module]/target/[revision]/[artifact].[ext]"/>
+ </filesystem>
+ <url name="jboss-rep-hibernate">
+ <ivy pattern="http://repository.jboss.org/hibernate-[module]/[revision]/ivy.xml"/>
+ <artifact pattern="http://repository.jboss.org/hibernate-[module]/[revision]/lib/[artifact]...."/>
+ </url>
+ <url name="jboss-rep-regular-with-ivy">
+ <ivy pattern="http://repository.jboss.org/[module]/[revision]/ivy.xml"/>
+ <artifact pattern="http://repository.jboss.org/[module]/[revision]/lib/[artifact].[ext]"/>
+ </url>
+ </chain>
+ </resolvers>
+ <modules>
+ <module organisation="org.hibernate" name="*" resolver="rep-hibernate"/>
+ </modules>
+</ivyconf>
Added: trunk/HibernateExt/validator/ivy.xml
===================================================================
--- trunk/HibernateExt/validator/ivy.xml (rev 0)
+++ trunk/HibernateExt/validator/ivy.xml 2007-08-15 20:40:27 UTC (rev 12947)
@@ -0,0 +1,20 @@
+<?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="validator"/>
+ <configurations>
+ <conf name="core" description="Core module dependencies"/>
+ <conf name="test" visibility="private" description="Dependencies needed for testing purposes"/>
+ </configurations>
+ <publications>
+ <artifact name="hibernate-validator" conf="core"/>
+ </publications>
+ <dependencies>
+ <dependency name="jpa-api" rev="1.0.0.GA" conf="core->default"/>
+ <dependency name="commons-annotations" rev="3.0.0.GA" conf="core->core"/>
+ <dependency name="annotations" rev="3.3.0.GA" conf="test->core"/>
+ <dependency name="entitymanager" rev="3.3.1.GA" conf="test->core"/>
+ </dependencies>
+</ivy-module>
\ No newline at end of file
17 years, 4 months
Hibernate SVN: r12946 - in core/trunk: testsuite/src/test/java/org/hibernate/test/join and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: gbadner
Date: 2007-08-15 16:23:35 -0400 (Wed, 15 Aug 2007)
New Revision: 12946
Added:
core/trunk/testsuite/src/test/java/org/hibernate/test/join/JoinSuite.java
core/trunk/testsuite/src/test/java/org/hibernate/test/join/OptionalJoinTest.java
core/trunk/testsuite/src/test/java/org/hibernate/test/join/Thing.hbm.xml
core/trunk/testsuite/src/test/java/org/hibernate/test/join/Thing.java
Modified:
core/trunk/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java
Log:
HHH-2320 : Update detached entity with null joined properties changed to non-null
Modified: core/trunk/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java 2007-08-15 20:21:22 UTC (rev 12945)
+++ core/trunk/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java 2007-08-15 20:23:35 UTC (rev 12946)
@@ -1764,6 +1764,7 @@
}
throw new StaleObjectStateException( getEntityName(), id );
}
+ return false;
}
catch( TooManyRowsAffectedException e ) {
throw new HibernateException(
Added: core/trunk/testsuite/src/test/java/org/hibernate/test/join/JoinSuite.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/join/JoinSuite.java (rev 0)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/join/JoinSuite.java 2007-08-15 20:23:35 UTC (rev 12946)
@@ -0,0 +1,22 @@
+//$Id: $
+package org.hibernate.test.join;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Gail Badner
+ */
+
+/**
+ * Implementation of JoinSuite.
+ */
+public class JoinSuite {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite( "Join tests");
+ suite.addTest( JoinTest.suite() );
+ suite.addTest( OptionalJoinTest.suite() );
+ return suite;
+ }
+}
Added: core/trunk/testsuite/src/test/java/org/hibernate/test/join/OptionalJoinTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/join/OptionalJoinTest.java (rev 0)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/join/OptionalJoinTest.java 2007-08-15 20:23:35 UTC (rev 12946)
@@ -0,0 +1,369 @@
+//$Id: $
+package org.hibernate.test.join;
+
+/**
+ * @author Chris Jones and Gail Badner
+ */
+import org.hibernate.junit.functional.FunctionalTestCase;
+import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+import junit.framework.Test;
+
+import java.sql.ResultSet;
+import java.util.List;
+
+public class OptionalJoinTest extends FunctionalTestCase {
+
+ public OptionalJoinTest(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ return new FunctionalTestClassTestSuite( OptionalJoinTest.class );
+ }
+
+ public String[] getMappings() {
+ return new String[] { "join/Thing.hbm.xml" };
+ }
+
+ public void testUpdateNonNullOptionalJoinToDiffNonNull() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ // create a new thing with a non-null name
+ Thing thing = new Thing();
+ thing.setName("one");
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one", thing.getName());
+ // give it a new non-null name and save it
+ thing.setName("one_changed");
+ s.update(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one_changed", thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testUpdateNonNullOptionalJoinToDiffNonNullDetached() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ // create a new thing with a non-null name
+ Thing thing = new Thing();
+ thing.setName("one");
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one", thing.getName());
+ t.commit();
+ s.close();
+
+ // change detached thing name to a new non-null name and save it
+ thing.setName("one_changed");
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.update(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one_changed", thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testMergeNonNullOptionalJoinToDiffNonNullDetached() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ // create a new thing with a non-null name
+ Thing thing = new Thing();
+ thing.setName("one");
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one", thing.getName());
+ t.commit();
+ s.close();
+
+ // change detached thing name to a new non-null name and save it
+ thing.setName("one_changed");
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.merge(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one_changed", thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+
+ public void testUpdateNonNullOptionalJoinToNull() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ // create a new thing with a non-null name
+ Thing thing = new Thing();
+ thing.setName("one");
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one", thing.getName());
+ // give it a null name and save it
+ thing.setName(null);
+ s.update(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertNull(thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testUpdateNonNullOptionalJoinToNullDetached() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ // create a new thing with a non-null name
+ Thing thing = new Thing();
+ thing.setName("one");
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one", thing.getName());
+ t.commit();
+ s.close();
+
+ // give detached thing a null name and save it
+ thing.setName(null);
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.update(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertNull(thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testMergeNonNullOptionalJoinToNullDetached() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ // create a new thing with a non-null name
+ Thing thing = new Thing();
+ thing.setName("one");
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one", thing.getName());
+ t.commit();
+ s.close();
+
+ // give detached thing a null name and save it
+ thing.setName(null);
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.merge(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertNull(thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testUpdateNullOptionalJoinToNonNull() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ // create a new thing with a null name
+ Thing thing = new Thing();
+ thing.setName(null);
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertNull(thing.getName());
+ // change name to a non-null value
+ thing.setName("two");
+ s.update(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = ((Thing) things.get(0));
+ assertEquals("two", thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testUpdateNullOptionalJoinToNonNullDetached() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ // create a new thing with a null name
+ Thing thing = new Thing();
+ thing.setName(null);
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertNull(thing.getName());
+ t.commit();
+ s.close();
+
+ // change detached thing name to a non-null value
+ thing.setName("two");
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.update(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = ((Thing) things.get(0));
+ assertEquals("two", thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testMergeNullOptionalJoinToNonNullDetached() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ // create a new thing with a null name
+ Thing thing = new Thing();
+ thing.setName(null);
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertNull(thing.getName());
+ t.commit();
+ s.close();
+
+ // change detached thing name to a non-null value
+ thing.setName("two");
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.merge(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = ((Thing) things.get(0));
+ assertEquals("two", thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+}
Added: core/trunk/testsuite/src/test/java/org/hibernate/test/join/Thing.hbm.xml
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/join/Thing.hbm.xml (rev 0)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/join/Thing.hbm.xml 2007-08-15 20:23:35 UTC (rev 12946)
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+ This mapping demonstrates optional joined properties
+-->
+
+<hibernate-mapping package="org.hibernate.test.join" default-access="field">
+
+ <class name="Thing" table="thing">
+
+ <id name="id" column="thing_id" unsaved-value="0">
+ <generator class="native"/>
+ </id>
+
+ <join table="thing_name" optional="true">
+ <key column="thing_id"/>
+ <property name="name"/>
+ </join>
+ </class>
+
+</hibernate-mapping>
Added: core/trunk/testsuite/src/test/java/org/hibernate/test/join/Thing.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/join/Thing.java (rev 0)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/join/Thing.java 2007-08-15 20:23:35 UTC (rev 12946)
@@ -0,0 +1,63 @@
+//$Id: $
+package org.hibernate.test.join;
+
+/**
+ * @author Chris Jones
+ */
+public class Thing {
+ private Employee salesperson;
+ private String comments;
+
+ /**
+ * @return Returns the salesperson.
+ */
+ public Employee getSalesperson() {
+ return salesperson;
+ }
+ /**
+ * @param salesperson The salesperson to set.
+ */
+ public void setSalesperson(Employee salesperson) {
+ this.salesperson = salesperson;
+ }
+ /**
+ * @return Returns the comments.
+ */
+ public String getComments() {
+ return comments;
+ }
+ /**
+ * @param comments The comments to set.
+ */
+ public void setComments(String comments) {
+ this.comments = comments;
+ }
+
+ Long id;
+ String name;
+
+ /**
+ * @return Returns the ID.
+ */
+ public Long getId() {
+ return id;
+ }
+ /**
+ * @param id The ID to set.
+ */
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+}
17 years, 4 months
Hibernate SVN: r12945 - in core/branches/Branch_3_2: test/org/hibernate/test and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: gbadner
Date: 2007-08-15 16:21:22 -0400 (Wed, 15 Aug 2007)
New Revision: 12945
Added:
core/branches/Branch_3_2/test/org/hibernate/test/join/JoinSuite.java
core/branches/Branch_3_2/test/org/hibernate/test/join/OptionalJoinTest.java
core/branches/Branch_3_2/test/org/hibernate/test/join/Thing.hbm.xml
core/branches/Branch_3_2/test/org/hibernate/test/join/Thing.java
Modified:
core/branches/Branch_3_2/src/org/hibernate/persister/entity/AbstractEntityPersister.java
core/branches/Branch_3_2/test/org/hibernate/test/AllTests.java
Log:
HHH-2320 : Update detached entity with null joined properties changed to non-null
Modified: core/branches/Branch_3_2/src/org/hibernate/persister/entity/AbstractEntityPersister.java
===================================================================
--- core/branches/Branch_3_2/src/org/hibernate/persister/entity/AbstractEntityPersister.java 2007-08-15 14:39:43 UTC (rev 12944)
+++ core/branches/Branch_3_2/src/org/hibernate/persister/entity/AbstractEntityPersister.java 2007-08-15 20:21:22 UTC (rev 12945)
@@ -1764,6 +1764,7 @@
}
throw new StaleObjectStateException( getEntityName(), id );
}
+ return false;
}
catch( TooManyRowsAffectedException e ) {
throw new HibernateException(
Modified: core/branches/Branch_3_2/test/org/hibernate/test/AllTests.java
===================================================================
--- core/branches/Branch_3_2/test/org/hibernate/test/AllTests.java 2007-08-15 14:39:43 UTC (rev 12944)
+++ core/branches/Branch_3_2/test/org/hibernate/test/AllTests.java 2007-08-15 20:21:22 UTC (rev 12945)
@@ -56,7 +56,7 @@
import org.hibernate.test.interceptor.InterceptorTest;
import org.hibernate.test.interfaceproxy.InterfaceProxyTest;
import org.hibernate.test.iterate.IterateTest;
-import org.hibernate.test.join.JoinTest;
+import org.hibernate.test.join.JoinSuite;
import org.hibernate.test.joinedsubclass.JoinedSubclassTest;
import org.hibernate.test.joinfetch.JoinFetchTest;
import org.hibernate.test.jpa.JPAComplianceSuite;
@@ -222,7 +222,7 @@
suite.addTest( DynamicFilterTest.suite() );
suite.addTest( InterfaceProxyTest.suite() );
suite.addTest( OrphanSuite.suite() );
- suite.addTest( JoinTest.suite() );
+ suite.addTest( JoinSuite.suite() );
suite.addTest( JoinedSubclassTest.suite() );
suite.addTest( org.hibernate.test.unionsubclass2.UnionSubclassTest.suite() );
suite.addTest( MixedTest.suite() );
Added: core/branches/Branch_3_2/test/org/hibernate/test/join/JoinSuite.java
===================================================================
--- core/branches/Branch_3_2/test/org/hibernate/test/join/JoinSuite.java (rev 0)
+++ core/branches/Branch_3_2/test/org/hibernate/test/join/JoinSuite.java 2007-08-15 20:21:22 UTC (rev 12945)
@@ -0,0 +1,22 @@
+//$Id: $
+package org.hibernate.test.join;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Gail Badner
+ */
+
+/**
+ * Implementation of JoinSuite.
+ */
+public class JoinSuite {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite( "Join tests");
+ suite.addTest( JoinTest.suite() );
+ suite.addTest( OptionalJoinTest.suite() );
+ return suite;
+ }
+}
Added: core/branches/Branch_3_2/test/org/hibernate/test/join/OptionalJoinTest.java
===================================================================
--- core/branches/Branch_3_2/test/org/hibernate/test/join/OptionalJoinTest.java (rev 0)
+++ core/branches/Branch_3_2/test/org/hibernate/test/join/OptionalJoinTest.java 2007-08-15 20:21:22 UTC (rev 12945)
@@ -0,0 +1,369 @@
+//$Id: $
+package org.hibernate.test.join;
+
+/**
+ * @author Chris Jones and Gail Badner
+ */
+import org.hibernate.junit.functional.FunctionalTestCase;
+import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+import junit.framework.Test;
+
+import java.sql.ResultSet;
+import java.util.List;
+
+public class OptionalJoinTest extends FunctionalTestCase {
+
+ public OptionalJoinTest(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ return new FunctionalTestClassTestSuite( OptionalJoinTest.class );
+ }
+
+ public String[] getMappings() {
+ return new String[] { "join/Thing.hbm.xml" };
+ }
+
+ public void testUpdateNonNullOptionalJoinToDiffNonNull() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ // create a new thing with a non-null name
+ Thing thing = new Thing();
+ thing.setName("one");
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one", thing.getName());
+ // give it a new non-null name and save it
+ thing.setName("one_changed");
+ s.update(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one_changed", thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testUpdateNonNullOptionalJoinToDiffNonNullDetached() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ // create a new thing with a non-null name
+ Thing thing = new Thing();
+ thing.setName("one");
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one", thing.getName());
+ t.commit();
+ s.close();
+
+ // change detached thing name to a new non-null name and save it
+ thing.setName("one_changed");
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.update(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one_changed", thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testMergeNonNullOptionalJoinToDiffNonNullDetached() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ // create a new thing with a non-null name
+ Thing thing = new Thing();
+ thing.setName("one");
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one", thing.getName());
+ t.commit();
+ s.close();
+
+ // change detached thing name to a new non-null name and save it
+ thing.setName("one_changed");
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.merge(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one_changed", thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+
+ public void testUpdateNonNullOptionalJoinToNull() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ // create a new thing with a non-null name
+ Thing thing = new Thing();
+ thing.setName("one");
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one", thing.getName());
+ // give it a null name and save it
+ thing.setName(null);
+ s.update(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertNull(thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testUpdateNonNullOptionalJoinToNullDetached() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ // create a new thing with a non-null name
+ Thing thing = new Thing();
+ thing.setName("one");
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one", thing.getName());
+ t.commit();
+ s.close();
+
+ // give detached thing a null name and save it
+ thing.setName(null);
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.update(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertNull(thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testMergeNonNullOptionalJoinToNullDetached() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ // create a new thing with a non-null name
+ Thing thing = new Thing();
+ thing.setName("one");
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertEquals("one", thing.getName());
+ t.commit();
+ s.close();
+
+ // give detached thing a null name and save it
+ thing.setName(null);
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.merge(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertNull(thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testUpdateNullOptionalJoinToNonNull() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ // create a new thing with a null name
+ Thing thing = new Thing();
+ thing.setName(null);
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertNull(thing.getName());
+ // change name to a non-null value
+ thing.setName("two");
+ s.update(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = ((Thing) things.get(0));
+ assertEquals("two", thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testUpdateNullOptionalJoinToNonNullDetached() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ // create a new thing with a null name
+ Thing thing = new Thing();
+ thing.setName(null);
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertNull(thing.getName());
+ t.commit();
+ s.close();
+
+ // change detached thing name to a non-null value
+ thing.setName("two");
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.update(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = ((Thing) things.get(0));
+ assertEquals("two", thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+
+ public void testMergeNullOptionalJoinToNonNullDetached() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ // create a new thing with a null name
+ Thing thing = new Thing();
+ thing.setName(null);
+ s.save(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = (Thing)things.get(0);
+ assertNull(thing.getName());
+ t.commit();
+ s.close();
+
+ // change detached thing name to a non-null value
+ thing.setName("two");
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.merge(thing);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ things = s.createQuery("from Thing").list();
+ assertEquals(1, things.size());
+ thing = ((Thing) things.get(0));
+ assertEquals("two", thing.getName());
+ s.delete(thing);
+ t.commit();
+ s.close();
+ }
+}
Added: core/branches/Branch_3_2/test/org/hibernate/test/join/Thing.hbm.xml
===================================================================
--- core/branches/Branch_3_2/test/org/hibernate/test/join/Thing.hbm.xml (rev 0)
+++ core/branches/Branch_3_2/test/org/hibernate/test/join/Thing.hbm.xml 2007-08-15 20:21:22 UTC (rev 12945)
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+ This mapping demonstrates optional joined properties
+-->
+
+<hibernate-mapping package="org.hibernate.test.join" default-access="field">
+
+ <class name="Thing" table="thing">
+
+ <id name="id" column="thing_id" unsaved-value="0">
+ <generator class="native"/>
+ </id>
+
+ <join table="thing_name" optional="true">
+ <key column="thing_id"/>
+ <property name="name"/>
+ </join>
+ </class>
+
+</hibernate-mapping>
Added: core/branches/Branch_3_2/test/org/hibernate/test/join/Thing.java
===================================================================
--- core/branches/Branch_3_2/test/org/hibernate/test/join/Thing.java (rev 0)
+++ core/branches/Branch_3_2/test/org/hibernate/test/join/Thing.java 2007-08-15 20:21:22 UTC (rev 12945)
@@ -0,0 +1,63 @@
+//$Id: $
+package org.hibernate.test.join;
+
+/**
+ * @author Chris Jones
+ */
+public class Thing {
+ private Employee salesperson;
+ private String comments;
+
+ /**
+ * @return Returns the salesperson.
+ */
+ public Employee getSalesperson() {
+ return salesperson;
+ }
+ /**
+ * @param salesperson The salesperson to set.
+ */
+ public void setSalesperson(Employee salesperson) {
+ this.salesperson = salesperson;
+ }
+ /**
+ * @return Returns the comments.
+ */
+ public String getComments() {
+ return comments;
+ }
+ /**
+ * @param comments The comments to set.
+ */
+ public void setComments(String comments) {
+ this.comments = comments;
+ }
+
+ Long id;
+ String name;
+
+ /**
+ * @return Returns the ID.
+ */
+ public Long getId() {
+ return id;
+ }
+ /**
+ * @param id The ID to set.
+ */
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+}
17 years, 4 months
Hibernate SVN: r12944 - core/trunk/core/src/main/java/org/hibernate/mapping.
by hibernate-commits@lists.jboss.org
Author: d.plentz
Date: 2007-08-15 10:39:43 -0400 (Wed, 15 Aug 2007)
New Revision: 12944
Modified:
core/trunk/core/src/main/java/org/hibernate/mapping/Table.java
Log:
[HHH-1396] Table.validateColumns fails on valid column
Modified: core/trunk/core/src/main/java/org/hibernate/mapping/Table.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/mapping/Table.java 2007-08-15 03:31:18 UTC (rev 12943)
+++ core/trunk/core/src/main/java/org/hibernate/mapping/Table.java 2007-08-15 14:39:43 UTC (rev 12944)
@@ -254,7 +254,7 @@
throw new HibernateException( "Missing column: " + col.getName() + " in " + Table.qualify( tableInfo.getCatalog(), tableInfo.getSchema(), tableInfo.getName()));
}
else {
- final boolean typesMatch = col.getSqlType( dialect, mapping )
+ final boolean typesMatch = col.getSqlType( dialect, mapping ).toLowerCase()
.startsWith( columnInfo.getTypeName().toLowerCase() )
|| columnInfo.getTypeCode() == col.getSqlTypeCode( mapping );
if ( !typesMatch ) {
17 years, 4 months
Hibernate SVN: r12943 - in core/trunk/documentation/manual: es-ES/src/main/docbook/modules and 5 other directories.
by hibernate-commits@lists.jboss.org
Author: d.plentz
Date: 2007-08-14 23:31:18 -0400 (Tue, 14 Aug 2007)
New Revision: 12943
Modified:
core/trunk/documentation/manual/en-US/src/main/docbook/modules/xml.xml
core/trunk/documentation/manual/es-ES/src/main/docbook/modules/xml.xml
core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/xml.xml
core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/xml.xml
core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/xml.xml
core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/xml.xml
core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/xml.xml
Log:
[HHH-1920] Incorrect documentation regarding XML manipulation in Hibernate reference manual (chapter 18.3)
Modified: core/trunk/documentation/manual/en-US/src/main/docbook/modules/xml.xml
===================================================================
--- core/trunk/documentation/manual/en-US/src/main/docbook/modules/xml.xml 2007-08-15 02:51:52 UTC (rev 12942)
+++ core/trunk/documentation/manual/en-US/src/main/docbook/modules/xml.xml 2007-08-15 03:31:18 UTC (rev 12943)
@@ -252,7 +252,7 @@
for ( int i=0; i<results.size(); i++ ) {
//add the customer data to the XML document
Element customer = (Element) results.get(i);
- doc.add(customer);
+ doc.getRootElement().add(customer);
}
tx.commit();
Modified: core/trunk/documentation/manual/es-ES/src/main/docbook/modules/xml.xml
===================================================================
--- core/trunk/documentation/manual/es-ES/src/main/docbook/modules/xml.xml 2007-08-15 02:51:52 UTC (rev 12942)
+++ core/trunk/documentation/manual/es-ES/src/main/docbook/modules/xml.xml 2007-08-15 03:31:18 UTC (rev 12943)
@@ -248,7 +248,7 @@
for ( int i=0; i<results.size(); i++ ) {
//add the customer data to the XML document
Element customer = (Element) results.get(i);
- doc.add(customer);
+ doc.getRootElement().add(customer);
}
tx.commit();
Modified: core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/xml.xml
===================================================================
--- core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/xml.xml 2007-08-15 02:51:52 UTC (rev 12942)
+++ core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/xml.xml 2007-08-15 03:31:18 UTC (rev 12943)
@@ -257,7 +257,7 @@
for ( int i=0; i<results.size(); i++ ) {
//add the customer data to the XML document
Element customer = (Element) results.get(i);
- doc.add(customer);
+ doc.getRootElement().add(customer);
}
tx.commit();
Modified: core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/xml.xml
===================================================================
--- core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/xml.xml 2007-08-15 02:51:52 UTC (rev 12942)
+++ core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/xml.xml 2007-08-15 03:31:18 UTC (rev 12943)
@@ -264,7 +264,7 @@
for ( int i=0; i<results.size(); i++ ) {
//add the customer data to the XML document
Element customer = (Element) results.get(i);
- doc.add(customer);
+ doc.getRootElement().add(customer);
}
tx.commit();
Modified: core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/xml.xml
===================================================================
--- core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/xml.xml 2007-08-15 02:51:52 UTC (rev 12942)
+++ core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/xml.xml 2007-08-15 03:31:18 UTC (rev 12943)
@@ -239,7 +239,7 @@
for ( int i=0; i<results.size(); i++ ) {
//add the customer data to the XML document
Element customer = (Element) results.get(i);
- doc.add(customer);
+ doc.getRootElement().add(customer);
}
tx.commit();
Modified: core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/xml.xml
===================================================================
--- core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/xml.xml 2007-08-15 02:51:52 UTC (rev 12942)
+++ core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/xml.xml 2007-08-15 03:31:18 UTC (rev 12943)
@@ -255,7 +255,7 @@
for ( int i=0; i<results.size(); i++ ) {
//add the customer data to the XML document
Element customer = (Element) results.get(i);
- doc.add(customer);
+ doc.getRootElement().add(customer);
}
tx.commit();
Modified: core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/xml.xml
===================================================================
--- core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/xml.xml 2007-08-15 02:51:52 UTC (rev 12942)
+++ core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/xml.xml 2007-08-15 03:31:18 UTC (rev 12943)
@@ -238,7 +238,7 @@
for ( int i=0; i<results.size(); i++ ) {
//add the customer data to the XML document
Element customer = (Element) results.get(i);
- doc.add(customer);
+ doc.getRootElement().add(customer);
}
tx.commit();
17 years, 4 months
Hibernate SVN: r12942 - in core/trunk/documentation/manual: es-ES/src/main/docbook/modules and 5 other directories.
by hibernate-commits@lists.jboss.org
Author: d.plentz
Date: 2007-08-14 22:51:52 -0400 (Tue, 14 Aug 2007)
New Revision: 12942
Modified:
core/trunk/documentation/manual/en-US/src/main/docbook/modules/performance.xml
core/trunk/documentation/manual/es-ES/src/main/docbook/modules/performance.xml
core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/performance.xml
core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/performance.xml
core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/performance.xml
core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/performance.xml
core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/performance.xml
Log:
[HHH-2789] Section 19.2 of the documentation does not show OSCache as supporting clusters. It does.
Modified: core/trunk/documentation/manual/en-US/src/main/docbook/modules/performance.xml
===================================================================
--- core/trunk/documentation/manual/en-US/src/main/docbook/modules/performance.xml 2007-08-15 02:39:38 UTC (rev 12941)
+++ core/trunk/documentation/manual/en-US/src/main/docbook/modules/performance.xml 2007-08-15 02:51:52 UTC (rev 12942)
@@ -681,7 +681,7 @@
<entry>OSCache</entry>
<entry><literal>org.hibernate.cache.OSCacheProvider</literal></entry>
<entry>memory, disk</entry>
- <entry></entry>
+ <entry>yes (clustered invalidation)</entry>
<entry>yes</entry>
</row>
<row>
Modified: core/trunk/documentation/manual/es-ES/src/main/docbook/modules/performance.xml
===================================================================
--- core/trunk/documentation/manual/es-ES/src/main/docbook/modules/performance.xml 2007-08-15 02:39:38 UTC (rev 12941)
+++ core/trunk/documentation/manual/es-ES/src/main/docbook/modules/performance.xml 2007-08-15 02:51:52 UTC (rev 12942)
@@ -639,7 +639,7 @@
<entry>OSCache</entry>
<entry><literal>org.hibernate.cache.OSCacheProvider</literal></entry>
<entry>memoria, disco</entry>
- <entry></entry>
+ <entry>sí (invalidación en cluster)</entry>
<entry>sí</entry>
</row>
<row>
Modified: core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/performance.xml
===================================================================
--- core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/performance.xml 2007-08-15 02:39:38 UTC (rev 12941)
+++ core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/performance.xml 2007-08-15 02:51:52 UTC (rev 12942)
@@ -717,7 +717,7 @@
<entry>OSCache</entry>
<entry><literal>org.hibernate.cache.OSCacheProvider</literal></entry>
<entry>m�moire, disque</entry>
- <entry></entry>
+ <entry>oui (invalidation de cluster)</entry>
<entry>oui</entry>
</row>
<row>
Modified: core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/performance.xml
===================================================================
--- core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/performance.xml 2007-08-15 02:39:38 UTC (rev 12941)
+++ core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/performance.xml 2007-08-15 02:51:52 UTC (rev 12942)
@@ -679,7 +679,7 @@
<entry>OSCache</entry>
<entry><literal>org.hibernate.cache.OSCacheProvider</literal></entry>
<entry>�������A�f�B�X�N</entry>
- <entry></entry>
+ <entry>yes�i�N���X�^�������j</entry>
<entry>yes</entry>
</row>
<row>
Modified: core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/performance.xml
===================================================================
--- core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/performance.xml 2007-08-15 02:39:38 UTC (rev 12941)
+++ core/trunk/documentation/manual/ko-KR/src/main/docbook/modules/performance.xml 2007-08-15 02:51:52 UTC (rev 12942)
@@ -632,7 +632,7 @@
<entry>OSCache</entry>
<entry><literal>org.hibernate.cache.OSCacheProvider</literal></entry>
<entry>memory, disk</entry>
- <entry></entry>
+ <entry>yes (clustered invalidation)</entry>
<entry>yes</entry>
</row>
<row>
Modified: core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/performance.xml
===================================================================
--- core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/performance.xml 2007-08-15 02:39:38 UTC (rev 12941)
+++ core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/performance.xml 2007-08-15 02:51:52 UTC (rev 12942)
@@ -677,7 +677,7 @@
<entry>OSCache</entry>
<entry><literal>org.hibernate.cache.OSCacheProvider</literal></entry>
<entry>memory, disk</entry>
- <entry></entry>
+ <entry>yes (clustered invalidation)</entry>
<entry>yes</entry>
</row>
<row>
Modified: core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/performance.xml
===================================================================
--- core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/performance.xml 2007-08-15 02:39:38 UTC (rev 12941)
+++ core/trunk/documentation/manual/zh-CN/src/main/docbook/modules/performance.xml 2007-08-15 02:51:52 UTC (rev 12942)
@@ -606,7 +606,7 @@
<entry>OSCache</entry>
<entry><literal>org.hibernate.cache.OSCacheProvider</literal></entry>
<entry>memory, disk</entry>
- <entry></entry>
+ <entry>yes (clustered invalidation)</entry>
<entry>yes</entry>
</row>
<row>
17 years, 4 months
Hibernate SVN: r12941 - core/branches/Branch_3_2/src/org/hibernate/dialect.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-08-14 22:39:38 -0400 (Tue, 14 Aug 2007)
New Revision: 12941
Modified:
core/branches/Branch_3_2/src/org/hibernate/dialect/Oracle8iDialect.java
Log:
HHH-2788 : missing type mapping for DATE and TIME on Oracle8iDialect
Modified: core/branches/Branch_3_2/src/org/hibernate/dialect/Oracle8iDialect.java
===================================================================
--- core/branches/Branch_3_2/src/org/hibernate/dialect/Oracle8iDialect.java 2007-08-15 02:38:39 UTC (rev 12940)
+++ core/branches/Branch_3_2/src/org/hibernate/dialect/Oracle8iDialect.java 2007-08-15 02:39:38 UTC (rev 12941)
@@ -64,6 +64,8 @@
}
protected void registerDateTimeTypeMappings() {
+ registerColumnType( Types.DATE, "date" );
+ registerColumnType( Types.TIME, "date" );
registerColumnType( Types.TIMESTAMP, "date" );
}
17 years, 4 months
Hibernate SVN: r12940 - core/trunk/core/src/main/java/org/hibernate/dialect.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-08-14 22:38:39 -0400 (Tue, 14 Aug 2007)
New Revision: 12940
Modified:
core/trunk/core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java
Log:
HHH-2788 : missing type mapping for DATE and TIME on Oracle8iDialect
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java 2007-08-14 21:17:14 UTC (rev 12939)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java 2007-08-15 02:38:39 UTC (rev 12940)
@@ -64,6 +64,8 @@
}
protected void registerDateTimeTypeMappings() {
+ registerColumnType( Types.DATE, "date" );
+ registerColumnType( Types.TIME, "date" );
registerColumnType( Types.TIMESTAMP, "date" );
}
17 years, 4 months
Hibernate SVN: r12939 - in core/trunk/documentation/manual: fr-FR/src/main/docbook/modules and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: d.plentz
Date: 2007-08-14 17:17:14 -0400 (Tue, 14 Aug 2007)
New Revision: 12939
Modified:
core/trunk/documentation/manual/en-US/src/main/docbook/modules/toolset_guide.xml
core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/toolset_guide.xml
core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/toolset_guide.xml
core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/toolset_guide.xml
Log:
[HHH-2164] Minor bug in section "20.1.1. Customizing the schema"
Modified: core/trunk/documentation/manual/en-US/src/main/docbook/modules/toolset_guide.xml
===================================================================
--- core/trunk/documentation/manual/en-US/src/main/docbook/modules/toolset_guide.xml 2007-08-14 20:07:25 UTC (rev 12938)
+++ core/trunk/documentation/manual/en-US/src/main/docbook/modules/toolset_guide.xml 2007-08-14 21:17:14 UTC (rev 12939)
@@ -100,7 +100,7 @@
</para>
<programlisting><![CDATA[<many-to-one name="org" column="orgId" unique-key="OrgEmployeeId"/>
-<property name="employeeId" unique-key="OrgEmployee"/>]]></programlisting>
+<property name="employeeId" unique-key="OrgEmployeeId"/>]]></programlisting>
<para>
An <literal>index</literal> attribute specifies the name of an index that
Modified: core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/toolset_guide.xml
===================================================================
--- core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/toolset_guide.xml 2007-08-14 20:07:25 UTC (rev 12938)
+++ core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/toolset_guide.xml 2007-08-14 21:17:14 UTC (rev 12939)
@@ -94,7 +94,7 @@
dans le fichier de mapping.
</para>
<programlisting><![CDATA[<many-to-one name="org" column="orgId" unique-key="OrgEmployeeId"/>
- <property name="employeeId" unique-key="OrgEmployee"/>]]></programlisting>
+ <property name="employeeId" unique-key="OrgEmployeeId"/>]]></programlisting>
<para>
Un attribut <literal>index</literal> indique le nom d'un index qui sera
Modified: core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/toolset_guide.xml
===================================================================
--- core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/toolset_guide.xml 2007-08-14 20:07:25 UTC (rev 12938)
+++ core/trunk/documentation/manual/ja-JP/src/main/docbook/modules/toolset_guide.xml 2007-08-14 21:17:14 UTC (rev 12939)
@@ -92,7 +92,7 @@
</para>
<programlisting><![CDATA[<many-to-one name="org" column="orgId" unique-key="OrgEmployeeId"/>
-<property name="employeeId" unique-key="OrgEmployee"/>]]></programlisting>
+<property name="employeeId" unique-key="OrgEmployeeId"/>]]></programlisting>
Modified: core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/toolset_guide.xml
===================================================================
--- core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/toolset_guide.xml 2007-08-14 20:07:25 UTC (rev 12938)
+++ core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/toolset_guide.xml 2007-08-14 21:17:14 UTC (rev 12939)
@@ -100,7 +100,7 @@
</para>
<programlisting><![CDATA[<many-to-one name="org" column="orgId" unique-key="OrgEmployeeId"/>
-<property name="employeeId" unique-key="OrgEmployee"/>]]></programlisting>
+<property name="employeeId" unique-key="OrgEmployeeId"/>]]></programlisting>
<para>
An <literal>index</literal> attribute specifies the name of an index that
17 years, 4 months
Hibernate SVN: r12938 - in core/trunk/documentation/manual: fr-FR/src/main/docbook/modules and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: d.plentz
Date: 2007-08-14 16:07:25 -0400 (Tue, 14 Aug 2007)
New Revision: 12938
Modified:
core/trunk/documentation/manual/en-US/src/main/docbook/modules/tutorial.xml
core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/tutorial.xml
core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/tutorial.xml
core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/tutorial1.xml
Log:
[HHH-2755] Wrong "jsdk.jar" referenced in the tutorial
Modified: core/trunk/documentation/manual/en-US/src/main/docbook/modules/tutorial.xml
===================================================================
--- core/trunk/documentation/manual/en-US/src/main/docbook/modules/tutorial.xml 2007-08-14 19:47:14 UTC (rev 12937)
+++ core/trunk/documentation/manual/en-US/src/main/docbook/modules/tutorial.xml 2007-08-14 20:07:25 UTC (rev 12938)
@@ -1471,7 +1471,7 @@
<programlisting><![CDATA[<target name="war" depends="compile">
<war destfile="hibernate-tutorial.war" webxml="web.xml">
<lib dir="${librarydir}">
- <exclude name="jsdk*.jar"/>
+ <exclude name="servlet.jar"/>
</lib>
<classes dir="${targetdir}"/>
@@ -1503,8 +1503,9 @@
<para>
Before you compile and deploy the web application, note that an additional library
- is required: <literal>jsdk.jar</literal>. This is the Java servlet development kit,
- if you don't have this library already, get it from the Sun website and copy it to
+ is required: <literal>servlet.jar</literal>. This is the Java Servlet Development Kit,
+ if you don't have this library already, get it from the
+ <ulink url="http://java.sun.com/products/servlet/archive.html">Sun website</ulink> and copy it to
your library directory. However, it will be only used for compliation and excluded
from the WAR package.
</para>
Modified: core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/tutorial.xml
===================================================================
--- core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/tutorial.xml 2007-08-14 19:47:14 UTC (rev 12937)
+++ core/trunk/documentation/manual/fr-FR/src/main/docbook/modules/tutorial.xml 2007-08-14 20:07:25 UTC (rev 12938)
@@ -1494,7 +1494,7 @@
<programlisting><![CDATA[<target name="war" depends="compile">
<war destfile="hibernate-tutorial.war" webxml="web.xml">
<lib dir="${librarydir}">
- <exclude name="jsdk*.jar"/>
+ <exclude name="servlet.jar"/>
</lib>
<classes dir="${targetdir}"/>
@@ -1526,8 +1526,9 @@
<para>
Avant de compiler et d�ployer l'application web, notez qu'une biblioth�que suppl�mentaire
- est requise: <literal>jsdk.jar</literal>. C'est le kit de d�veloppement de Servlet Java,
- si vous ne disposez pas de cette biblioth�que, prenez la sur le site de Sun et copiez la
+ est requise: <literal>servlet.jar</literal>. C'est le kit de d�veloppement de Servlet Java,
+ si vous ne disposez pas de cette biblioth�que, prenez la sur le
+ <ulink url="http://java.sun.com/products/servlet/archive.html">site de Sun</ulink> et copiez la
dans votre r�pertoire des biblioth�ques. Cependant, elle ne sera utilis�e uniquement pour la
compilation et sera exclue du paackage WAR.
</para>
Modified: core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/tutorial.xml
===================================================================
--- core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/tutorial.xml 2007-08-14 19:47:14 UTC (rev 12937)
+++ core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/tutorial.xml 2007-08-14 20:07:25 UTC (rev 12938)
@@ -1,4 +1,4 @@
-<chapter id="tutorial">
+<chapter id="tutorial">
<title>Introdução ao Hibernate</title>
<sect1 id="tutorial-intro" revision="1">
@@ -1447,7 +1447,7 @@
<programlisting><![CDATA[<target name="war" depends="compile">
<war destfile="hibernate-tutorial.war" webxml="web.xml">
<lib dir="${librarydir}">
- <exclude name="jsdk*.jar"/>
+ <exclude name="servlet.jar"/>
</lib>
<classes dir="${targetdir}"/>
@@ -1479,8 +1479,9 @@
<para>
Antes de você compilar e fazer o deploy desta aplicação web, note que uma biblioteca
- adicional é requerida: <literal>jsdk.jar</literal>. Esse é o Java servlet development kit,
- se você não possui esta biblioteca, faça seu download na página da Sun e copie-a
+ adicional é requerida: <literal>servlet.jar</literal>. Esse é o Java Servlet Development Kit,
+ se você não possui esta biblioteca, faça seu download na
+ <ulink url="http://java.sun.com/products/servlet/archive.html">página da Sun</ulink> e copie-a
para seu diretório de bibliotecas. Entretanto, será usado somente para a compilação e
excluído do pacote WAR.
</para>
Modified: core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/tutorial1.xml
===================================================================
--- core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/tutorial1.xml 2007-08-14 19:47:14 UTC (rev 12937)
+++ core/trunk/documentation/manual/pt-BR/src/main/docbook/modules/tutorial1.xml 2007-08-14 20:07:25 UTC (rev 12938)
@@ -1,4 +1,4 @@
-<chapter id="tutorial">
+<chapter id="tutorial">
<title>Introdução ao Hibernate</title>
<sect1 id="tutorial-intro" revision="1">
@@ -1461,7 +1461,7 @@
<programlisting><![CDATA[<target name="war" depends="compile">
<war destfile="hibernate-tutorial.war" webxml="web.xml">
<lib dir="${librarydir}">
- <exclude name="jsdk*.jar"/>
+ <exclude name="servlet.jar"/>
</lib>
<classes dir="${targetdir}"/>
@@ -1493,8 +1493,9 @@
<para>
Before you compile and deploy the web application, note that an additional library
- is required: <literal>jsdk.jar</literal>. This is the Java servlet development kit,
- if you don't have this library already, get it from the Sun website and copy it to
+ is required: <literal>servlet.jar</literal>. This is the Java Servlet Development Kit,
+ if you don't have this library already, get it from the
+ <ulink url="http://java.sun.com/products/servlet/archive.html">Sun website</ulink> and copy it to
your library directory. However, it will be only used for compliation and excluded
from the WAR package.
</para>
17 years, 4 months