XDoclet will search through ALL of your java files in the specified file set.
Generally I have a root source directory, called src actually, right off of the base directory ${basedir}
Under src I divide into
Quote:
java
resources
configuration
etc.
As might be seen in an ant build.xml:
java.src.dir=${basedir}/src/java
<fileset dir="${basedir}/src/java">
<include name="**/*.java"/>
</fileset>
Let ant and xdoclet deal with sorting out the files that are and are not of interest to XDoclet.
XDoclet will write out the hbm.xml files into a directory structure exactly matching their package names, ie, for a class named SomeBlah.java:
Code:
package com.blah;
/**
* @hibernate.class
*/
public class SomeBlah {
protected Long id;
/**
* @hibernate.id
*/
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return this.id;
}
}
will be written into your target/com/blah.
I think it's also a good idea to set a value such as:
xdoclet.target.dir=${basedir}/target/xdoclet
and in some common init task prior to executing xdoclet you will create that directory.
You can include that directory in your java builds, jar builds, you can copy these generated-source files anywhere you like.[/code]