ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaikiran Pai <jai.forums2...@gmail.com>
Subject delete task with a wildcard "file"
Date Thu, 21 Dec 2017 04:58:43 GMT
Is it expected that the delete task with a file="*.py"(like below) will 
consider the * a wildcard and delete all files with a .py extension? My 
understanding based on the docs is that it should actually be the exact 
file name (either relative or absolute) and for something like wildcard 
support, the resource collections (like fileset) should be used.

I committed this change below, to use a resource collection to allow the 
build to pass, which had started failing on Windows, after I did a 
recent change to the delete task to use Java 7 java.nio.file.Files API.

If it's expected that it should work even with file="*.something" then 
let me know, I'll undo this change and see how I can fix the regression.

-Jaikiran


On 21/12/17 10:21 AM, jaikiran@apache.org wrote:
> Repository: ant
> Updated Branches:
>    refs/heads/master 1a2c33fd0 -> ca91b859f
>
>
> Fix allclean target in build
>
>
> Project: http://git-wip-us.apache.org/repos/asf/ant/repo
> Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/ca91b859
> Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/ca91b859
> Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/ca91b859
>
> Branch: refs/heads/master
> Commit: ca91b859f190598729613db4536a24f708eeb20b
> Parents: 1a2c33f
> Author: Jaikiran Pai <jaikiran@apache.org>
> Authored: Thu Dec 21 10:20:59 2017 +0530
> Committer: Jaikiran Pai <jaikiran@apache.org>
> Committed: Thu Dec 21 10:20:59 2017 +0530
>
> ----------------------------------------------------------------------
>   build.xml | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/ca91b859/build.xml
> ----------------------------------------------------------------------
> diff --git a/build.xml b/build.xml
> index c4e3526..5e39cd7 100644
> --- a/build.xml
> +++ b/build.xml
> @@ -1408,8 +1408,10 @@
>       description="--> cleans up everything">
>       <delete file="${bootstrap.dir}/bin/antRun"/>
>       <delete file="${bootstrap.dir}/bin/antRun.bat"/>
> -    <delete file="${bootstrap.dir}/bin/*.pl"/>
> -    <delete file="${bootstrap.dir}/bin/*.py"/>
> +    <delete>
> +      <fileset dir="${bootstrap.dir}/bin" includes="*.pl"/>
> +      <fileset dir="${bootstrap.dir}/bin" includes="*.py"/>
> +    </delete>
>     </target>
>   
>     <!--
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message