Issue Details (XML | Word | Printable)

Key: XDT-1505
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: xdoclet-devel (Use for new issues)
Reporter: Kenney Westerhof
Votes: 10
Watchers: 10
Operations

If you were logged in you would be able to see more operations.
XDoclet

You cannot use the same doclet twice

Created: 13/Aug/05 09:37 AM   Updated: 16/Apr/09 12:15 PM
Component/s: Core
Affects Version/s: 1.2.3
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Java Archive File xdoclet-1.2.3-patched-jdk14.jar (144 kB)
2. Java Archive File xdoclet-1.2.3-patched.jar (139 kB)
3. Text File xdt1505.patch (2 kB)



 Description  « Hide
When you use the same doclet task twice (in a build.xml file,
or 'embedded'), SubTasks shared between the two definitions
will always be the same. I.e.:

<target>

  <!-- will create sessoin beans in dir A. -->
  <ejbdoclet destDir="A">
    <session/>
  </ejbdoclet>


  <!-- will create session beans in dir A also! -->

  <ejbdoclet destDir="B">
    <session/>
  </ejbdoclet>

  <!-- will create session beans in dir C -->
  <ejbdoclet destDir="C">
    <session destDir="C"/>
  </ejbdoclet>

SubTask.init() checks for null values (for destDir e.a.).
If they're null, it inherits them from the parent DocletTask.

If they're not null (the second time it gets called), they don't
get reconfigured.

Having a flag in SubTask doesn't solve this - the subtaskmap should
be reset, so all fields are properly reconfigured, or after execute
is finished, the fields should be set to null.

I know there are some related issues that are solved too by this.




 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Fiann O'Hagan added a comment - 29/Sep/05 10:17 AM
We have found this issue with the <jmxdoclet> task too.

<jmxdoclet destdir="${output1}" excludedtags="@version,@author,@todo">
<fileset dir="${build.src}">
<include name="**/common/*" />
</fileset>
<mbeaninterface/>
<mx4jdescription/>
</jmxdoclet>
     <!-- Next task also generates to output1! -->
<jmxdoclet destdir="${output2}" excludedtags="@version,@author,@todo">
<fileset dir="${build.src}">
<include name="**/server/*" />
</fileset>
<mbeaninterface/>
<mx4jdescription/>
</jmxdoclet>

Jasper Rosenberg added a comment - 21/Feb/06 07:37 AM
This bug "fix" is actually the culprit: http://opensource2.atlassian.com/projects/xdoclet/browse/XDT-879

If I make the same change as in XDT-879 on the 1.2.2 branch, it breaks in the same way as 1.2.3

Konstantin Sobolev added a comment - 15/Mar/06 06:24 PM
Proposed patch

Mike Haller added a comment - 15/Feb/07 08:15 AM
XDoclet v1.2.3 with patch of XDT-1505

Xavier Chatelain added a comment - 16/Apr/09 12:15 PM
And here is XDoclet v1.2.3 with the same patch but compiled with a JDK 1.4 (the other patch only works for JDK 1.5 projects).