Hi Dominique,
> From: Dominique Devienne
>
> I'm afraid not directly.... At least I can't think of one. In your
> situation, I'd write a <script> that creates that populates a
> copy tasks
> with every file of a Path, feeding a <fileset
> file="thefile"/> for each
> entry in Path#list() to <copy> (which accepts several filesets).
possibly there is a better way to define the paths. Originally
I tried to define something like
foo.jar.foo1=${foo.dir}/foo1.jar
foo.jar.foo2=${foo.dir}/foo2.jar
foo.jars=${foo.jar.foo1} ${foo.jar.foo2}
bar.jar.bar=${bar.dir}/bar.jar
bar.jars=${bar.jar.bar}
but I was not able to create a classpath from ${bar.jars} and
${foo.jars}, since the path element treats the entries with
multiple jar files as single element. Maybe someone knows a
better solution for this ?
Regards,
J�rg
> -----Original Message-----
> From: "Schaible, J�rg"
> Sent: Monday, March 24, 2003 5:40 AM
> To: Ant Users List
> Subject: [newbie] Copy jars mensioned in classpath
>
> Hi,
>
> my application is based on several other Java libraries.
> These are defined
> in an
> external property file, e.g.
>
> foo.jar.foo1=${foo.dir}/foo1.jar
> foo.jar.foo2=${foo.dir}/foo2.jar
> foo.path=${foo.jar.foo1}:${foo.jar.foo2}
>
> bar.jar.bar=${bar.dir}/bar.jar
> bar.path=${bar.jar.bar}
>
> you got the pattern ...
>
> In the build.xml I am now able to use this definitions like:
>
>
> <path id="classpath">
> <pathelement path="${foo.path}" />
> <pathelement path="${bar.path}" />
> </path>
>
> <target name="compile">
> <mkdir dir="${build.dir}" />
> <javac srcdir="${src.java}"
> destdir="${build.dir}"
> classpathref="classpath" >
> </javac>
> </target>
>
>
> Works fine.
>
> Now I want to copy the jars used in the classpath to a distribution
> directory,
> but I did not find a solution using the copy-task to define a
> fileset based
> on
> the definitions made above, since every definition could
> contain more than
> one
> jar file separated by a colon. Is there any task or a fileset
> construct,
> that
> enables me to get the jars from the involved classpath in a fileset?
> Regards,
> J�rg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]