You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by RO...@jpmorgan.com on 2002/01/08 12:50:39 UTC
delete task shouldn't fail but it does
I have a build script containing a delete task as follows:
<delete includeEmptyDirs="true" >
<fileset dir="jsp" />
</delete>
The intention is to delete the jsp directory in ${webinf}. If jsp is there it gets deleted. Fine. But if it is not already there the build fails
saying "blah\blah\jsp not found".
It seems to me that the intention is to have the directory not exist after the operation. So if it there then delete it, but if it is already not
there, job done, no error.
Should I be using a different syntax or is this task specified wrongly.
Thanks,
Rob Worth
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: delete task shouldn't fail but it does
Posted by Nick Cross <ni...@prismtechnologies.com>.
Nick Cross wrote:
>
> ROBERT.WORTH@jpmorgan.com wrote:
> >
> > I have a build script containing a delete task as follows:
> >
> > <delete includeEmptyDirs="true" >
> > <fileset dir="jsp" />
> > </delete>
> >
> > The intention is to delete the jsp directory in ${webinf}. If jsp is there it gets deleted. Fine. But if it is not already there the build fails
> > saying "blah\blah\jsp not found".
> >
> > It seems to me that the intention is to have the directory not exist after the operation. So if it there then delete it, but if it is already not
> > there, job done, no error.
> >
> > Should I be using a different syntax or is this task specified wrongly.
> >
> > Thanks,
> >
> > Rob Worth
> >
> > --
> > To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
>
> Try using the -quiet flag to the delete task.
>
> Cheers,
>
> Nick
>
Hmmm, phrasing it properly it could be:
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="jsp" />
</delete>
Cheers,
Nick
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: delete task shouldn't fail but it does
Posted by Nick Cross <ni...@prismtechnologies.com>.
ROBERT.WORTH@jpmorgan.com wrote:
>
> I have a build script containing a delete task as follows:
>
> <delete includeEmptyDirs="true" >
> <fileset dir="jsp" />
> </delete>
>
> The intention is to delete the jsp directory in ${webinf}. If jsp is there it gets deleted. Fine. But if it is not already there the build fails
> saying "blah\blah\jsp not found".
>
> It seems to me that the intention is to have the directory not exist after the operation. So if it there then delete it, but if it is already not
> there, job done, no error.
>
> Should I be using a different syntax or is this task specified wrongly.
>
> Thanks,
>
> Rob Worth
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
Try using the -quiet flag to the delete task.
Cheers,
Nick
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: delete task shouldn't fail but it does
Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 8 Jan 2002, ROBERT WORTH <RO...@jpmorgan.com> wrote:
> Should I be using a different syntax or is this task specified
> wrongly.
Add failonerror="false" or quiet="true" to the task.
Stefan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: delete task shouldn't fail but it does
Posted by Thomas Caspers <ca...@intellicare.de>.
> I have a build script containing a delete task as follows:
>
> <delete includeEmptyDirs="true" >
> <fileset dir="jsp" />
> </delete>
>
> The intention is to delete the jsp directory in ${webinf}. If
> jsp is there it gets deleted. Fine. But if it is not already
> there the build fails
> saying "blah\blah\jsp not found".
You should try either quiet="true"
or failonerror="false".
e.g.
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="jsp" />
</delete>
Regards,
Thomas
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>