-->
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.  [ 5 posts ] 
Author Message
 Post subject: hbm2java using Ant
PostPosted: Tue Oct 07, 2003 2:16 pm 
Newbie

Joined: Fri Sep 26, 2003 6:17 am
Posts: 5
Location: Sydney, Australia
Hi,
I'm trying to modify build-hbm2java.xml file, which came with middlegen-hibernate plugin, so that I can specify the output folder. Specifying output folder can be done using --output option from commandline but I would like to do the same thing using Ant. What I did so far is I've added output option for java task but I got Access denied error. Does anyone know how to solve my problem?


Code:

    <target name="compile"
            description="Compiles hbm files to src directory."
            depends="clean">
        <mkdir dir="${src.dir}"/>      
        <!--
        <java classname="net.sf.hibernate.tool.hbm2java.CodeGenerator" fork="true" output="${src.dir}">                
        -->       
        <java classname="net.sf.hibernate.tool.hbm2java.CodeGenerator" fork="true" >                
       
            <classpath>
                <fileset dir="${hibernate.lib.dir}\context">
                    <include name="**/*.jar" />
                </fileset>
                <fileset dir="${hibernate.lib.dir}\global">
                    <include name="**/*.jar" />
                </fileset>
            </classpath>
            <!-- Mapping Files -->
            <!--
            <arg value="${mapping.files}"/>
            -->
         <arg value="${hbm.dir}/Flight.hbm.xml"/>
         <arg value="${hbm.dir}/Reservation.hbm.xml"/>
         <arg value="${hbm.dir}/Person.hbm.xml"/>
        </java>
    </target>



Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 07, 2003 2:29 pm 
Beginner
Beginner

Joined: Thu Sep 25, 2003 5:22 pm
Posts: 29
Location: NC
Check here:

http://forum.hibernate.org/viewtopic.php?t=924447

-Kat


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 07, 2003 7:04 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
An hbm2java ant task example is on the Middlegen page http://hibernate.bluemars.net/98.html, also we created a tools example for JAOO which includes the core tools at
http://www.hibernate.org/hib_docs/examples/.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 07, 2003 11:43 pm 
Newbie

Joined: Fri Sep 26, 2003 6:17 am
Posts: 5
Location: Sydney, Australia
Kat and David, thanks so much for helping me out. I didn't know my problem was already posted by you, Kat, a couple of days ago.

This middlegen-hibernate approach is great!!!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 08, 2003 1:37 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
mryosuke wrote:
This middlegen-hibernate approach is great!!!

Thanks. Glad to see your finding it usefull.


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

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.