legerdemain (10) [Avatar] Offline
#1
Thanks again for clearing up the last problem. Works great. However, I seem to be having an issue that I'm sure is again obvious and I do apologize for taking up your time. Here is what I can't seem to figure out.

So now my source files are in src/com/mycompany/whatever/busobj/MyClass.java. The xdoclet task gets the files here, processes them, works great. However, I'm trying to have the output from my custom template tasks put in src/com/mycompany/whatever/dao/MyClassOutput.java. For some reason though, the output appears in the same folder that the input is in, the busobj class. If I change the destdir attribute, then the output appears in the folder I tell it to, but within that folder, xdoclet creates the com/mycompany/whatever/busobj structure and still puts the files in the busobj dir. Any ideas what I'm doing wrong? Here is an excerpt from my ant buildfile which I think is all you need. Thank you very much for the help.

<project name="JB" default="compile" basedir=".">

<property environment="env"/>
<property name="src.dir" value="${basedir}/src"/>

<target name="createDAOHibernate" depends="init">
<xdoclet destdir="${basedir}/dao" addedTags="@xdoclet-generated">
<fileset dir="${src.dir}" includes="**/*.java" />
<template acceptInterfaces="false" >
acceptAbstractClasses="false"
templateFile="createHibernateDAO.xdt"
destinationfile="{0}DAOHibernate.java" />
</xdoclet>
</target>

So, just for clarity, this will process the files now, but the output would go in (base.dir)/dao/com/mycompany/whatever/busobj/. (the package statements in the sources files are package com.mycompany.whatever.busobj; ). I simply want the files to be in (base.dir)/dao and thats it. Any thoughts? Thank you.
orb (16) [Avatar] Offline
#2
Re: Another package question.
Use packageSubstitution. Inside the xdoclet tag, add:

<packageSubstitution packages="busobj" substituteWith="dao" />