trilcejf (2) [Avatar] Offline
#1
Hi there, Can anybody tell me what does **/.* pattern mean in Apache Ant?
I am just not sure what does it mean. I have put comment above the lines whose meaning i am not sure. If someone find a mistake, please correct me.
Thanks in advance

This is the code:

<target name="warfile" depends="build,docs" description="Build the web application archive">
<mkdir dir="${dist.dir}"/>
<war warfile="${dist.dir}/${name}.war" basedir="${war.dir}" webxml="${war.dir}/WEB-INF/web.xml">
<!-- Include all the dirs inside ${war.dir} but not its subdirs. I am not sure about it -->
<include name="*"/>
<!-- Include all the files from WEB-INF dir -->
<include name="WEB-INF/*.*"/>
<!-- Exclude web.xml from WEB-INF dir -->
<exclude name="WEB-INF/web.xml"/>
<!-- Include all the files from WEB-INF/lib, but not the files inside subdir from WEB-INF/lib. I am not sure about it. -->
<include name="WEB-INF/lib/**"/>
<!-- Unknown meaning -->
<exclude name="**/.*"/>
</war>
</target>
ErikHatcher (211) [Avatar] Offline
#2
Re: Pattern **/.* in Ant
It excludes all files that start with a dot (.) in the entire dir tree.
trilcejf (2) [Avatar] Offline
#3
Re: Pattern **/.* in Ant
Thank you Erik.
Just the last cuestion:
¿The pattern /** include all files in the entire dir tree?
and
¿<include name="*"/> include files just in the basedir?

Regards
ErikHatcher (211) [Avatar] Offline
#4
Re: Pattern **/.* in Ant
Yes, I believe your assertions are correct. You can see the patterns documented here: http://ant.apache.org/manual/dirtasks.html#patterns