Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to generat .hbm.xml files via ant task

 
Bob Kimmel
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a snippet from my build:

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

<target name="generate-mappings" depends="compile"
<hibernatedoclet
destdir="${build.classes.resources}"
excludetags="@version,@todo,@see,@desc
addtags="@author,@xdoclet-generated at ${TODAY}"
force="true"
mergedir="${build.classes.resources}"
verbose="false"
<fileset dir="${package.src.dir}"
<include name="*.java"/>
<include name="./exceptions/*.java/>
<include name="./dao/*.java"/>
</fileset>
<hibernate version="2.1" destination file="{0}.hbm.xml"/>

<jbossservice
destdir="${build.classes.resources}"
serviceName="Hibernate"
jndiName="jdbc/Sybase"
dataSource="jdbc/Sybase"
dialect="net.sf.hibernate.dialect.SybaseDialect"
useOuterJoin="true"
transactionManagerStrategy="net.sf.hibernate.transaction.JBossTransactionManagerLookup"
transactionStategy="net.sf.hibernate.transaction.JTATransactionFactory"
userTransactionName="UserTransaction"
depends="jboss.jca:service=LocalTxCM, name=DefaultDS" />
</hibernatedoclet>
</target>

The jboss-service.xml is generated but their are no Mapping Resource entries as there were no .hbm.xml files generated either. I thought I read to the contrary but do I still need to create a hibernate.cfg.xml and list all the .hbm.xml files that will be produced? I would think not since in the end I will be packing these files into the hibernateStartup.jar with the jboss-service.xml. Any help? By the way I did use the @hibernate.class tag and others in all the classes I wrote. Thanks, I'm stuck.
NEED HELP ASAP
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic