ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Wilson" <>
Subject Re: copy contents of a directory based on a dirset
Date Mon, 12 Nov 2007 18:45:46 GMT
I have used the ant 'war' element and believe there is an equivallent
'ear' element too - it might help you?  I then use the fileset with an
include (see below)...

	<target name="War" depends="Initialize, Compile">
		<echo message="Generating War file..."/>
		<war destfile="${warfile}" webxml="${web-inf.dir}/web.xml">
			<classes dir="${src}" includes="**/*.xml" />
			<classes dir="${deploy}" includes="**/*.class" />
			<fileset dir="${webcontent.dir}">
				<include name="**/*"/>
			<!-- Note that only the flat directory structure is copied, I
			     think this is a JSP spec, but also this means any files
			     we dont want copied can be put in the sub-directory
			     called 'build-time-only'. -->
			<lib dir="${web-lib.dir}" includes="*.jar"
			<lib dir="${common-lib}" includes="*.jar" />

On Nov 12, 2007 4:17 PM, Eric Wood <> wrote:
> I have a dirset that represents the contents of a j2ee application:
> + -- WAR
> This is an application that only contains a WAR, but there may be other
> components such as utility JARs, MDBs, etc.
> The EAR's build.xml has the following dirset:
> <dirset dir=".." id="ear.components" >
>    <include name="WAR"/>
> </dirset>
> I want to use this dirset to package the war file into my EAR.  The
> WAR's build.xml puts the WAR file into a subdirectory called "dist.
> + -- WAR
>       +--dist
>            +-- x.war
> Is there a way to use this dirset to say copy the contents of the
> directory's dist folder to the EAR for packaging?
> Any help would be greatly appreciated.

Rob Wilson

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message