Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Custom ANT Task problem

  • 05-07-2002 11:07AM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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