ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jing Xue <jing...@digizenstudio.com>
Subject conditional resolving
Date Mon, 19 Nov 2007 20:47:47 GMT


Hi,

I ran into a situation where some dependencies are triggered based on  
how another one is resolved.

Spring 2.5 has reorganized some of the modules. So what was in 2.0's
spring-hibernate3 will be in 2.5's spring-orm, and what was in 2.0's
spring-dao will be in 2.5's spring-tx.  I have a library project that
I'm hoping to support both 2.0 and 2.5 for a while, so I have this in
the ivy.xml:

<dependency org="org.springframework" name="spring-hibernate3"
rev="[2.0, 2.6["  />

which of course will always resolve to the latest 2.0.x because there
is never going to be a 2.5 version for it.  The bigger problem is I
can't find a sane way to specify the replacement, spring-orm, as a
dependency so that the whole thing works with both spring 2.0 and 2.5.

The condition involved here is probably more complex than a version  
switch. It would look something like "use spring-hibernates if  
spring-core is resolved to 2.0, but use spring-orm if spring-core is  
resolved to 2.5."

Any thoughts?
-- 
Jing Xue



Mime
View raw message