> > 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.
> 
> How about just using something like
> <packageSubstitution packages="{0}.impl" substituteWith="{0}"/>
> <packageSubstitution packages="{0}" substituteWith="{0}.interfaces"/>
> <packageSubstitution packages="{0}.ejb,{0}.beans"
> substituteWith="{0}.interfaces"/>
> i.e. don't worry about substituting different levels {1}, {2}, {LO}
etc.
> just have something there as a placeholder for the matched text so we
> don't have an empty string for either of the parameters?  That keeps
it
> relatively simple.  It gets a bit ambiguous with
packages="{0},{0}.impl",
> but I guess we'd just take the first match and skip the rest.

Well, the only drawback of your proposal is that you have to list the
package names if you want to ../ in package hierarchy:

<packageSubstitution packages="{0}.impl" substituteWith="{0}"/>

Now what if you have com.foo.wareouse, com.foo.bookkeeping and so on and
want to put interfaces in com.foo.interfaces? You have to list them all
like this:

<packageSubstitution packages="{0}.warehouse,{0}.bookkeeping"
substituteWith="{0}.interfaces"/>

I really think it's a common practice to put interfaces in a core
package and put implementations somewhere else. So I don't think this
proposal is good enough (yet). And what if you want it one level higher
(say com.interfaces)? You can't.

Thoughts? Ideas?

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

Reply via email to