ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <ddevie...@gmail.com>
Subject Re: does "property" could have several values?
Date Sat, 03 Dec 2005 16:57:09 GMT
> 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
View raw message