[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

regular expression stuff



I have a situation where I run an ant copy instruction on a directory tree that
(from the context dir of the ant copy instruction) looks something like this:

firstcomponent/webdocs/one/*.jsp
firstcomponent/webdocs/two/*.jsp
firstcomponent/webdocs/three/misc/*.jsp
secondcomponent/webdocs/one/*.jsp
secondcomponent/webdocs/two/*.jsp
secondcomponent/webdocs/three/*.jsp

My build directory structure would then contain one directory called webdocs, and I
would want to copy all contents of all webdocs directories above to this one webdocs
directory, while preserving the *partial* directory structure:

build/webdocs/one/*.jsp
build/webdocs/two/*.jsp
build/webdocs/three/*.jsp
build/webdocs/three/misc/*.jsp

how would the ant copy instruction for this look like? I've fiddled around with the
regular expressions stuff and can't seem to get it to work right. I really want to
do this with one generic instruction, to avoid maintenance on the build.xml file
every time I add/remove components to a project.

thanks for the help,

Rob