ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KC Baltz <KBa...@responsenetworks.com>
Subject RE: regular expression stuff
Date Wed, 28 Mar 2001 14:54:20 GMT
I'm guessing:

<copy todir="build" >
	<fileset dir="firstcomponent" >
		<include name="webdocs/**/*.jsp" >  
	</fileset>
	<fileset dir="secondcomponent" > 
		<include name="webdocs/**/*.jsp" > 
	</fileset>
</copy>


If you wanted to generalize the number of components, I'm not sure how.

K.C.

> -----Original Message-----
> From: Rob van Oostrum [mailto:rvanoostrum@ezgov.com]
> Sent: Wednesday, March 28, 2001 9:37 AM
> To: ant-user@jakarta.apache.org
> Subject: 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
> 

Mime
View raw message