I would write a custom task which analyses the data and stores a bunch of 
properties.
Depending on the step1prog the data-source would be a property or a file.

public class Step1ProgAnalyseTask extends Task {
    private File data; // setter
    private String prefix; // setter
    public void execute() {
        Map<String,String> data = analyse(data); 
        for(String key : data.keys) {
            getProject().setNewProperty(prefix + key, data.get(key));
        }
    }
}


Jan

>-----Ursprüngliche Nachricht-----
>Von: Lewis Tsao [mailto:lt...@talk21.com] 
>Gesendet: Mittwoch, 23. Juni 2010 10:19
>An: user@ant.apache.org
>Betreff: Setting multiple outputproperties
>
>Hi all,
>
>In one of my build setups, I need to run a program first which 
>produces some output. From this output I need to get multiple 
>pieces of information to be used in later build steps:
>
>For example:
>
><execute step1prog ...../>
>
>step1prog produces lines of the form
>
>something
>blah blah info1 blah blah
>more blah...
>di blah di blah info2 di blah
>more something
>
>later on in my build steps I will need to do somelike
>
><execute step2prog -Dxxx=info1>
>
><execute step3prog -Dyyy=info2>
>
>Is there a clever way of doing this, short of sending output 
>from step1prog to a file and parsing the file twice to get the 
>2 pieces of info.
>
>I still have to learn how to tease info1 and info2 out of the 
>output yet, but that's another story.
>
>Many thanks
>
>Lewis
>
>
>
>      
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
>For additional commands, e-mail: user-h...@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to