ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Rich" <b...@wilandra.com>
Subject RE: Confusion re path-like structures
Date Wed, 09 Mar 2005 16:06:59 GMT
I think it worked the way it should have. I believe what you told it was to
include the C:/Program Files/IBM/SQLLIB/java and the db2java.zip,
db2jcc.jar, and db2jcc_license_cu.jar files from the "base path".

Therefore, when you give it a specific path for the 3 files it finds them.

HTH
Bill

-----Original Message-----
From: Rhino [mailto:rhino1@sympatico.ca] 
Sent: Wednesday, March 09, 2005 7:20 AM
To: ant-user
Subject: Confusion re path-like structures

I'm a bit confused by path-like structures. I wonder if someone can clarify
something for me?

I am trying to revise a 'javac' step that previously only needed one jar on
its classpath so that it can see three jars in the same directory. Based on
the article on path-like structures in the Ant manual, I thought I could do
this:

    <path id="project.class.path">

        <pathelement path="C:/Program Files/IBM/SQLLIB/java"/>

        <pathelement location="db2java.zip"/>

        <pathelement location="db2jcc.jar"/>

        <pathelement location="db2jcc_license_cu.jar"/>

    </path>

then refer to this structure via a classpathref in javac, like this:

    <javac srcdir="${src.dir}" destdir="${bin.dir}" compiler="modern"
fork="yes"

        includes="${package_DB2General}/${UDF}.java"

        classpathref="project.class.path"

        verbose="no" debug="on" debuglevel="lines,vars,source"
deprecation="yes"/>

However, when I actually tried it, I couldn't make it work; I got compile
errors that indicated that the jars in the classpath were not visible to the
compiler. I eventually fixed the problem by doing this:

    <property name="jdbc.dir" value="c:/Program Files/IBM/SQLLIB/java"/>
    <path id="project.class.path">

        <pathelement location="${jdbc.dir}/db2java.zip"/>

        <pathelement location="${jdbc.dir}/db2jcc.jar"/>

        <pathelement location="${jdbc.dir}/db2jcc_license_cu.jar"/>

    </path>

I had the impression from the manual article that 'pathelement path'
represents a directory while 'pathelement location' represents a file within
the directory so that made me think that the first approach would work.

Can anyone explain why it didn't? What am I not understanding about 'path'
and 'location'?

My current approach works fine so I'm happy but I'd like to understand why
the other approach won't work.

Rhino
---
rhino1 AT sympatico DOT ca
"There are two ways of constructing a software design. One way is to make it
so simple that there are obviously no deficiencies. And the other way is to
make it so complicated that there are no obvious deficiencies." - C.A.R.
Hoare



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.6.4 - Release Date: 07/03/2005


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




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


Mime
View raw message