ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christine.W...@nurun.com
Subject MyVeryOwnTask
Date Thu, 18 Oct 2001 20:20:09 GMT

Hi guys,

How do I acutally implement this in a build.xml file?

-----------------------------------------------------------------
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
import java.util.*;

public class MyVeryOwnTask extends Task {
private String msg;


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

  // The setter for the "message" attribute
  public void setMessage(String msg) {
    this.msg = msg;
  }
}
-------------------------------------------------------------------

I know I put this in my init target: <taskdef name="MyVeryOwnTask"
classname="MyVeryOwnTask"/>
but I'm not sure where I specify the actual 'msg' that I want to print out
to the screen, except that now
I can do this: <MyVeryOwnTask ........./>

thanks


Mime
View raw message