On Fri, Feb 6, 2009 at 5:39 PM, Levi Hoogenberg
<[email protected]> wrote:
> Hi David,
>
> The following syntax works for me (I'm using 0.5.2):
>
>         compile('org.springframework:org.springframework.core:2.5.6.A') {
>                 dependencyConfigurationMappings.add 'compile'
>         }

Hi Levi,
Thanks for the reply.  That didn't quite work for me.  I'm using 0.5.2, also.

compile('org.springframework:org.springframework.core:2.5.6.A') {
                println "dependency config mappings before:
$dependencyConfigurationMappings.mappings"
                dependencyConfigurationMappings.add 'compile'
                println "dependency config mappings after:
$dependencyConfigurationMappings.mappings"
        }

results in the same error since the default mapping still exists in
the mapping container.  Here's the log output:

14:28:07.629 [main] INFO  Console out - dependency config mappings
before: ["compile":["default"]]
14:28:07.629 [main] INFO  Console out - dependency config mappings
after: ["compile":["default"], "*"
:["compile"]]
...
14:28:07.707 [main] DEBUG org.gradle.api.logging.LogLevel - problem :
configuration not found in org.
springframework#org.springframework.core;2.5.6.A: 'default'. It was
required from com.dz#example;1.0 compile

There does not seem to be a way to replace or remove existing mappings
aside from creating a new DependencyConfigurationMappingContainer.  If
I set dependencyConfigurationMappings to a new instance of
DependencyConfigurationMappingContainer and add my mapping without the
default mapping, the dependencies resolve.  Please let me know if
there's a better approach to take here.

> There may be a better/shorter way, I asked this on the user list myself this
> evening.
>
> Regards,
>   Levi

Thanks,
David

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

    http://xircles.codehaus.org/manage_email


Reply via email to