You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2002/11/13 17:59:39 UTC
DO NOT REPLY [Bug 14512] -
Allow creating database connection similar to , condition
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>