To do all this:
copy from Hibernate* dir
lib/antlr-*.jar
lib/junit-*.jar
files into ant*/lib
(0) Make sure your
hibernate.properties in etc/ have been set properly. I believe this will allow hibernate to connect to the database...
e.g. for the "H2" Database, I've added this entry because it's not yet there.
Code:
## H2
hibernate.dialect org.hibernate.dialect.H2Dialect
hibernate.connection.driver_class org.h2.Driver
hibernate.connection.url jdbc:h2:test;hsqldb.default_table_type=cached
hibernate.connection.username sa
hibernate.connection.password
For your database
uncomment & modify the properties to the proper setting.
(1) To make a new
Hibernate "jar" with your java class inside
make sure your place your .java file at the right place within:
e.g. for "H2" database place the H2Dialect.java (H2Dialect.txt) within dir
src\org\hibernate\dialect\H2Dialect.java
type/run "ant" at the Hibernate* dir
This should create a new
Hibernate "jar" with your java class inside.
(It seems all the common database .java file is there, likely you do NOT need to compile & make a new Hibernate "jar" file)(2) "ant eg"
To run this, copy the new or existing
Hibernate "jar" into Hibernate*/lib dir
lib/hibernate*.jarcopy also your JDBC driver into the Hibernate*/lib dir
e.g. for "H2" database, the file is:
lib/h2.jarnow run "ant eg"
in my setting & database it runs ok.
(3) "ant info" - for hibernate-3.1.3 build.xml
it has a target "info"
Code:
<target name="info" description="Echo system properties">
<echoproperties/>
</target>
This should display the properties within this build.xml...
Hope this helps.