开发者

How do Grails' inherited/framework dependencies work when using Maven?

开发者 https://www.devze.com 2023-03-18 12:06 出处:网络
According to: http://grails.org/doc/latest/guide/3.%20Configuration.html#3.7.8 Maven Integration Grails\' dependency resolution is disable开发者_JAVA百科d when using Maven and resolution instead occ

According to:

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

Grails' dependency resolution is disable开发者_JAVA百科d 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号