Andrew and all,
Regarding [ #486505 ] Improve element:
What's your suggestion?
Here is the request with my comments inline:
--------
In its current form, the packageSubstition nested
element for the ejbdoclet task isn't quite flexible
enough for how I've got my packages arranged. It's
fine if the packages are one the same level e.g.
com.foobar.somebean.ejb ->
com.foobar.somebean.interfaces, but if you want the
interfaces stored at a different level it's cumbersome.
We'd use com.foobar.somebean.impl ->
com.foobar.somebean, but if I use <packageSubstitution
packages="impl" substituteWith=""/> then choosePackage
() will leave a trailing '.' on the end. Similarly,
<ara>Is removing the trailing dot a good solution?</ara>
someone else on the xdoclet-user was saying recently
they'd use com.foobar.somebean ->
com.foobar.somebean.interfaces, but if they tried
<packageSubstitution packages=""
substituteWith="interfaces"/> it would end up looking
for packageName.endsWith("."), which I doubt would
find many matches...
<ara>Is interpreting packages="" as 'thepackage.substituteWithValue a
good solution? "" should be interpreted as whatever package.</ara>
It can be worked around with multiple entries like
<packageSubstitution packages="bean1.impl"
substituteWith="bean1"/>
<packageSubstitution packages="bean2.impl"
substituteWith="bean2"/>
...
but that takes more maintenance and becomes unwieldy
as the number of packages grows.
--------
The best solution is something like Ant's **/*.java blabla stuff of
filesets. But what does <packageSubstitution packages="**.ejb.**"
substituteWith="interfaces"/> mean?! Should it result in
com.foo.ejb.subsystem.interfaces or com.foo.ejb.interfaces? I mean the
"root" is not clear. So I propose something like this:
"{1}" means current package minus last sub-package: com.foo->com
So for com.foobar.somebean.ejb->com.foobar.somebean.interfaces:
<packageSubstitution packages="" substituteWith="{1}.interfaces"/>
And for com.foobar.somebean.impl->com.foobar.somebean:
<packageSubstitution packages="" substituteWith="{1}"/>
And for com.foobar.somebean.impl->com.foobar.intf:
<packageSubstitution packages="" substituteWith="{2}.intf"/>
And for com.foobar.somebean->com.foobar.interfaces.somebean:
<packageSubstitution packages="" substituteWith="{1}.interfaces.{L0}"/>
Where L0 mean Last sub-package.
Or maybe a separate root=".." parameter where .. mean {2}?
Ara.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel