I have scoured these forums and can't find any references to a user setting the properties in this manner (in Ant rather than props/XML file). Is it possible this feature is crippled or non-functional? The manual suggests that it works:
Quote:
If you don't specify properties or a config file, the SchemaExportTask will try to use normal Ant project properties instead. In other words, if you don't want or need an external configuration or properties file, you may put hibernate.* configuration properties in your build.xml or build.properties.
Here's the output from my Ant build. I'm really at a loss here:
Code:
[schemaexport] INFO: Hibernate 2.1.8
[schemaexport] Feb 28, 2005 5:08:21 PM net.sf.hibernate.cfg.Environment <clinit>
[schemaexport] INFO: hibernate.properties not found
[schemaexport] Feb 28, 2005 5:08:21 PM net.sf.hibernate.cfg.Environment <clinit>
[schemaexport] INFO: using CGLIB reflection optimizer
[schemaexport] Feb 28, 2005 5:08:21 PM net.sf.hibernate.cfg.Environment <clinit>
[schemaexport] INFO: using JDK 1.4 java.sql.Timestamp handling
[schemaexport] Feb 28, 2005 5:08:21 PM net.sf.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Mapping file: C:\workspace\xxx-core\src\com\xxx\core\model\Cart.hbm.xml
[schemaexport] Feb 28, 2005 5:08:22 PM net.sf.hibernate.cfg.Binder bindRootClass
[schemaexport] INFO: Mapping class: com.xxx.core.model.Cart -> CART
[schemaexport] Feb 28, 2005 5:08:22 PM net.sf.hibernate.cfg.Configuration addFile
[schemaexport] INFO: Mapping file: C:\workspace\xxx-core\src\com\xxx\core\model\Order.hbm.xml
[schemaexport] Feb 28, 2005 5:08:22 PM net.sf.hibernate.cfg.Binder bindRootClass
[schemaexport] INFO: Mapping class: com.xxx.core.model.Order -> ORDER
BUILD FAILED
C:\workspace\xxx-core\build.xml:88: Schema text failed: The dialect was not set. Set the property hibernate.dialect.
Total time: 3 seconds
I can probably make do with a hibernate.properties file for now, but this will be confusing to the Hibernate newbies on my team because they may assume the file is used for runtime configuration of Hibernate.
-Chris