You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Radha Sangal <Ra...@pega.com> on 2005/01/28 00:07:11 UTC

retrive value in listener

This might not be specific to ant, but if someone has implemented this ,
how do we retrieve a value from the custom task made in listener 

 

Eg.

 

In xml : <newtask message="Hello World! NewTask works!"/>

 

In listener: something similar to this , this one doesn't work ...

public void messageLogged( BuildEvent event )

      {

            RuntimeConfigurable aRC =
event.getTask().getRuntimeConfigurableWrapper();

            AttributeList hTable = aRC.getAttributes();

            String message =
event.getProject().replaceProperties((String)hTable.getValue("message"))
;

            System.out.println( "A Message: " + message );

      }