You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Knuplesch,
Jürgen <Ju...@icongmbh.de> on 2007/09/13 10:52:08 UTC
Sorted Fileset
Hello,
To create a correct classpath it is sometimes necessary to order the .jar-Files in the right sequence.
A fileset does not give the guarantee about the sequence.
What we have ist a directory with .jar-Files that should be included into the classpath.
Then I build the classpath by doing a loop using ANTCONTRIB.
Is it possible to adjust the sequence of a fileset?
Greetings
Jürgen
--
Jürgen Knuplesch www.icongmbh.de
icon Systemhaus GmbH Tel. +49 711 806098-275
Sophienstraße 40
D-70178 Stuttgart Fax. +49 711 806098-299
Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Sorted Fileset
Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
Hi,
-----Original Message-----
From: Knuplesch, Jürgen [mailto:Juergen.Knuplesch@icongmbh.de]
Sent: Thursday, September 13, 2007 10:52 AM
To: user@ant.apache.org
Subject: Sorted Fileset
/*
Hello,
To create a correct classpath it is sometimes necessary to order the .jar-Files in the right sequence.
A fileset does not give the guarantee about the sequence.
What we have ist a directory with .jar-Files that should be included into the classpath.
Then I build the classpath by doing a loop using ANTCONTRIB.
Is it possible to adjust the sequence of a fileset?
*/
Have a look at the <SortList> Task of antcontrib.
I never used it, but maybe it's what you look for.
Regards, Gilbert
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Sorted Fileset
Posted by Steve Loughran <st...@apache.org>.
Knuplesch wrote:
> Hello,
>
> To create a correct classpath it is sometimes necessary to order the .jar-Files in the right sequence.
> A fileset does not give the guarantee about the sequence.
no, it doesnt,
>
> What we have ist a directory with .jar-Files that should be included into the classpath.
> Then I build the classpath by doing a loop using ANTCONTRIB.
>
> Is it possible to adjust the sequence of a fileset?
no, but you can use a filelist instead to explicitly order the list.
Having a program that only works if the classpath order is right is a
bad sign. It means you have duplicate resources or classes, and you are
going to get in trouble later on. Why not use Ant to create new JAR
files that selectively exclude the things you don't want?
--
Steve Loughran http://www.1060.org/blogxter/publish/5
Author: Ant in Action http://antbook.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org