-->
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.  [ 2 posts ] 
Author Message
 Post subject: generating hibernate mapping files using xdoclet tags
PostPosted: Sun Oct 02, 2005 1:40 pm 
Newbie

Joined: Sun Oct 02, 2005 1:18 pm
Posts: 3
I am new to hibernate, I have just created a simple class and trying to build the hibernate mapping file using ant task. The ant task gets completed without any error but doesn't generate any mapping file.

Source code for the java object:
Code:
/**
* @hibernate.class table="PARTY_TB"
*/
public class Party
{

    long partyId;
    String name;

    /**
     * @hibernate.id generator-class="native"
     */
    public long getPartyId()
    {
        return partyId;
    }

    public void setPartyId(long partyId)
    {
        this.partyId = partyId;
    }

    /**
     * @return
     * @hibernate.property column="NAME" length="30"
     */
    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }
}




Ant task
Code:
     <path id="project.classpath">
         <fileset dir="${extjars}" includes="*.jar"/>
     </path>

     <taskdef name="hibernatedoclet"
             classname="xdoclet.modules.hibernate.HibernateDocletTask">
         <classpath refid="project.classpath"/>
     </taskdef>

     <target name="generate-hbm-mapping">
         <hibernatedoclet destdir="${generated}" force="true" verbose="true">
             <fileset dir="${src}">
                 <include name="**/*.java"/>
             </fileset>
         </hibernatedoclet>
     </target>


Ant log
Code:
build.xml
description
property
property
property
property
path
taskdef
generate-hbm-mapping
hibernatedoclet

Ant build completed successfully at 7:16:24 PM in 5s

Can anyone help me with this??


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 03, 2005 8:32 am 
Newbie

Joined: Thu Sep 01, 2005 12:39 pm
Posts: 16
Location: porto alegre, brazil
I can send you my ant task for you to modify....just send me an email ( throw my profile )

_________________
Bsc. Tiago Martins
software engineer

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.