Phing ** Work-Around

When you use this in a fileset tag in PHING:

<include name="Vaf/**" />

You would expect it to include Vaf/foo.php, but not Vaffoo/bar.php

This works on windows, but not on Linux? Reading the manual I see "In patterns, one asterisk (*) maps to a part of a file/directory name"… so I found a way to exploit that feature to overcome the bug. The work around I found is to use two include tags:

<include name="Vaf/*" />
<include name="Vaf/*/**" />

Gotta love software. Basically the double asterisk seems to cause the forward slash preceding it to be ignored by PHING, that is why this hack is needed to keep your build file portable.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>