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 logCode:
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??