You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Jens v.P." <de...@jevopi.de> on 2001/12/18 15:57:34 UTC

Re[4]: Why are there paths and filesets?

Hello Erik,

  yes, of course you're right. Paths and filesets have more differences
then only the ordering information.

EH> Give a more concrete example of whats causing you trouble and I'm sure the
EH> ant-user community can help work out what you're after.

  The trouble is caused by java: Jar and Zip files can be used as
directories - this is what the difference between paths and filesets
makes vague.

  In my case - and I still think it's a very common one - I have to add
all libraries and classes defined in the classpath into one zip. The
classpath is usually defined as path, so is mine. But the zip tasks as
well as the jar task requires a fileset - what is correct since the
files and directories added to a zip must exists when they're added.
  But - and that was and is my problem - I don't want to define my
classpath twice (beware of inconsistence). Thus,  I have to "convert"
a path (classpath) into a fileset, and I solved this problem, see my
first mail. But, IMHO, the solution was little bit too dirty, so I
wondered if someone knows a better way - particularly since it's a
very common problem.

Best regards,
 Jens


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Re[4]: Why are there paths and filesets?

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 18 Dec 2001, Jens v. P. <de...@jevopi.de> wrote:

>   In my case - and I still think it's a very common one - I have to
>   add all libraries and classes defined in the classpath into one
>   zip.

I've never felt the need to do so before, so maybe it isn't that
common 8-)

Anyway, you can convert a path to a fileset as long as you have a
common root directory for your components.  It may be a little tricky,
but you can use pathconvert to translate the path into a property that
contains all components in a comma separated list.  Using this
property expanded as the value for a fileset's includes attribute
should do the trick (it is Diane's, I just remembered it 8-).

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>