ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14512] - Allow creating database connection similar to <path>, <database> condition
Date Wed, 13 Nov 2002 16:59:39 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14512>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14512

Allow creating database connection similar to <path>, <database> condition

thierry.lach@bbdodetroit.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Allow creating database     |Allow creating database
                   |connection similar to <path>|connection similar to
                   |                            |<path>, <database> condition



------- Additional Comments From thierry.lach@bbdodetroit.com  2002-11-13 16:59 -------
Here is an example build file (based upon the one I used to test this) that 
demonstrates some of the syntax.  Note:  I ran ant with -debug to see what 
properties were set as a result of the conditions, so there is no explicit use 
of the "xxxxx.is.present" property values.  (Their use is left as an exercise 
to the reader ;-)

<?xml version="2.0"?>
<project default="main" basedir=".">

  <path id="classes12">
    <pathelement location="c:/software/jdbc/classes12.jar"/>
  </path>

  <!-- Make sure the connection works properly with a classpath -->
  <connection id="connection1"
              driver="oracle.jdbc.driver.OracleDriver"
              url="jdbc:oracle:thin:@localhost:1521:ORCL"
	      userid="lacht"
	      password="none_of_your_business"
	      classpath="c:/software/jdbc/classes12.jar"/>

  <!-- Make sure the connection works properly with a classpathref -->
  <connection id="connection2"
              driver="oracle.jdbc.driver.OracleDriver"
              url="jdbc:oracle:thin:@localhost:1521:ORCL"
	      userid="lacht"
	      password="none_of_your_business"
	      classpathref="classes12"/>

  <target name="main">

    <!-- Make sure it still works the old way -->
    <sql
              driver="oracle.jdbc.driver.OracleDriver"
              url="jdbc:oracle:thin:@localhost:1521:ORCL"
	      userid="lacht"
	      password="none_of_your_business"
	      classpathref="classes12">
        <transaction>
	    select * from dual
	</transaction>
    </sql>

    <!-- The same thing with a connectionref -->
    <sql connectionref="connection1">
        <transaction>
	    select * from dual
	</transaction>
    </sql>

    <condition property="schema.is.present">
        <database connectionref="connection2"
	          type="schema"
		  name="LACHT"/>
    </condition>

    <condition property="table.is.present">
        <database connectionref="connection2"
	          catalog=""
	          type="table"
		  schema="LACHT"
		  name="TURBINE_USER"/>
    </condition>

    <condition property="column.is.present">
        <or>
          <database connectionref="connection1"
	            catalog=""
	            type="column"
		    schema="LACHT"
		    table="TURBINE_USER"
		    name="OBJECT_DATA"/>
          <database connectionref="connection2"
	            catalog=""
	            type="column"
		    schema="LACHT"
		    table="TURBINE_USER"
		    name="OBJECTDATA"/>
        </or>
    </condition>

  </target>

</project>

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message