I'm trying to use the hibernate/jboss and xdoclet/hibernate tutorials to create simple .hbm.xml files. Although jboss-service.xml gets created, the .hbm.xml file doesn't. Getting this to work is a real time-killer. I would greatly appreciate someone pointing out my mistake. I posted the important stuff down below. Many thanks to all who try.
Regards,
Itchy
HERE ARE THE TUTORIALS that I mentioned:
http://hibernate.bluemars.net/72.html
http://www.hibernate.org/66.html
HERE IS PART OF MY build.xml (only the important stuff):
<property name="build.hibernate" location="${build.resources}/hibernate/com/sar/hibernate"/>
<property name="src.business" location="${src}/business/com/jzudi/business"/>
<target name="xdoclet" depends="jar"
description="Generates Hibernate class descriptor files.">
<!-- Defines the hibernatedoclet task for generating JBoss-Service -->
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask">
<classpath refid="xdoclet.classpath"/>
</taskdef>
<!-- Execute the hibernatedoclet task -->
<hibernatedoclet
destdir="build.hibernate"
excludedtags="@version,@author,@todo"
force="true"
verbose="true"
mergedir="build.hibernate">
<fileset dir="${src.business}">
<include name="*.java"/>
</fileset>
<hibernate version="2.0"/>
</hibernatedoclet>
</target>
HERE IS MY CLASS:
package com.jzudi.business;
import java.util.Set;
import java.util.Collections;
/** A business entity class representing an Unternehmen.
*
* @author IO
* @since 1.0
* @hibernate.class table="Unternehmens"
*/
public class Unternehmen {
private String unternehmenID;
private String unternehmenName;
private String ansprechspartner;
private String strasse;
private String plz;
private String ort;
/** The customer's orders set.*/
private Set unternehmens = Collections.EMPTY_SET;
/** The default construtor for Hibernate to instantiate with.*/
public Unternehmen(){
}
/** The getter method for the Unternehmens.
*
* @hibernate.set role="unternehmens"
*
* @hibernate.collection-key column="<UNTERNEHMEN_ID"
*
* @hibernate.collection-one-to-many class="Unternehmen"
*/
public Set getUnternehmens() {
return(unternehmens);
}
/** The setter method for this Customer's orders.*/
public void setUnternehmens(Set object) {
unternehmens = object;
}
/**
* @hibernate.id generator-class="native" type="string" column="Unternehmen_ID"
* @return String
*/
public String getUnternehmenID() {
return (unternehmenID);
}
/**
* @hibernate.property column="Unternehmen_Name" type="string"
* @return String
*/
public String getUnternehmenName() {
return (unternehmenName);
}
/**
* @hibernate.property column="Ansprechspartner" type="string"
* @return String
*/
public String getAnsprechspartner() {
return (ansprechspartner);
}
/**
* @hibernate.property column="Strasse" type="string"
* @return String
*/
public String getStrasse() {
return (strasse);
}
/**
* @hibernate.property column="PLZ" type="string"
* @return String
*/
public String getPLZ() {
return (plz);
}
/**
* @hibernate.property column="Ort" type="string"
* @return String
*/
public String getOrt() {
return (ort);
}
/**
* @param string
*/
private void setUnternehmenID(String string) {
unternehmenID = string;
}
/**
* @param string
*/
public void setUnternehmenName(String string) {
unternehmenName = string;
}
/**
* @param string
*/
public void setAnsprechspartner(String string) {
ansprechspartner = string;
}
/**
* @param string
*/
public void setStrasse(String string) {
strasse = string;
}
/**
* @param string
*/
public void setPLZ(String string) {
plz = string;
}
/**
* @param set
*/
public void setOrt(String string) {
ort = string;
}
}