ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Walker <twal...@merc-int.com>
Subject RE: Delete and File Properties
Date Thu, 13 Jun 2002 19:02:38 GMT
Hello, 

One of the reasons to use Ant is to make the choice of IDE largely a users choice. In my implementation,
where
I have to protect a mixed bag of read-only files in a clean, the ReadOnlySelector is very
cool. However,
integrating Ant 1.5b1 with each IDE is problematic. I'd like to find another way using the
1.4 support. It
seems that a task, say "attribDelet" could be easily written. I'm finding the Ant task documentation
difficult
to understand. 

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. 

  <taskdef name="attribDelete" classname="COM.ant.attribDelete"       classpath="${classes.dir}"/>
  <target name="clean">
    <!-- Delete the ${build} and ${dist} directory trees -->
    <delete dir="${build}"/>
    <delete dir="${dist}"/>
    <attribDelete>
       <fileset dir="${classes.dir}" includes="**/*.class"/>
    </attribDelete>
  </target>

package COM.ant;

import java.io.*;

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;

public class attribDelete extends Task implements org.apache.tools.ant.TaskContainer {
    private String msg;

    // The method executing the task
    public void execute() throws BuildException {
        System.out.println("in execute: " + msg);
    }

    // The setter for the "message" attribute
    public void setMessage(String msg) {
        this.msg = msg;
    }
    
    public void setFile(File file) {
        System.out.println("setting file: " + file);
    }
    
    public void addTask(Task task) {
        ;
    }
}

--
Tim Walker
Senior Software Engineer
twalker@freshwater.com
Freshwater Software
303-443-2266 ex. 6505
Looking for Answers to your SiteScope or SiteSeer questions?
http://www.freshwater.com/support/search.htm


-----Original Message-----
From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com] 
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.  :)


----- Original Message -----
From: "Tim Walker" <twalker@merc-int.com>
To: "'Ant Users List'" <ant-user@jakarta.apache.org>
Sent: Thursday, June 13, 2002 9:29 AM
Subject: RE: Delete and File Properties


> >>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
> twalker@freshwater.com
> Freshwater Software
> 303-443-2266 ex. 6505
> Looking for Answers to your SiteScope or SiteSeer questions?
> http://www.freshwater.com/support/search.htm
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message