Thanks for your reply, 

I think I have detected the problem. The jar contains only .class files which 
don't contain the javadoc tags ! 


-----Original Message-----
From: Andrew Stevens [mailto:[EMAIL PROTECTED]
Sent: mardi 4 avril 2006 8:44
To: xdoclet-user@lists.sourceforge.net
Subject: Re: [Xdoclet-user] Parsing java sources which are included in
ajar archive


On Mon, 2006-04-03 at 08:22, Jérémie Balcaen wrote:
> I have a Java class Clazz1 which is a subclass of Clazz2 (public Clazz1 
> extends Clazz2) but Clazz2 is in a jar file (myjarfile-1.0.jar).
> In Clazz2, there are some tags like in Clazz1 which must provide a final 
> file. But the tags in Clazz2 are refused to consider.
> 
> I have read some documents which recommend to unpack the java sources but it 
> doesn't work :
> 
>   <!-- *******************************************************************  
> --> 
>   <!-- target to unpack the java sources  --> 
>   <!-- *******************************************************************  
> --> 
>   <target name="prepare-xdoclet"> 
>       <unjar dest="${src.xdoclet}" overwrite="false"> 
>                       <fileset dir="${maven.repo.local}/cwsoft/jars/"> 
>                       <include name="myjarfile-1.0.jar"/> 
>                       </fileset> 
>                       <patternset> 
>                       <include name="**/*.java"/> 
>                       </patternset> 
>       </unjar> 
>   </target> 

Does this part work properly i.e. after running the build script have
the sources been successfully extracted.  Is their package hierarchy
rooted in the ${src.xdoclet} directory? (it ought to be, from looking at
the above, but it doesn't hurt to make sure).

> <target name="mapping" depends="prepare-xdoclet">
>         <taskdef name="mappingdoclet" 
> classname="com.cwsoft.xdoclet.dao.DaoDocletTask">
>                   <classpath>
>                       <fileset dir="${maven.repo.local}/xdoclet/jars/">
>                           <include name="*.jar" />
>                       </fileset>
>                          <fileset 
> dir="${maven.repo.local}/commons-collections/jars/">
>                       <include name="commons-collections-3.1.jar" />
>                     </fileset>
>                     <fileset dir="${maven.repo.local}/commons-logging/jars/">
>                       <include name="commons-logging-1.0.4.jar" />
>                     </fileset>
>                     <fileset dir="${maven.repo.local}/log4j/jars/">
>                       <include name="log4j-1.2.8.jar" />
>                     </fileset>
>                  </classpath>
>           </taskdef>
>               
>          <mappingdoclet destDir="${src.java-generated.dir}">
>                 <fileset dir="${src.xdoclet}">
>                           <include name="**/businessobject/*.java" />
>                </fileset>
>               <fileset dir="${src.dir}">
>                       <include name="**/businessobject/*.java" />
>               </fileset>
>                       
>               <mapping/>
>                                             
>       </mappingdoclet>
>  </target>

Hmm... non-standard xdoclet task and subtask.  Perhaps it's a bug in
those, but you'll have to take that up with their authors (or, with
their permission, post the code here in case we can spot anything
obviously wrong with it).

The <fileset dir="${src.xdoclet}"> looks okay assuming the extraction
worked properly.  I assume the package hierarchy does include a
"businessobject" directory (case sensitive!) containing the java source
files in question (and not in a further subdirectory)?  Likewise for the
ones in ${src.dir}?  You say Class1 subclasses Class2 - does Class2
extend anything else? (e.g. an EJB type?)  If so, you may need to add
that to the taskdef's classpath in order for XDoclet to realise Class1
is to be processed.  Or, for all I know, your custom task/subtask might
filter out only certain class types - without the source I can only
guess.


Andrew.



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to