Grails 排除 EmailValidator (commons-validator) 依赖
Grails exclude EmailValidator (commons-validator) dependency
我试图从 Grails 默认依赖项中排除 Apache Commons 库版本 1.4.0,因为它有一个错误;
https://github.com/grails/grails-core/issues/9000
有些人建议用新的依赖项覆盖,所以我尝试了以下方法但无济于事。
inherits("global") {
// uncomment to disable ehcache
// excludes 'ehcache'
excludes 'commons-validator'
}
...
dependencies {
compile "commons-validator:commons-validator:1.5.1"
}
有人对如何属性实现这一点有什么建议吗?
如果您在全新的 Grails 2.5.5 应用程序上执行 grails dependency-report
,您可以看到:
+--- org.grails:grails-plugin-url-mappings:2.5.5
| \--- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4
| \--- org.grails:grails-validation:2.5.5
| \--- commons-validator:commons-validator:1.4.0
我认为如果您只添加依赖项并删除 excludes
,它应该可以工作。现在如果我们执行依赖报告:
+--- org.grails:grails-plugin-url-mappings:2.5.5
| \--- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4
| \--- org.grails:grails-validation:2.5.5
+--- commons-validator:commons-validator:1.5.1
版本 1.4.0
不再在类路径中。
我试图从 Grails 默认依赖项中排除 Apache Commons 库版本 1.4.0,因为它有一个错误; https://github.com/grails/grails-core/issues/9000
有些人建议用新的依赖项覆盖,所以我尝试了以下方法但无济于事。
inherits("global") {
// uncomment to disable ehcache
// excludes 'ehcache'
excludes 'commons-validator'
}
...
dependencies {
compile "commons-validator:commons-validator:1.5.1"
}
有人对如何属性实现这一点有什么建议吗?
如果您在全新的 Grails 2.5.5 应用程序上执行 grails dependency-report
,您可以看到:
+--- org.grails:grails-plugin-url-mappings:2.5.5
| \--- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4
| \--- org.grails:grails-validation:2.5.5
| \--- commons-validator:commons-validator:1.4.0
我认为如果您只添加依赖项并删除 excludes
,它应该可以工作。现在如果我们执行依赖报告:
+--- org.grails:grails-plugin-url-mappings:2.5.5
| \--- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4
| \--- org.grails:grails-validation:2.5.5
+--- commons-validator:commons-validator:1.5.1
版本 1.4.0
不再在类路径中。