ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye huaiguang <gree...@gmail.com>
Subject Re: does "property" could have several values?
Date Sun, 04 Dec 2005 01:36:16 GMT
hi
Thanks ddevienne, now I can resolve my problem, but I still have a question,
if my JARs even in a drivers, like "D:\java\lib" & "e:\java\lib", How could
I do in this situation?


2005/12/4, Dominique Devienne <ddevienne@gmail.com>:
>
> > but now my value should be "D:/Java/hibernate"
> &="D:/Java/hibernate/lib",
> > should I write them like this?
> >           <property name="lib.dir"
> > value="D:/Java/hibernate;D:/Java/hibernate/lib" />
> > or
> >            <property name="lib.dir" value="D:/Java/hibernate" />
> >            <property name="lib.dir" value="D:/Java/hibernate/lib" />
> >
> > I know I could copy all the jars to one directory, but I think it's
> quirk,
> > so I came here to find better way.Thanks!
>
> A property is just a string. You can put whatever you want in it. But
> <fileset dir=...> on the other hand expects a directory name, so if
> you pass it a string that doesn't correspond to a dir name, then it
> will fail.
>
> Here one way (among several) that you can achieve what you want:
>
> <property name="lib.dir" value="D:/Java/hibernate" />
> <path id="project.class.path">
> <fileset dir="${lib.dir}">
>    <include name="*.jar"/>
>    <include name="lib/*.jar"/>
> </fileset>
> <pathelement location="${class.dir}" />
> </path>
>
> --DD
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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