Hi all
Im very new to hibernate. And im just exploring some of the features of it.
I want to generate the bean files via the hibernate tools reverse engineering feature using Ant. But it doesn't seem to work. Its not giving me an error neither is it generating the files i require. Any help would be appreciated.
Hibernate version 3 :
Hibernate tools version 3.2.2 Beta:
Database oracle 10g/9i
Heres the build.xml file
Code:
<project name="MyProject" basedir=".">
<path id="toolslib">
<path location="lib/hibernate-tools.jar"/>
<path location="lib/hibernate3.jar"/>
<path location="lib/freemarker.jar"/>
<path location="lib/classes12.jar"/>
</path>
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib"/>
<target name="reveng.hbmxml"
description="Produces XML mapping files in src directory">
<hibernatetool destdir="${basedir}/src">
<jdbcconfiguration propertyfile="${basedir}/helloworld.db.properties"
revengfile="${basedir}/hibernate.reveng.xml"/>
<hbm2hbmxml/>
<hbm2cfgxml/>
</hibernatetool>
</target>
</project>
and heres the hibernate.reveng.xml file (As you can see all i need is the tables of one schema)
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering
SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
<hibernate-reverse-engineering>
<schema-selection match-schema="ABS_INP"/>
</hibernate-reverse-engineering>
And this the property file.
Code:
hibernate.dialect = org.hibernate.dialect.OracleDialect
hibernate.connection.driver_class = oracle.jdbc.driver.OracleDriver
hibernate.connection.url = jdbc:oracle:thin:@XXX.XXX.XX.XXX:XXXX:XXX
hibernate.connection.username = XXX
hibernate.connection.password = XXX
when i run ant in the root directory this is the output i get
------------------------
Buildfile: build.xml
BUILD SUCCESSFUL
Total time: 0 seconds
-------------------------
Additonally heres the folder structure
ROOT_DIR
-hibernate.reveng.xml
-helloworld.db.properties
-build.xm
-LIB
--classes12.jar
--freemarker.jar
--hibernate3.jar
--hibernate-tools.jar
-SRC
Thanx in advance