ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Butch Clark <butch.cl...@corp.usa.net>
Subject Re: [[antlist] delete and filesets]
Date Wed, 25 Jul 2001 13:18:56 GMT

When you specify an include (or includes as an attribute on the fileset tag)
those are the only files included.  So you don't need an explicit exclude for
your "*.java" files.

For example:  The following task deletes all the class files starting in the
"test" directory, and all its subdirectories:

<target name="delClasses">
	<delete>
		<fileset dir="test" >
			<include name="**/*.class" />
		</fileset>
	</delete>
</target>

This leaves all the source code files (and all other non-.class files) alone.

Cheers,
Butch


"T Master" <tmaster@iknowledgeinc.com> wrote:
> I want to delete only  *.class  files, so i have used the following code
> below.  However, is it imperative I use the exclude name, to avoid deletion
> of source files?
> 
> <target name="cleanClasses">
>     <delete verbose="true|false">
>         <fileset>
>             <include name="**/*.class" />
>             <include name="**/*.class~" />
>             <exclude name="**/*.java" />
>             <exclude name="**/*.java~" />
>             <exclude name="**/*.vss" />
>         </fileset>
>     </delete>
> </target>
> 
> 
> 
> 



____________________________________________________________________
This email message is for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by reply email and destroy
all copies of the original message.

Mime
View raw message