On Fri, 2005-02-18 at 18:44, Mike Wertheim wrote:
> I've been trying to use xdoclet’s “template” subtask to generate proxy
> classes based on some of my java classes.
> 
> 
> What I have found is that a Java file with no "package" statement gets
> transformed just fine. But if a Java file has a package statement (as
> 99% of them do!), then it is ignored by the template subtask.

Check the archive for the replies I made to Rob Griffin ("XDoclet fails
to generate JMX files") and Andreas Wuest ("portletdoclet generates only
empty portlet.xml") earlier in the month.  It's the same problem with
your fileset as they had.



Andrew.


> The java files are in a "src_core" directory that is in the same
> directory as the build.xml. So one file path might be
> src_core/com/mycompany/foo/bar/HiMom.java, and its package is
> com.mycompany.foo.bar. As an experiment, I tried changing the Java
> file's package line, and no change made it work, other than removing
> the package line entirely.
> 
> It occurred to me that perhaps I needed to add the "src_core"
> directory to some internal classpath somewhere, but didn't see any way
> to do that.
> 
>  
> 
> Can anyone explain what’s going on, and what the fix would be?
> 
>  
> 
>  
> 
> Here’s the build.xml:
> 
>  
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <project name="test" basedir="." default="help">
> 
>  
> 
>     <property name="lib.dir" location="${basedir}/lib"/>
> 
>     <property name="xdoclet.lib.dir" location="${basedir}/lib"/>
> 
>  
> 
>     <target name="generateproxy"> 
> 
>             <path id="xdoclet.lib.path"> <fileset dir="/xdoclet-1.2.2"
> includes="*.jar"/> </path>
> 
>  
> 
>             <taskdef name="xdoclet" classname="xdoclet.DocletTask"
> classpathref="xdoclet.lib.path" />
> 
>  
> 
>             <xdoclet destDir="/tmp" force="true">
> 
>                         <fileset
> dir="${basedir}/src_core/com/nimblefish/core/domain/campaign">
> 
>                                     <include name="*.java"/>
> 
>                         </fileset>
> 
>                         <template templateFile="${basedir}/proxy.xdt"
> destdir="${basedir}"
> 
>                                     destinationFile="{0}Proxy.java" />
> 
>             </xdoclet>
> 
>     </target>
> 
> </project>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to