On Wed, 30 Oct 2002, Dominique Devienne [EMAIL PROTECTED] wrote:
It's likely that like you suggest, the ant call still holds on to
the file handles of some of these JARs, thus the delete takes
fails to delete those files.
If it really was Ant (and not something inside the Java VM unrelated
to
It's likely that like you suggest, the ant call still holds on to the file
handles of some of these JARs, thus the delete takes fails to delete those
files. The only way to ensure all resources to be released would be to fork
the ant call, but unfortunately it is not possible at this time.
What
Just wanted to thank every one who chipped in with ideas for solving
this problem. It was a huge help in digging around Ant trying to find a
good way to purge old files.
In the end, I've build a task to do the job. It's available here:
http://www.dallaway.com/ant/
Comments, bug reports,
11:03
To: Ant Users List
Subject: Re: Delete all but the most recent N files
Just wanted to thank every one who chipped in with ideas for solving
this problem. It was a huge help in digging around Ant trying to find a
good way to purge old files.
In the end, I've build a task to do
To work properly for directories, you may want to extend your task to take a
dirset in addition to a fileset. Thanks, --DD
-Original Message-
From: Richard Dallaway [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 5:45 AM
To: Ant Users List
Subject: Re: Delete all but the most
Ah, Richard, you set a good example. I keep writing stuff I want to
contribute to the Ant community and just before I finish my last testcase*
or finish up the docs I get yanked off to work on something else. Instead of
allowing the code to get buried on your desk you throw it up on your own web
:[EMAIL PROTECTED]]
Sent: Friday, October 11, 2002 7:27 PM
To: Ant Users List
Subject: RE: Delete all but the most recent N files
At 04:50 PM 10/9/2002 -0500, Dominique Devienne wrote:
You could achieve *almost* what you want I think using the date selector,
but it only takes an absolute date
At 04:50 PM 10/9/2002 -0500, Dominique Devienne wrote:
You could achieve *almost* what you want I think using the date selector,
but it only takes an absolute date instead of a relative one. Writing a
different selector that takes a relative date should be easy.
Doing exactly what you want with
Thanks for the dot file idea, thought of 'mkdiring' afterwards but don't like playing
with the file system the whole time.
-Original Message-
From: Diane Holt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 09, 2002 11:55 AM
To: Ant Users List
Subject: Re: delete directory tree
--- Wannheden, Knut [EMAIL PROTECTED] wrote:
Here's what I usually do:
delete includeemptydirs=true
fileset dir=bin includes=*/**/
/delete
Yeah, that works. (Since the original poster said they'd tried bunches of
variations on 'includes', I just assumed that was one of them and it
didn't
how can it be that it doesn't work for me?
-Original Message-
From: Diane Holt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 09, 2002 12:21 PM
To: Ant Users List
Subject: RE: delete directory tree but not main directory.
--- Wannheden, Knut [EMAIL PROTECTED] wrote:
Here's what I
Thank you all, I made a mistake before, it works fine now.
-Original Message-
From: Wannheden, Knut [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 09, 2002 12:14 PM
To: 'Ant Users List'
Subject: RE: delete directory tree but not main directory.
Here's what I usually do:
delete
. Oktober 2002 11:55
To: Ant Users List
Subject: Re: delete directory tree but not main directory.
--- Eloise Friedman [EMAIL PROTECTED] wrote:
For one of my clean tasks I want to delete a directory
tree, but leave
the base directory.
Only two ways come immediately to mind
Richard,
Great idea! Now I am using the following nasty shell line, but it would be a
great task.
ls -1 -t | tail -n $[`ls -1 | wc -l` -150] | perl -n -e 'print $_;chomp
$_;unlink($_);' | cat -n
removes all but the most recent 150 files in
You could achieve *almost* what you want I think using the date selector,
but it only takes an absolute date instead of a relative one. Writing a
different selector that takes a relative date should be easy.
Doing exactly what you want with a selector seems impossible, since
selectors need to
--- Dominique Devienne [EMAIL PROTECTED] wrote:
You could achieve *almost* what you want I think using the date
selector, but it only takes an absolute date instead of a relative one.
Use tstamp to get the relative date.
Diane
=
([EMAIL PROTECTED])
http://jakarta.apache.org/ant/faq.html#defaultexcludes
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
--- [EMAIL PROTECTED] wrote:
Dixit the manual, To remove empty directories, use the includeEmptyDirs
attribute.
Below is a task I'm running that I thought would remove the empty
directories, as there are only classes in these build directories
!-- Clean up class files --
target
On Wed, 12 Jun 2002, Erik Hatcher [EMAIL PROTECTED]
wrote:
public class ReadOnlySelector extends BaseExtendSelector {
shouldn't that better be a built-in selector?
Yup, and I intend to commit it (or a variant of it) to CVS HEAD at some
point in the near future. I did not write it until
On Thu, 13 Jun 2002, Erik Hatcher [EMAIL PROTECTED]
wrote:
But the beauty is that I discovered a bug in the custom selector
stuff which Bruce has since fixed.
Yay.
Otherwise I'll get to it eventually and it will be part of 1.6.
1.6 is fine IMHO.
Stefan
--
To unsubscribe, e-mail:
But the beauty is that I
discovered a bug in the custom selector stuff which Bruce has since fixed.
So far, the ReadOnlySelector has worked really well for me with 1.5b, what was the bug
?
Thanks,
--
Tim Walker
Senior Software Engineer
[EMAIL PROTECTED]
Freshwater Software
303-443-2266 ex.
what? you reversed the defintions of true and false? That threatens the
entire stability of the universe. put it back before things go horribly
wrong!
why, look at the sentence above; 'Now it's working great', which maps to
working=true. if you have reversed your boolean logic, then true = false,
No worries - it had to do with specifying the classpath on the selector.
Its long since been fixed. :)
- Original Message -
From: Tim Walker [EMAIL PROTECTED]
To: 'Ant Users List' [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 9:29 AM
Subject: RE: Delete and File Properties
://www.freshwater.com/support/search.htm
-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 7:49 AM
To: Ant Users List
Subject: Re: Delete and File Properties
No worries - it had to do with specifying the classpath on the selector.
Its long since been fixed
?
http://www.freshwater.com/support/search.htm
-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 7:49 AM
To: Ant Users List
Subject: Re: Delete and File Properties
No worries - it had to do with specifying the classpath on the selector.
Its
- Original Message -
From: Tim Walker [EMAIL PROTECTED]
Will someone please help me with my attribDelete task ? I thought the
setFile would be getting called...file a
File object. I do have the in execute in my Ant console...so I'm at
least that far. Thank you.
Why do you think
Thanks Erik,
Why do you think setFile would be called?
setXXX are for XML attributes, so
it would be called if you had:
attribDelete file=/
[snip]
But to support nested filesets, use void addFileset(FileSet set).
public class attribDelete extends Task implements
- Original Message -
From: Tim Walker [EMAIL PROTECTED]
Hmmm...thanks...a better question, I guess, is...
Is the documentation:
http://jakarta.apache.org/ant/manual/
Acceptable for something as fundamental as this ? Trying to implement a
task based solely on this
documentation
- Original Message -
From: Erik Hatcher [EMAIL PROTECTED]
We have one chapter dedicated to writing custom tasks, and another that
has
info on writing custom selectors, FilterReaders, mappers, listeners, and
loggers.
Woohoo! I notice the new inclusions :-)
Erik
Cheers,
Magesh
questions?
http://www.freshwater.com/support/search.htm
-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 1:41 PM
To: Ant Users List
Subject: Re: Delete and File Properties
- Original Message -
From: Tim Walker [EMAIL PROTECTED
PROTECTED]
To: 'Ant Users List' [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 4:33 PM
Subject: RE: Delete and File Properties
Erik,
You rock like Slayer.
Using Delete.java as a guideline...my attribDelete.java was point and
click. I needed to add only the if
(f.canWrite()) to that part
A good solution is to use Ant 1.5's new selector capability. Unfortunately
there is not a selector to filter out read-only files built-in. But the
selector feature is extensible. I hope I'm not giving away the farm on our
upcoming Ant book, but I was going to add this to Ant 1.6 anyway. Here
PROTECTED]]
Sent: Wednesday, June 12, 2002 2:00 PM
To: Ant Users List
Subject: Re: Delete and File Properties
A good solution is to use Ant 1.5's new selector capability. Unfortunately
there is not a selector to filter out read-only files built-in. But the
selector feature is extensible. I hope I'm
-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 2:00 PM
To: Ant Users List
Subject: Re: Delete and File Properties
A good solution is to use Ant 1.5's new selector capability. Unfortunately
there is not a selector to filter out read-only files built
-
From: Tim Walker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 3:23 PM
To: 'Ant Users List'
Subject: RE: Delete and File Properties
Hmmm...that didn't seem to work.
I installed 1.5:
Ant -version Apache Ant version 1.5Beta2 compiled on May 31 2002
When I added it to my build
- Original Message -
From: Tim Walker [EMAIL PROTECTED]
To: 'Ant Users List' [EMAIL PROTECTED]
Sent: Wednesday, June 12, 2002 2:43 PM
Subject: RE: Delete and File Properties
I reversed my Boolean logic and now it's working great. Thanks !
what? you reversed the defintions of true
On Wed, 12 Jun 2002, Erik Hatcher [EMAIL PROTECTED]
wrote:
public class ReadOnlySelector extends BaseExtendSelector {
shouldn't that better be a built-in selector?
Maybe an extended version of it which also checks canRead, a selector
that lets me select all writable, all read-only or all
Try this:
delete includeEmptyDirs=true
fileset dir=D:/aaa
exclude name=ccc/** /
/fileset
/delete
-Original Message-
From: Jet Hariramani [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 1:19 PM
To: Ant Users List
Subject: delete
Hi!
I have been going crazy trying to
On Mon, 6 May 2002, Ilya Lipkind [EMAIL PROTECTED] wrote:
a list of disparate, full-path filenames in a separate file
the includesfile attribute of a nested fileset inside delete should
work (as long as your file names are relative paths, that is).
Stefan
--
To unsubscribe, e-mail:
--- Ilya Lipkind [EMAIL PROTECTED] wrote:
It seems strange to me but apparently delete task does not take
filelist. Is there a good way to delete files
according to a filelist and not a fileset generated by a pattern
When you say filelist, are you referring to the new filelist datatype,
or
--- Ilya Lipkind [EMAIL PROTECTED] wrote:
It seems strange to me but apparently delete task does not take
filelist. Is there a good way to delete files
according to a filelist and not a fileset generated by a pattern
When you say filelist, are you referring to the new
filelist
--- Ilya Lipkind [EMAIL PROTECTED] wrote:
a list of disparate, full-path filenames in a separate file
I want to use the same filelist I use for javac
I take it you mean 'javac', the executable, and not javac, the task,
since the task wouldn't like a list of full-path filenames, either.
If
There is no reason why it shouldn't delete ${distDir} , i think you should
check your property
distDir
also use the -verbose option with ant and see whats going on
Rgds,
Sujan
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 11:53
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
May I know under what circumstances I cannot delete any folders?
Under windows you may not delete a file (or directory) which is locked by a
process. This includes explorer if you are looking at the directory and also
the Java VM if the
--- Truesdale, Jay [EMAIL PROTECTED] wrote:
I have this in build.xml:
delete failonerror=true quiet=false verbose=true
file=${root_dir}/${release_version}/wlconf.${prod_mach_1}/cluster${nosi_web
logic_port}/conf/DB2DataSync.properties /
If one of the properties (say ${release_version})
Joshua Allen [EMAIL PROTECTED] writes:
I'm having problems running a clean script because the files I want to delete have a
~ character at the end of them, and ant can't
seem to see them.
delete
fileset dir=.
You must set the defaultexcludes-attribute:
fileset
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
On Tue, 8 Jan 2002, ROBERT WORTH [EMAIL PROTECTED] 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: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL
Nick Cross wrote:
[EMAIL PROTECTED] 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
PROTECTED]
Sent by: [EMAIL PROTECTED]
To: Ant Users List [EMAIL PROTECTED]
cc:
Subject: Re: delete task shouldn't fail but it does
Nick Cross wrote:
[EMAIL PROTECTED] wrote:
I have a build script containing a delete task as follows:
delete includeEmptyDirs=true
Just a bit of grasping at straws here...
I'll assume that you do not have the file open in some other application.
The only other thing I notice is that the file it failed on is not named in
8.3 format. Not sure if it mattersperhaps just a coincidence?
-Original Message-
From:
It's not Windows' locking. (I have seen Windows locking
when I had Explorer open and tried to delete some directories)
What I found is that DELETE fails b/c it's proceded by a
PropertyFile task AND a Copy task. Here is the code:
copy todir=${build.dir}\${package.root.dcmtools}
fileset
On Thu, 13 Dec 2001 Dmitri G. Chtchekine wrote :
It's not Windows' locking. (I have seen Windows locking
when I had Explorer open and tried to delete some
directories)
It is the propertyfile task that is guilty here. We
have identified and fixed it against the main CVS trunk.
It is likely that windows is locking the file because you have it open in an
editor or some other application has it opened.
On Wed, 12 Dec 2001 09:56, Dmitri G. Chtchekine wrote:
I get exception trying to delete some files (OS is Windows NT).
Strangely some files get deleted, and on some
From: Dmitri G. Chtchekine [EMAIL PROTECTED]
I get exception trying to delete some files (OS is Windows NT).
Windows doesn't let a program delete any file that is locked
by the OS at the time of attempting to delete. Such is not the case
in Unix. So this problem will usually occur in Windows
At 6:42 PM -0500 12/11/01, Magesh Umasankar wrote:
From: Dmitri G. Chtchekine [EMAIL PROTECTED]
I get exception trying to delete some files (OS is Windows NT).
Windows doesn't let a program delete any file that is locked
by the OS at the time of attempting to delete. Such is not the case
in
Usually this means another process has a lock on the file. Check for
programs, even editors, that have accessed this file.
Conor
-Original Message-
From: Dmitri G. Chtchekine [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 12 December 2001 9:57 AM
To: Ant Users List
Subject: DELETE
- Original Message -
From: Glenn McAllister [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 6:32 AM
Subject: Re: Delete task
Frazier, Scott wrote:
Hi,
Does ant 1.4 support the notion of deleting a symbolic link as
opposed to the file/directory
Frazier, Scott wrote:
Hi,
Does ant 1.4 support the notion of deleting a symbolic link as
opposed to the file/directory the symlink points to? I know I can use the
exec task, but I'd rather avoid that if possible.
Not at the moment, no. There have been a number of
I'm wondering if there has been any dicussion of using the DOM as a model for
filesets? In which case XPath or some variant could be used instead of ant's
proprietary fileset syntax. Example: xx//yy instead of xx/**/yy, meaning all
yy descendants of xx. The DOM and virtually every file system is
Is the file in use? If you're on a Win* system, they get snooty about
letting you delete a file that's in use. But really, do you want to chmod
a source-controlled file? If PVCS has a way to check out a file for edit,
wouldn't it be better to go that route and do it legally?
Diane
--- Natalia
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1651
Stefan
(I do not
really want to srew up my installation and spend hours trying to reinstall
it.., in case we have a simpler solution.
Regards,
Viraj Purang
-Original Message-
From: Stefan Bodewig [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 12:53 AM
To: [EMAIL PROTECTED]
Subject: Re
, June 25, 2001 12:53 AM
To: [EMAIL PROTECTED]
Subject: Re: delete task recursion ...PLease do answer ASAP if possible
...
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1651
Stefan
of the
CVS
build which would get this working.(possibly a jar file.)
Regards,
VIraj Purang
-Original Message-
From: Stefan Bodewig [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 12:53 AM
To: [EMAIL PROTECTED]
Subject: Re: delete task recursion ...PLease do answer ASAP
-Original Message-
From: Diane Holt [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 1:43 PM
To: [EMAIL PROTECTED]
Subject: RE: delete task recursion ...PLease do answer ASAP if possible
...
You can either pick up the latest nightly build at:
http://jakarta.apache.org/builds
: Diane Holt [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 1:43 PM
To: [EMAIL PROTECTED]
Subject: RE: delete task recursion ...PLease do answer ASAP if possible
...
You can either pick up the latest nightly build at:
http://jakarta.apache.org/builds/jakarta-ant/nightly/2001-06-25
Viraj Purang wrote:
HI Diane,
I decided to go ahead with the installation of 1.4 alpha and it gave me a
SecurityException and just bombed.
I just got this one myself, because there was a JAXP1.0 (jaxp.jar and
parser.jar) in my extension directory and the 1.4alpha uses JAXP1.1
Viraj Purang [EMAIL PROTECTED] wrote:
But what finally ends up happening is that all the directories
remain intact and all files are deleted because the CVS directory
with allits files does not get deleted.
Are you running Ant 1.3? There is a bug in its delete task -
includeemptydirs
In the junit subdir, I have a build.xml, and a junit3.5.zip, both of
which are in source control. During the build, the zip file gets
unzipped creating a junit3.5 subdirectory, and all of it's contents.
The file in question is created by the unzip.
As for rebooting, I can't say that I remember
not have the ReadOnly ATTRIBute set.
Original Message
From: David Corbin
Date: Fri 4/13/01 10:06
To: [EMAIL PROTECTED]
Subject:Re: Delete fails...
In the junit subdir, I have a build.xml, and a junit3.5.zip, both of
which are in source
e ReadOnly
ATTRIBute set.
Original Message
From: David Corbin
Date: Fri 4/13/01 10:06
To: [EMAIL PROTECTED]
Subject: Re: Delete fails...
In the junit subdir, I have a build.xml, and a junit3.5.zip, both of
which are in source control. During
both from ANT) with several other zip/tar/jar files, and none
of them
have the problem. The file in question does not have the ReadOnly
ATTRIBute set.
Original Message
From: David Corbin
Date: Fri 4/13/01 10:06
To: [EMAIL PROTECTED]
Subject: Re: Delete fails...
In the junit subd
Title: RE: Delete fails (more)
This may sound wacky, but I've had the same problem (though it was
intermittent).
What it turned out to be was that there is a W2K feature that
scans and
indexes all of the files on the system for use by the Search... tool.
Not sure if this is what
Could be a couple of simple causes which I've discovered by beating my head
against a wall:
1. Command prompt window open with the current directory == ${archive} (or
one of its subdirs)
2. Windows explorer open and the currently selected folder == ${archive}
Point 2 doesn't seem to happen
Your idea makes sense, but that's not it...
Brian Murray wrote:
Could be a couple of simple causes which I've discovered by beating my head
against a wall:
1. Command prompt window open with the current directory == ${archive} (or
one of its subdirs)
2. Windows explorer open and the
--- David Corbin [EMAIL PROTECTED] wrote:
I tried that, and I tried NTHandle | grep junit.
Nothing is holding the file open.
It *seems* like that cygwin rm also fails (silently) to delete it, but
DEL frequently (if not always) succeeds.
More ideas?
I take it you've tried rebooting? :)
Hi everyone,
I'm experiencing this myself on J2EE.jar which is used in the classpath for
a previous compilation step.
However, delete (for the entire directory in which j2ee.jar sits) doesn't
seem to do its job, even though there is no more compilation in progress.
Funnily enough, However,
To: [EMAIL PROTECTED]
Subject: Re: delete and mkdir problem
Sibon Barman wrote:
Hi all,
I have the following target in my build script:
target name="real-clean"
delete dir="${classes.dir}" /
delete dir="${lib.dir}" /
delete dir="${javad
I use:
delete dir="${classes.dir}" /
-Original Message-
From: Sibon Barman [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 1:35 PM
To: [EMAIL PROTECTED]
Subject: RE: delete and mkdir problem
How come the following snippet doesn't remove the empty directo
]
[mailto:[EMAIL PROTECTED]]On Behalf Of Glenn McAllister
Sent: 22 January 2001 18:02
To: [EMAIL PROTECTED]
Subject: Re: delete and mkdir problem
Sibon Barman wrote:
Hi all,
I have the following target in my build script:
target name="real-clean"
delete dir=&quo
PROTECTED]
-Original Message-
From: Nicholas Christopher [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 1:39 PM
To: '[EMAIL PROTECTED]'
Subject: RE: delete and mkdir problem
I use:
delete dir="${classes.dir}" /
-Original Message-
From: Sibon Barman [mai
Being in the directories you are looking at in IE may
be one of the problems, you cannot move or delete
files (or directories) that are in use on windows, so
make sure anything that may be accessing your files is
closed before you try to run your real-clean. To
delete everything except
Ignore my previously sent "solution". It leaves all the directories behind. Sorry
__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
84 matches
Mail list logo