title: Set an ant option with -D
body: <p>Suppose I have this ant task which takes a string and prints it.</p>
  
  <pre><code>public class MyTask extends Task
  {
      private String msg;
  
      // method executing the task
      public void execute() throws BuildException
      {
              System.out.println(msg);
      }
  
      public void setMessage (String msg)
      {
              this.msg = msg;
      }
  }
  </code></pre>
  
  <p>How should I write my buildfile to pass the string argument  to it?</p>
  
  <p>(Say I'd like do something like  <code>ant mytask -Dmessage=print_this_message</code>)</p>
  
  <p>Thanks</p>