2

According to:

http://grails.org/doc/latest/guide/3.%20Configuration.html#3.7.8 Maven Integration

Grails' dependency resolution is disabled when using Maven and resolution instead occurs from the pom. That doesn't seem to apply to the inherited/framework dependencies from what I can tell.

E.g. I'm trying to upgrade the version of slf4j from 1.5.8 -- which is what Grails imports -- to 1.6.1 so I can use the latest version of logback. I include the proper version of slf4j in my pom, yet when I attempt a 'mvn install', I get a warning about incompatible bindings. I've verified through the maven dependency plugin that no other version of slf4j is being included.

I tried adding an excludes in BuildConfig.groovy:

inherited("global") {
    excludes "slf4j-api"
}

But that didn't appear to work.

Tunaki
  • 132,869
  • 46
  • 340
  • 423
Justin Miller
  • 757
  • 2
  • 8
  • 19
  • I've noticed that the inherited tag can take names that aren't exactly what you'd think the plugin or group should be. Be sure to verify you're sending in the right text. – billjamesdev Jul 07 '11 at 22:08

1 Answers1

1

Either the documentation is incorrect or it's not working as described. Running maven you can still see ivy dependencies being picked up just set log "info" for Ivy resolver in BuildConfig to see it work. One other thing you can try is clearing your .ivy cache directory completely and run mvn package to rebuild. Make sure to run mvn clean before hand. This will eliminate any libraries that were cached by ivy from before. Also be aware that plugins will bring their own dependencies. Good Luck!

Dmitry.

dbrin
  • 15,525
  • 4
  • 56
  • 83
  • Dmitry, thanks fro the response. When you say "the documentation is incorrect..." are you saying that inherited dependencies ARE still resolved when using maven? – Justin Miller Jul 08 '11 at 13:48
  • Yes, dependencies are resolved both from maven pom and ivy. If you clear ivy cache and run "mvn clean package" you will see you ivy cache repopulated. – dbrin Jul 08 '11 at 23:33