ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée <>
Subject Re: sorting or ordering of resolved jars
Date Wed, 27 May 2009 09:23:46 GMT
On vendredi 22 mai 2009 08:41:07 Geoff Clitheroe wrote:
> Hi Rob,
> > I reviewed those links, but I don't think that's quite what I'm after...
> >
> > Here as sample fragment of my ivy.xml:
> >        <dependencies>
> >                <dependency org="vendor1" name="patches"
> > rev="latest.integration" conf="*->@"/>
> >                <dependency org="myco" name="myenhancements"
> > rev="latest.integration" conf="*->@"/>
> >                <dependency org="vendor1" name="core-app"
> > rev="latest.integration" conf="*->@"/>
> >        </dependencies>
> >
> > I find that for the classpath generated by the above, the order of jars
> > is random.  I have 3 configurations and the CLASSPATH generated by Ivy
> > for each configuration is different.
> >
> > I was hoping the CLASSPATH jars could be in the same order as the
> > dependencies, or perhaps a dependency attribute existed that allowed me
> > to specify some sort of classpath sort order or priority.
> When you say the 'classpath generated by Ivy' does this mean you are
> using Ivyde?  I've never used it but from the screen shots from the
> latest milestone for the classpath container it looks like you can
> tell it to order the classpath based on the order in the ivy.xml.  If
> your not using Ivyde and are building the classpath in an ant file
> then send some details of the file.

Actually Ivy itself is ordering the classpath relatively to the order declared 
in the ivy.xml. Then there is an option in IvyDE to reorder them in the 
lexical order.

But it seems there is a bug in IvyDE:
Maybe Rob you are hitting this.


> > I realise that having an application depend on classpath order is a *bad
> > thing*, but surely it's not unheard of in the real world, is it?  Anyway,
> > in this case it's out of my hands - vendor app.
> Hmmm, it's probably only as bad as the lack of control you have over
> the classpath when you deploy, but yeah vendors do it all the time.  I
> would expect, at some time, this could cause unexpected behavior and
> hideous pain...
> Are the vendor jars encrypted or obfuscated in any way?  I would be
> very tempted to repackage the old jar and patch into a new jar.  If
> you go this way jarjar or proguard may be worth a look.
> Cheers,
> Geoff

  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message