Hi. I have opted for a different approach using ant. The build is successfull but nothing is ouput. Can someone please advise:
build.xml
Code:
<project default="" basedir=".">
<property name="domainobjects.dir" value="out"></property>
<property name="lib" value="lib"></property>
<path id="toolslib">
<path location="${lib}/hibernate-tools.jar" />
<path location="${lib}/hibernate3.jar" />
<path location="${lib}/freemarker.jar" />
<path location="${lib}/ojdbc14.jar" />
<path location="${lib}/commons-logging-1.0.4.jar" />
<path location="${lib}/dom4j-1.6.1.jar" />
<path location="${lib}/slf4j-api-1.5.8.jar" />
<path location="${lib}/slf4j-simple-1.5.8.jar" />
<path location="${lib}/commons-collections-2.1.1.jar" />
<path location="${lib}/hibernate-annotations.jar" />
<path location="${lib}/hibernate-commons-annotations.jar" />
<path location="${lib}/ejb3-persistence.jar" />
</path>
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib" />
<hibernatetool destdir="${domainobjects.dir}/generated">
<annotationconfiguration configurationfile="hibernate.cfg.xml" />
<hbm2hbmxml/>
</hibernatetool>
</project>
hibernate.cfg.xml
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:XE</property>
<property name="connection.username">user</property>
<property name="connection.password">pass</property>
<property name="default_schema">myschema</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
</session-factory>
</hibernate-configuration>