Ivy Configuration Mapping Problem


(james.poli) #1

We’re starting to migrate from Ant to Gradle. As a level set we already have many large Ivy repositories we need to pull existing files (mostly jars containing classes) from using the compile configuration. We’re seeing a problem in that extra files not relative to the compile configuration are being retrieved from the Ivy repositories (and thus being added to the javac classpath). I believe the problem is tied to the special Ivy configuration mapping we’re using; i.e. ‘*->@’, to retrieve dependencies of an Ivy module. The Ivy documentation states it’s meaning as “all configurations of the module maps to their equivalent (same name) in the dependency”. This works fine with the Ant Ivy resolve task. It appears from a Gradle debug log that the compile configuration is literally being tied to every configuration in the dependency module: … 08:21:41.677 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Visiting dependency SAS_dependencies#sas.core;904000.2.0.20121114190000_v940(compile) -> SAS_content#sas.core;904000.2.0.20121114190000_v940([compile, runtime, install_only, external_resource, VJR, src]) … As a workaround we’re filtering the compile classpath but that’s kind of a kludge. Looking for better solutions on how to get the configuration mapping working correctly?

Thanks in advance, Jim


(Luke Daley) #2

Hi James,

We deviate from the Ivy semantics here. There’s no switch for enabling the behaviour that you want unfortunately. This is a problem that we are keenly aware of and are working towards being able to provide a solution here.

I can’t give you any meaningful ETA unfortunately, but we are actively laying the groundwork to make the functionality you need possible.


(james.poli) #3

Hi Luke, Thanks for the quick, honest reply. We’ll work-around it for now and look forward to solution at a later point in time. Is there a defect/bug I can get added to so I know if/when it’s done? Heck even I’ll help test it. Again, thanks, Jim


(Luke Daley) #4

Hi James,

It’s GRADLE-1583.