-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Package designation for exporters
PostPosted: Mon Jul 21, 2008 10:59 pm 
Beginner
Beginner

Joined: Mon Mar 17, 2008 2:50 pm
Posts: 24
I need to generate three sets of code from my HBM files, i.e for each file I need to create
    POJO
    DAO
    WebService
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.