Discussion:
[Xdoclet-devel] [XDoclet-JIRA] Created: (XDT-1505) You cannot use the same doclet twice
n***@atlassian.com
2005-08-13 12:39:11 UTC
Permalink
Message:

A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1505

Here is an overview of the issue:
---------------------------------------------------------------------
Key: XDT-1505
Summary: You cannot use the same doclet twice
Type: Bug

Status: Open
Priority: Critical

Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown

Project: XDoclet
Components:
Core
Versions:
1.2.3

Assignee: xdoclet-devel (Use for new issues)
Reporter: Kenney Westerhof

Created: Sat, 13 Aug 2005 9:37 AM
Updated: Sat, 13 Aug 2005 9:37 AM

Description:
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.





---------------------------------------------------------------------
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
Fiann O'Hagan (JIRA)
2005-09-29 13:23:12 UTC
Permalink
[ http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1505?page=comments#action_17291 ]

Fiann O'Hagan commented on XDT-1505:
------------------------------------

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>
Post by n***@atlassian.com
You cannot use the same doclet twice
------------------------------------
Key: XDT-1505
URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1505
Project: XDoclet
Type: Bug
Components: Core
Versions: 1.2.3
Reporter: Kenney Westerhof
Assignee: xdoclet-devel (Use for new issues)
Priority: Critical
When you use the same doclet task twice (in a build.xml file,
or 'embedded'), SubTasks shared between the two definitions
<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.
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Jasper Rosenberg (JIRA)
2006-02-21 11:40:00 UTC
Permalink
[ http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1505?page=comments#action_17501 ]

Jasper Rosenberg commented on XDT-1505:
---------------------------------------

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
Post by n***@atlassian.com
You cannot use the same doclet twice
------------------------------------
Key: XDT-1505
URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1505
Project: XDoclet
Type: Bug
Components: Core
Versions: 1.2.3
Reporter: Kenney Westerhof
Assignee: xdoclet-devel (Use for new issues)
Priority: Critical
When you use the same doclet task twice (in a build.xml file,
or 'embedded'), SubTasks shared between the two definitions
<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.
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Konstantin Sobolev (JIRA)
2006-03-15 22:26:01 UTC
Permalink
[ http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1505?page=all ]

Konstantin Sobolev updated XDT-1505:
------------------------------------

Attachment: xdt1505.patch

Proposed patch
Post by n***@atlassian.com
You cannot use the same doclet twice
------------------------------------
Key: XDT-1505
URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1505
Project: XDoclet
Type: Bug
Components: Core
Versions: 1.2.3
Reporter: Kenney Westerhof
Assignee: xdoclet-devel (Use for new issues)
Priority: Critical
Attachments: xdt1505.patch
When you use the same doclet task twice (in a build.xml file,
or 'embedded'), SubTasks shared between the two definitions
<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.
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Mike Haller (JIRA)
2007-02-15 14:16:04 UTC
Permalink
[ http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1505?page=all ]

Mike Haller updated XDT-1505:
-----------------------------

Attachment: xdoclet-1.2.3-patched.jar

XDoclet v1.2.3 with patch of XDT-1505
Post by n***@atlassian.com
You cannot use the same doclet twice
------------------------------------
Key: XDT-1505
URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1505
Project: XDoclet
Type: Bug
Components: Core
Versions: 1.2.3
Reporter: Kenney Westerhof
Assignee: xdoclet-devel (Use for new issues)
Priority: Critical
Attachments: xdoclet-1.2.3-patched.jar, xdt1505.patch
When you use the same doclet task twice (in a build.xml file,
or 'embedded'), SubTasks shared between the two definitions
<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.
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Xavier Chatelain (JIRA)
2009-04-16 17:16:28 UTC
Permalink
[ http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xavier Chatelain updated XDT-1505:
----------------------------------

Attachment: xdoclet-1.2.3-patched-jdk14.jar

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).
Post by n***@atlassian.com
You cannot use the same doclet twice
------------------------------------
Key: XDT-1505
URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1505
Project: XDoclet
Issue Type: Bug
Components: Core
Affects Versions: 1.2.3
Reporter: Kenney Westerhof
Assignee: xdoclet-devel (Use for new issues)
Priority: Critical
Attachments: xdoclet-1.2.3-patched-jdk14.jar, xdoclet-1.2.3-patched.jar, xdt1505.patch
When you use the same doclet task twice (in a build.xml file,
or 'embedded'), SubTasks shared between the two definitions
<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.
--
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Loading...