Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 345
  • Last Modified:

what does exclude in ANT do ?

<copy verbose="true" todir="build/WebContent/WEB-INF">
  <fileset dir="WebContent/WEB-INF" 
  excludes="*.*,classes/**,services/myserv/**"/>
  </copy>

Open in new window


what does "*.* doing here ?  is it excluding all files under WEB-INF from being copied ?

0
cofactor
Asked:
cofactor
1 Solution
 
CEHJCommented:
No. It's only excluding files in that immediate directory (at the root) plus any files off the other directories named
0
 
cofactorAuthor Commented:
>>>No. It's only excluding files in that immediate directory
I have folder called "lib" under WebContent/WEB-INF.  Will that also be excluded ?

Does it exclude files or folders in that immediate directory ?

0
 
objectsCommented:
It excludes all file:
- in WEB-INF
- in WEB-INF/classes
- in WEB-INF/services/myserv
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
objectsCommented:
> Does it exclude files or folders in that immediate directory ?

no
0
 
CEHJCommented:
>>Does it exclude files or folders in that immediate directory ?

It excludes *files*. At least that's the intention. But there's a problem: *.* will only exclude files that have an extension. The pattern should really be *
0
 
CEHJCommented:
The following illustrates the result of correcting the pattern. See the files named 'a' to 'd' below and where they end up:
goose@p10:/tmp$ find WebContent
WebContent
WebContent/WEB-INF
WebContent/WEB-INF/a
WebContent/WEB-INF/services
WebContent/WEB-INF/services/myserv
WebContent/WEB-INF/services/myserv/c
WebContent/WEB-INF/classes
WebContent/WEB-INF/classes/b
WebContent/WEB-INF/foo
WebContent/WEB-INF/foo/d
goose@p10:/tmp$ ant cop
Buildfile: build.xml

cop:
     [copy] Copying 1 file to /tmp/build/WebContent/WEB-INF
     [copy] Copying /tmp/WebContent/WEB-INF/foo/d to /tmp/build/WebContent/WEB-INF/foo/d

BUILD SUCCESSFUL
Total time: 1 second
goose@p10:/tmp$ find build
build
build/WebContent
build/WebContent/WEB-INF
build/WebContent/WEB-INF/services
build/WebContent/WEB-INF/foo
build/WebContent/WEB-INF/foo/d

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now