Hi I'm using xDoclet 2 with HIbernate 3.
I'm trying to get a simple file generated based on
http://www.hibernate.org/338.html.
Here is my class:
Code:
package com.abc.def.domain;
import java.io.Serializable;
/*
* @hibernate.class table = "country"
*/
public class Country implements Serializable {
static final long serialVersionUID = 5895819393L;
private Integer id;
private String name;
/**
* @return Returns the id.
* @hibernate.id column="id" generator-class="identity"
*/
public Integer getId() {
return id;
}
/**
* @param id The id to set.
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return Returns the name.
* @hibernate.property
*/
public String getName() {
return name;
}
/**
* @param name The name to set.
*/
public void setName(String name) {
this.name = name;
}
}
Here is my build.xml
Code:
<project name="hibernateXdoc" default="hibernatedoclet" basedir=".">
<property name="src.dir" value="${basedir}/src"/>
<property name="build.dir" value="${basedir}/bin"/>
<property name="hbm.dir" value="${basedir}/src/com/abc/def/domain"/>
<target name="hibernatedoclet"
description="Generate Persistence and form classes">
<taskdef name="xdoclet"
classname="org.xdoclet.ant.XDocletTask">
<classpath>
<fileset dir="${basedir}">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>
<xdoclet>
<!-- defines the file handled by xdoclet2 -->
<fileset dir="${src.dir}">
<include name="**/com/abc/def/domain/*.java"/>
</fileset>
<!-- defines the processing of a plugin -->
<component
classname="org.xdoclet.plugin.hibernate.HibernateMappingPlugin"
destdir="${src.dir}"
version="3.0"
/>
</xdoclet>
</target>
</project>
and here's my output when i run it:
Code:
Buildfile: C:\xxx\xxx\hibernateXdoc\build.xml
hibernatedoclet:
[xdoclet] Running org.xdoclet.plugin.hibernate.HibernateMappingPlugin
BUILD SUCCESSFUL
Total time: 1 second
As you can see... there is no file generated. Am I missing something?
Thanks in advance