You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jaikiran Pai <ja...@gmail.com> on 2017/12/21 04:58:43 UTC

delete task with a wildcard "file"

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 <ja...@apache.org>
> Authored: Thu Dec 21 10:20:59 2017 +0530
> Committer: Jaikiran Pai <ja...@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


Re: delete task with a wildcard "file"

Posted by Jaikiran Pai <ja...@gmail.com>.
On 21/12/17 10:42 AM, Stefan Bodewig wrote:
> On 2017-12-21, Jaikiran Pai wrote:
>
>> 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.
> Interesting. I wasn't aware of it working before. We probably should
> list that as a breaking change.
>
>
Done. I pushed a commit to update the release notes to include a note 
about this change.

-Jaikiran

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


Re: delete task with a wildcard "file"

Posted by Stefan Bodewig <bo...@apache.org>.
On 2017-12-21, Jaikiran Pai wrote:

> 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?

No, not at all.

> 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.

That's my understanding as well.

> 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.

Interesting. I wasn't aware of it working before. We probably should
list that as a breaking change.

Stefan

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