dcsimg
Using the filename selector vs. include element in a fileset
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, July 20, 2006 10:47 AM

What is the difference between using the selector and using the element in a fileset? Depending on how I'm using the fileset I get different behavior between the two approaches. This seems odd to me since every piece of documentation I've read says something along the lines of: "The tag acts like the and tags within a fileset." (That was taken from the ant manual itself). As an example I have a fileset such as: that is use later to make an ear: manifest="${meta.inf}/MANIFEST.MF" appxml="${meta.inf}/application.xml" > prefix="APP-INF/lib"/>    More>>

What is the difference between using the selector and using the element in a fileset?


Depending on how I'm using the fileset I get different behavior between the two approaches. This seems odd to me since every piece of documentation I've read says something along the lines of: "The tag acts like the and tags within a fileset." (That was taken from the ant manual itself).


As an example I have a fileset such as:


			








that is use later to make an ear:

			

manifest="${meta.inf}/MANIFEST.MF"
appxml="${meta.inf}/application.xml" >


prefix="APP-INF/lib"/>





I get exactly what I want, which is an ear file with a subdirectory
APP-INF/lib containing those three files.





$ jar tf dist/generated.ear

META-INF/

META-INF/MANIFEST.MF

APP-INF/

APP-INF/lib/

APP-INF/lib/antlr-2.7.5H3.jar

APP-INF/lib/asm.jar

APP-INF/lib/asm.attrs.jar

META-INF/application.xml





However, if I do the same exact thing but change the fileset definition to:

			








I get an ear file with just the META-INF directory and the 2 files in it but not the APP-INF/lib subdirectory. (Note: I tried this with and without fileset's includes attribute)





$ jar tf dist/generated.ear

META-INF/

META-INF/MANIFEST.MF

META-INF/application.xml





What's the deal with that? I thought they
were interchangeable. At least thats what the docs seem to suggest.



Just to illustrate the inconsistency, if I use the same fileset in the path element below:

			






It works either way.    <<Less
About | Sitemap | Contact