Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Custom ANT Task problem

Options
  • 05-07-2002 11:07am
    #1
    Registered Users Posts: 21,264 ✭✭✭✭


    Ok I have this custom ant task I've made but I'm having problems with a function I want to add to it.

    Take this as an example.
    <task blah="whatever">
       <prop name="test" value="whatever"/>
       <echo message="${test}"/>
    </task>
    

    Now the prop nested tag I want to work like </property> tag so it extends property.

    It works fine, except that all nested information within that task can't see it's value until the task completes? So the </echo> tag would show "${test}" instead of "whatever".

    I have it set to be processed first in my main tasks execute() section, but am I at a loss why it's not working? Anyone done this before know what's happening?

    I can fix it by writing my own code but I don't want to do that if the thing is supposed to work (prefer to know what I'm doing wrong).


Comments

  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    Originally posted by Hobbes
    It works fine, except that all nested information within that task can't see it's value until the task completes? So the </echo> tag would show "${test}" instead of "whatever".

    Off the top of my head - should you have the " there when using just the referenced variable?

    Its been a while since I was editing my ant scripts.....Ill have a proper look when I get into the office...

    jc


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Well the issue isn't with the Ant script. :) I'm creating a custom task within Java which can be plugged into ANT.

    I'm using the ANT API to create the task.


Advertisement