ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burgess, Benjamin" <>
Subject RE: War task to include multiple lib files?
Date Tue, 30 Aug 2005 13:21:02 GMT
Lib is just a FileSet.  In the manual it states:

"The <fileset>, whether implicit or explicit in the directory-based
task, also acts as an <and> selector container. This can be used to
create arbitrarily complicated selection criteria for the files the task
should work with. See the Selector documentation for more information."

In other words, what you have is means "all files in ${lib.dir} which
have the filename a.jar AND b.jar" which is of course nothing.

Instead you should have:

	<lib dir="${lib.dir}">
		<include name="a.jar"/>
		<include name=="b.jar"/>

Ben Burgess

-----Original Message-----
From: Petar Tahchiev [] 
Sent: Tuesday, August 30, 2005 2:12 AM
To: Ant Users List
Subject: Re: War task to include multiple lib files?

On 30/08/05, wolverine my <> wrote:
> Hi!
> I'm using Ant 1.6.5 and I have the following Ant task:
> <war destfile="${dist.dir}/${ <>
> webxml="${
> web.dir}/WEB-INF/web.xml">
> <classes dir="${build.dir}/WEB-INF/classes"/>
> <lib dir="${lib.dir}">
> <filename name="a.jar"/>
> <filename name="b.jar"/>
> </lib>
> <metainf dir="${web.dir}/WEB-INF">
> <filename name="context.xml"/>
> </metainf>
> </war>
> The Ant task is executed successfully but there is no WEB-INF/lib
> in the WAR file.
> However if I delete "b.jar" from the <lib> then the WAR will contains
> WEB-INF/lib/a.jar
> What could be the problem? Can we specify more than one file for
> lib attribute defines a fileset, so in order to insert more than one
you have to use:
<lib dir="">
<include name=""/>
<exclude name=""/>

or just <lib dir=""/> where you point the directory that your libraries

Regards, Petar!

This message, including any attachments, contains confidential information intended for a
specific individual and purpose, and is protected by law.  If you are not the intended recipient,
please contact sender immediately by reply e-mail and destroy all copies.  You are hereby
notified that any disclosure, copying, or distribution of this message, or the taking of any
action based on it, is strictly prohibited.

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

View raw message