I need to generate three sets of code from my HBM files, i.e for each file I need to create
These files suppose to live in separate packages.
I am yet to find out how to generate WebService but I can generate POJO and DAO classes. However, Hibernate tools places them both into the same package, specified in the <hibernate-mapping>.
I tried to fiddle with the exporter properties but can't find the right one.
Documentation is pretty numb about them.
Although, I tried to change freemarker templates that are used in the generation. I extracted them from the jar files and placed into the special directory in my project.
Code:
<hibernatetool destdir="${build.java.dir}" templatepath="${tmpl.hibernate.dir}">
<classpath>
<pathelement location="${build.java.dir}" />
</classpath>
<configuration configurationfile="${build.conf.dir}/su2Hibernate.cfg.xml"/>
<hbm2java jdk5="true" ejb3="false"/>
<hbm2dao destdir="${build.java.dir}" templatepath="${tmpl.hibernate.dir}">
</hbm2dao>
</hibernatetool>
It does not work, Hibernate tools still picking templates from the jar file.
If someone can answer
How to change package name for various exporters?
How to make hibernatetool to pick my custom template?
How to create my own (web service) exporter ?(if you have one laying around and can share it - it will be great).
Your help will be very-very-very appreciated.