ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Clitheroe <g.clithe...@gmail.com>
Subject Re: sorting or ordering of resolved jars
Date Fri, 22 May 2009 06:41:07 GMT
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.

>
> 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

Mime
View raw message