You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Gene Margolin <gm...@futuresource.com> on 2001/10/31 20:58:54 UTC

deltree does not work

Hi.

Here is my xml ant file. By some reason target "clean" does not work.
All directories which have to be deleted by that target are not deleted.
What's wrong in my project?

Thank you in advance.

Gene.


<!-- Jmaf build file -->

<project name="jmaf" default="compile" basedir=".">
  <property name="src.dir" value="ant/java"/>
  <property name="build.dir" value="ant/java_classes"/>
  <property name="dist.dir" value="ant/java_build"/>
  <property name="build.compiler" value="classic"/>
  <property name="ant.home" value="ant"/>

   <target name="compile">
    <mkdir dir="${build.dir}"/>
    <deltree dir="${src.dir}/com/futuresource/jmaf/charts/tests"/>

    <!-- NewsWatch -->
    <mkdir dir="${build.dir}/NewsWatch"/>
    <javac
        srcdir="${src.dir}"
        destdir="${build.dir}/NewsWatch"
        classpath="${src.dir}/env/extern;${src.dir}/jars/capsapi_classes.zip"

includes="com/futuresource/newswatch/NewsWatch.java,com/futuresource/jmafkit/quantum/QuantumSession.java"

        debug="off"
        optimize="off"
    />
  </target>

  <target name="clean" depends="compile">
    <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/util"/>
    <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>
    <deltree dir="${destdir.dir}/com/futuresource/jmaf/lang/expression"/>
    <deltree dir="${destdir.dir}/com/futuresource/jmaf/tuple"/>
  </target>

</project>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: deltree does not work

Posted by Gene Margolin <gm...@futuresource.com>.
No. I'd like to remove some classes BEFORE creating cab and jar archives.
There are about 20 more folders in ${destdir.dir}.

Gene.

Bevan Arps wrote:

> At 14:24 31/10/2001 -0600, you wrote:
> >I've changed "deltree" by "delete".
> >The same result.
> >No error messages.
> >All directories are still here.
> >
> ><target name="clean" depends="compile">
> >   <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/util"/>
> >   <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>
> >   <deltree dir="${destdir.dir}/com/futuresource/jmaf/lang/expression"/>
> >   <deltree dir="${destdir.dir}/com/futuresource/jmaf/tuple"/>
> ></target>
>
> These deltree lines say "delete everything under
> ${destdir.dir}/com/futuresource/jmaf/charts/util"
>
> Are you in fact wanting to delete everything under ${destdir.dir} instead?
>
> Cheers,
> Bevan.
>
> --
> "Programming is an Art Form that Fights Back"
>
> Bevan Arps (<ma...@actfs.co.nz>bevan.arps@actfs.co.nz)
> Senior OO Analyst, ACT Financial Systems
>
> This communication  is confidential  to ACT  Financial  Systems  (Asia
> Pacific)  and is intended for  use only by the  addressee.   The  views and
> opinions  expressed in  this email  are the senders  own and do not
> represent  the  views  and  opinions of  ACT  Financial  Systems  (Asia
> Pacific).


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: deltree does not work

Posted by Bevan Arps <be...@actfs.co.nz>.
At 14:24 31/10/2001 -0600, you wrote:
>I've changed "deltree" by "delete".
>The same result.
>No error messages.
>All directories are still here.
>
><target name="clean" depends="compile">
>   <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/util"/>
>   <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>
>   <deltree dir="${destdir.dir}/com/futuresource/jmaf/lang/expression"/>
>   <deltree dir="${destdir.dir}/com/futuresource/jmaf/tuple"/>
></target>

These deltree lines say "delete everything under 
${destdir.dir}/com/futuresource/jmaf/charts/util"

Are you in fact wanting to delete everything under ${destdir.dir} instead?

Cheers,
Bevan.



--
"Programming is an Art Form that Fights Back"

Bevan Arps (<ma...@actfs.co.nz>bevan.arps@actfs.co.nz)
Senior OO Analyst, ACT Financial Systems

This communication  is confidential  to ACT  Financial  Systems  (Asia 
Pacific)  and is intended for  use only by the  addressee.   The  views and 
opinions  expressed in  this email  are the senders  own and do not 
represent  the  views  and  opinions of  ACT  Financial  Systems  (Asia 
Pacific).


Re: deltree does not work

Posted by Diane Holt <ho...@yahoo.com>.
--- Gene Margolin <gm...@futuresource.com> wrote:
> I've changed "deltree" by "delete".
> The same result.
> No error messages.
> All directories are still here.

Try:
<target name="clean" depends="compile">
  <delete includeEmptyDirs="yes">
    <fileset dir="${destdir.dir}/com/futuresource/jmaf">
      <include name="charts/*.class"/>
      <include name="lang/expression/**"/>
      <include name="tuple/**"/>
    </fileset>
  </delete>
</target>

If that doesn't work, try running with -verbose and sending the
(relevant)output.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: deltree does not work

Posted by Gene Margolin <gm...@futuresource.com>.
I've changed "deltree" by "delete".
The same result.
No error messages.
All directories are still here.

Gene.

T Master wrote:

> 1.
>     <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>
>
> 2.  I have never used deltree.   I use <delete> to delete a directory
> including subdirs.
> Look it up in the manual.
>
> ----- Original Message -----
> From: "Gene Margolin" <gm...@futuresource.com>
> To: "Ant Users List" <an...@jakarta.apache.org>
> Sent: Wednesday, October 31, 2001 12:58 PM
> Subject: deltree does not work
>
> > Hi.
> >
> > Here is my xml ant file. By some reason target "clean" does not work.
> > All directories which have to be deleted by that target are not deleted.
> > What's wrong in my project?
> >
> > Thank you in advance.
> >
> > Gene.
> >
> >
> > <!-- Jmaf build file -->
> >
> > <project name="jmaf" default="compile" basedir=".">
> >   <property name="src.dir" value="ant/java"/>
> >   <property name="build.dir" value="ant/java_classes"/>
> >   <property name="dist.dir" value="ant/java_build"/>
> >   <property name="build.compiler" value="classic"/>
> >   <property name="ant.home" value="ant"/>
> >
> >    <target name="compile">
> >     <mkdir dir="${build.dir}"/>
> >     <deltree dir="${src.dir}/com/futuresource/jmaf/charts/tests"/>
> >
> >     <!-- NewsWatch -->
> >     <mkdir dir="${build.dir}/NewsWatch"/>
> >     <javac
> >         srcdir="${src.dir}"
> >         destdir="${build.dir}/NewsWatch"
> >
> classpath="${src.dir}/env/extern;${src.dir}/jars/capsapi_classes.zip"
> >
> >
> includes="com/futuresource/newswatch/NewsWatch.java,com/futuresource/jmafkit
> /quantum/QuantumSession.java"
> >
> >         debug="off"
> >         optimize="off"
> >     />
> >   </target>
> >
> >   <target name="clean" depends="compile">
> >     <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/util"/>
> >     <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>
> >     <deltree dir="${destdir.dir}/com/futuresource/jmaf/lang/expression"/>
> >     <deltree dir="${destdir.dir}/com/futuresource/jmaf/tuple"/>
> >   </target>
> >
> > </project>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: deltree does not work

Posted by T Master <tm...@iknowledgeinc.com>.
1.
    <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>

2.  I have never used deltree.   I use <delete> to delete a directory
including subdirs.
Look it up in the manual.


----- Original Message -----
From: "Gene Margolin" <gm...@futuresource.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Wednesday, October 31, 2001 12:58 PM
Subject: deltree does not work


> Hi.
>
> Here is my xml ant file. By some reason target "clean" does not work.
> All directories which have to be deleted by that target are not deleted.
> What's wrong in my project?
>
> Thank you in advance.
>
> Gene.
>
>
> <!-- Jmaf build file -->
>
> <project name="jmaf" default="compile" basedir=".">
>   <property name="src.dir" value="ant/java"/>
>   <property name="build.dir" value="ant/java_classes"/>
>   <property name="dist.dir" value="ant/java_build"/>
>   <property name="build.compiler" value="classic"/>
>   <property name="ant.home" value="ant"/>
>
>    <target name="compile">
>     <mkdir dir="${build.dir}"/>
>     <deltree dir="${src.dir}/com/futuresource/jmaf/charts/tests"/>
>
>     <!-- NewsWatch -->
>     <mkdir dir="${build.dir}/NewsWatch"/>
>     <javac
>         srcdir="${src.dir}"
>         destdir="${build.dir}/NewsWatch"
>
classpath="${src.dir}/env/extern;${src.dir}/jars/capsapi_classes.zip"
>
>
includes="com/futuresource/newswatch/NewsWatch.java,com/futuresource/jmafkit
/quantum/QuantumSession.java"
>
>         debug="off"
>         optimize="off"
>     />
>   </target>
>
>   <target name="clean" depends="compile">
>     <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/util"/>
>     <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>
>     <deltree dir="${destdir.dir}/com/futuresource/jmaf/lang/expression"/>
>     <deltree dir="${destdir.dir}/com/futuresource/jmaf/tuple"/>
>   </target>
>
> </project>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: deltree does not work

Posted by Bevan Arps <be...@actfs.co.nz>.
At 13:58 31/10/2001 -0600, you wrote:

>Here is my xml ant file. By some reason target "clean" does not work.
>All directories which have to be deleted by that target are not deleted.
>What's wrong in my project?

Deltree is deprecated -- it is going to go away soon -- you should be using 
the delete task instead.

>     <deltree dir="${src.dir}/com/futuresource/jmaf/charts/tests"/>

try something like this instead:

<delete includeEmptyDirs="true">
   <fileset dir="dir="${src.dir}/com/futuresource/jmaf/charts/tests"/>
</delete>

Cheers,
Bevan.


--
"Programming is an Art Form that Fights Back"

Bevan Arps (<ma...@actfs.co.nz>bevan.arps@actfs.co.nz)
Senior OO Analyst, ACT Financial Systems

This communication  is confidential  to ACT  Financial  Systems  (Asia 
Pacific)  and is intended for  use only by the  addressee.   The  views and 
opinions  expressed in  this email  are the senders  own and do not 
represent  the  views  and  opinions of  ACT  Financial  Systems  (Asia 
Pacific).