ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <sflo...@nc.rr.com>
Subject Re: ant sql query weirdness
Date Mon, 16 Nov 2009 02:49:07 GMT

Question for you...Do both echo statements get executed?  Meaning, both 
targets in the depends are honored (printUsStatesData -and" 
printAccountsData's echo statements are executed)...

On Fri, 13 Nov 2009, Richard Brunelle wrote:

> This is driving me crazy....
>
> I have the following code in an ant file.
>
> <target name="printAccountsData">
>        <echo message="PRINT accounts DATA USING: ${db.driver} ${db.url}"/>
>        <sql driver="${db.driver}"
>             url="${db.url}"
>             userid="${db.user}"
>             password="${db.pw}"
>             onerror="stop"
>             print="true">
>            <classpath refid="master-classpath"/>
>
>            SELECT * FROM accounts;
>
>        </sql>
>    </target>
>
>    <target name="printUsStatesData">
>        <echo message="PRINT us_states DATA USING: ${db.driver} ${db.url}"/>
>        <sql driver="${db.driver}"
>             url="${db.url}"
>             userid="${db.user}"
>             password="${db.pw}"
>             onerror="stop"
>             print="true">
>            <classpath refid="master-classpath"/>
>
>            SELECT * FROM us_states;
>
>        </sql>
>    </target>
>
> individidualy, each of these targets return proper data from the database.
> But when I do this and execute 'ant printData', only results from the first
> dependency listed below prints data.  Any insight into why this is
> happening?   It is as if the second print="true" is being ignored. No errors
> are generated.
>
> <target name="printData" depends="printUsStatesData,
>                                      printAccountsData">
>        <echo message="PRINT DATA USING: ${db.driver} ${db.url}"/>
>    </target>
>
> Thanks for any insight into this issue.
>
>
> Richard P. Brunelle
> Solutions Architect
> BinaryDream
>

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-890-8117 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

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


Mime
View raw message