#22 Improve <packageSubstitution/> element

open
nobody
None
5
2001-11-28
2001-11-28
No

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,
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...

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.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks