From: <max...@us...> - 2006-02-17 16:32:03
|
Update of /cvsroot/hibernate/HibernateExt/tools/src/testsupport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5019/src/testsupport Modified Files: anttest-build.xml Log Message: HBX-602 Better error reporting from <hibernatetool> in ant Index: anttest-build.xml =================================================================== RCS file: /cvsroot/hibernate/HibernateExt/tools/src/testsupport/anttest-build.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- anttest-build.xml 6 Feb 2006 09:08:09 -0000 1.27 +++ anttest-build.xml 17 Feb 2006 16:31:57 -0000 1.28 @@ -5,7 +5,22 @@ <property name="build.dir" location="../../build/anttest"/> <property file="../../etc/hibernate.properties"/> - <delete dir="${build.dir}"/> + <delete dir="${build.dir}"/> + + + <path id="tasks.classpath"> + <pathelement path="../../build/eclipse"/> + <pathelement path="../../build/classes"/> + + <fileset dir="${hibernate-core.lib.dir}"> + <include name="**/*.jar"/> + </fileset> + + <pathelement location="${hibernate-core.jar}"/> + <pathelement path="../../lib/freemarker.jar"/> + <pathelement path="${hibernate-core.home}\jdbc\hsqldb.jar"/> + </path> + <target name="testantcfg"> @@ -26,14 +41,16 @@ <hbm2ddl drop="false" create="true" export="false" outputfilename="onlycreate.sql" format="true"/> <hbm2ddl drop="true" create="false" export="false" outputfilename="onlydrop.sql" format="true"/> <hbm2ddl drop="true" create="true" export="false" outputfilename="dropandcreate.sql" format="true"/> + <hbm2ddl update="true" outputfilename="updateonly.sql" format="true"/> <hbm2doc/> </hibernatetool> </target> <target name="testantjdbccfg"> - <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpath="${hibernate-core.jar};../build/classes;lib/velocity-1.4.jar;lib/velocity-tools-generic-1.1.jar;../../metadata/build/classes;${hibernate-core.home}\jdbc\hsqldb.jar"/> + <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="tasks.classpath"/> <property file="../etc/hibernate.properties" prefix="tools"/> -<!-- <sql onerror="continue" driver="${tools.hibernate.connection.driver_class}" password="${tools.hibernate.connection.password}" url="${tools.hibernate.connection.url}" userid="${tools.hibernate.connection.username}" classpath="C:\work\products\hsqldb-1.7.2.6\lib\hsqldb.jar"> +<!-- +<sql onerror="continue" driver="${tools.hibernate.connection.driver_class}" password="${tools.hibernate.connection.password}" url="${tools.hibernate.connection.url}" userid="${tools.hibernate.connection.username}" classpath="C:\work\products\hsqldb-1.7.2.6\lib\hsqldb.jar"> create table BottomUp ( id bigint not null, name varchar(255), @@ -49,19 +66,8 @@ </hibernatetool> </target> - <path id="tasks.classpath"> - <fileset dir="${hibernate-core.lib.dir}"> - <include name="**/*.jar"/> - </fileset> - <fileset dir="lib"> - <include name="**/*.jar"/> - </fileset> - <pathelement location="${hibernate-core.jar}"/> - <pathelement path="build/classes"/> - </path> - <target name="testantjdbccfgoverrides"> - <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpath="${hibernate-core.jar};../build/classes;lib/velocity-1.4.jar;lib/velocity-tools-generic-1.1.jar;../../metadata/build/classes;${hibernate-core.home}\jdbc\hsqldb.jar"/> + <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="tasks.classpath"/> <property file="../etc/hibernate.properties" prefix="tools"/> <!-- <sql onerror="continue" driver="${tools.hibernate.connection.driver_class}" password="${tools.hibernate.connection.password}" url="${tools.hibernate.connection.url}" userid="${tools.hibernate.connection.username}" classpath="C:\work\products\hsqldb-1.7.2.6\lib\hsqldb.jar"> create table BottomUp ( @@ -136,6 +142,19 @@ <hbmtemplate exporterclass="org.hibernate.tool.hbm2x.POJOExporter" filepattern="{package-name}/{class-name}.quote"/> </hibernatetool> </target> + + <target name="testexceptions"> + <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="tasks.classpath"/> + <hibernatetool destdir="${build.dir}/generic" templatepath="generictemplates"> + <configuration propertyfile="../../etc/hibernate.properties"> + <fileset dir="../test" id="id"> + <include name="**/*TopDown.hbm.xml"/> + </fileset> + </configuration> + + <hbmtemplate template="generic-exception.ftl" filepattern="{package-name}/{class-name}.error"/> + </hibernatetool> + </target> <target name="testantannotationcfg"> <path id="annlib"> @@ -156,17 +175,6 @@ </hibernatetoolx> </target> -<path id="tasks.classpath"> - <fileset dir="${hibernate-core.lib.dir}"> - <include name="**/*.jar"/> - </fileset> - <fileset dir="../../lib"> - <include name="**/*.jar"/> - </fileset> - <pathelement location="${hibernate-core.jar}"/> - <pathelement path="build/classes"/> -</path> - <target name="testantejb3hbm2java"> <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="tasks.classpath"/> |