ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Brunelle <binarydream...@gmail.com>
Subject ant sql query weirdness
Date Sat, 14 Nov 2009 04:26:48 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message