On Nov 17, 2009, at 12:08 AM, Steve Ebersole wrote:

> Far easiest to explain this via example :)
> 
> I have a project which depends on "org.jboss:jbosscache-core:3.2.1.GA",
> jbosscache-core in turns has a dependency on
> "jgroups:jgroups:2.6.13.GA".  This dependency on jgroups is "leaked" in
> various ways to users of jbosscache-core such that my project also needs
> a compilation-time dep on jgroups.
> 
> My concern is keeping these versions in synch (my project should always
> defer to the version specified by jbosscache-core.  Is there a syntax
> for accomplishing that?

There is a way. 

version = 
configurations.someConf.resolvedConfiguration.firstLevelModuleDependencies.find 
{ dep -> moduleName == 'jbosscache-core' }.children.find { moduleName == 
'jgroups' }.moduleVersion

I had no time to try this out, but it should work. I guess you need a separate 
configuration to figure out the version so that it can be used when resolving 
compile.

We want to evolve our API to make access to the resolve data more convenient 
than it is now.

- Hans

--
Hans Dockter
Gradle Project Manager
http://www.gradle.org

> 
> -- 
> Steve Ebersole <[email protected]>
> Hibernate.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to