Hi David,

already forgot I'd run into that myself :) Luckily, I have the luxury of
managing the Ivy repository I'm using myself, so I took the easy (or lazy)
way and just added a few dummy *default* configurations where they were
needed. I figured that the best way to deal with it was to wait for one of
the Gradle committers to chime in with a solution.

By the way, I must say that I like your workaround better than mine - it
keeps the repository cleaner.

Regards,
  Levi

On Sun, Feb 8, 2009 at 9:09 PM, David Zeigler <[email protected]> wrote:

> 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