Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

In Ant how do you exclude a directory from copy or zip

Thread view: 
elektrophyte - 30 Sep 2005 20:18 GMT
I understand from the Ant manual how to create a <fileset> with nested
<exclude> elements. I can get it to exclude files that have names
matching a given pattern.

I would like to exclude certain entire directories. Not just the files
within the directory (that could be done with "<exclude
name="**/DIR_NAME/*"></exclude>"). I would like to exclude even the
directory itself from the root.

I've tried name="DIR_NAME".

I've considered using a "DirSet" instead of a "fileset" but it appears
that the copy and zip tasks do not support the DirSet element.

Thanks in advance for any help with this.

E
elektrophyte - 30 Sep 2005 20:31 GMT
I figured it out.

<exclude name="**/DIR_NAME/**" />

I'd still appreciate any comments on a better/more efficient approach.

Thanks,

E
Alan Krueger - 02 Oct 2005 01:29 GMT
> I figured it out.
>
> <exclude name="**/DIR_NAME/**" />
>
> I'd still appreciate any comments on a better/more efficient approach.

What happens if you do this?

<exclude name="**/DIR_NAME"/>
Roedy Green - 02 Oct 2005 03:12 GMT
><exclude name="**/DIR_NAME"/>

That is not kosher XML is it?
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Owen Jacobson - 02 Oct 2005 04:39 GMT
>><exclude name="**/DIR_NAME"/>
>
> That is not kosher XML is it?

Looks fine to me...  tag delimiter, tag identifier, attribute identifier,
attribute delimiter ('='), quoted string ("**/DIR_NAME"), terminating
slash for an empty tag, tag delimiter.

It just means an exclude element with name="**/DIR_NAME" and no content.

-Owen
Roedy Green - 02 Oct 2005 05:35 GMT
>Looks fine to me...  tag delimiter, tag identifier, attribute identifier,
>attribute delimiter ('='), quoted string ("**/DIR_NAME"), terminating
>slash for an empty tag, tag delimiter.

The reason I say that is when I did XHTML validation, it insisted on a
space before  />
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Alan Krueger - 02 Oct 2005 16:31 GMT
>>Looks fine to me...  tag delimiter, tag identifier, attribute identifier,
>>attribute delimiter ('='), quoted string ("**/DIR_NAME"), terminating
>>slash for an empty tag, tag delimiter.
>
> The reason I say that is when I did XHTML validation, it insisted on a
> space before  />

As I understand it, that's some voodoo to get "older browsers" to take
XHTML, not anything to do with XML.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.