The following comment has been added to this issue:

     Author: René Zanner
    Created: Tue, 29 Mar 2005 2:29 AM
       Body:
To further clarify this issue, I will add a small sample from my project.

I want to use the DocletTask with a custom template file and "per class" 
generation ({0} pattern in "destinationFile" attribute).

I do this using the following ANT code:

<doclet destDir="${project.basedir}/build/classes/ejb2">
  <fileset dir="${project.basedir}/modules" includes="**/*Impl.java"/>
  <template 
templateFile="${project.basedir}/ant/tools/xdoclet/templates/test.xdt" 
                destinationFile="{0}Bean.java"/> 
</doclet>

I have several modules for which I want to automatically generate some EJB 
classes (package "ejb2") based on some POJO classes (arbitrary packages).

My project is structured into several modules located in folders below the path 
${project.basedir}/modules/ (e.g. userservice, customerservice etc.). 
Below those modules folders are several sub folders, one of those the src/ 
folder containing my *Impl.java classes to be used as basis for the generation 
by the DocletTask.

The "_sourceSetClassNames" map in the XJavaDoc class will contain the whole 
folder structure of the ANT fileset as package name. In my example it would be 
the package name with a leading "src.". Since this does not equal the real 
package name of the java class, this class will not be considered in the 
generation.

I see that this bug somehow is related to the whole architecture of the 
XJavaDoc parser, but maybe someone more expert in this area can fix it.

I could use several filesets where the "dir" attribute would be the "src/" 
folder below my modules specific sub folder, but that wouldn't be very generic, 
since I have to add a fileset entry for each module:

<doclet destDir="${project.basedir}/build/classes/ejb2">
  <fileset dir="${project.basedir}/modules/userservice/src" 
includes="**/*Impl.java"/>
  <fileset dir="${project.basedir}/modules/customerservice/src" 
includes="**/*Impl.java"/>
  <template 
templateFile="${project.basedir}/ant/tools/xdoclet/templates/test.xdt" 
                destinationFile="{0}Bean.java"/> 
</doclet>

Hope I could clarify the issue and would like to see it fixed (already voted).
---------------------------------------------------------------------
View this comment:
  
http://opensource.atlassian.com/projects/xdoclet/browse/XJD-9?page=comments#action_16201

---------------------------------------------------------------------
View the issue:
  http://opensource.atlassian.com/projects/xdoclet/browse/XJD-9

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XJD-9
    Summary: XJavadoc no longer works with single files & partial java trees
       Type: Bug

     Status: Open
   Priority: Blocker

 Original Estimate: 0 minutes
 Time Spent: Unknown
  Remaining: 0 minutes

    Project: XJavaDoc

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: Konstantin Pribluda

    Created: Tue, 10 Dec 2002 3:28 AM
    Updated: Tue, 29 Mar 2005 2:29 AM
Environment: All

Description:
Well, XDoclet is no longer  able to load source set 
where file names do not reflect package hierarchy.

This happens because of:

- when source set is added, it assumes that names do
reflect package hierarchy.
- while attempting to exctract source classes from xjavadoc,
it uses those incorrect names to get files & parse them
( with success ), but later they are added to maps/hashes
under qualified names that were resolved during parsing. 
So getXClass() fails...


This feature is important for GUI & Plugins - they need
to be able to edit single file, of subtree...


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
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-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to