Grails“呈现”插件使用org.xhtmlrenderer。Grails本身附带org.xhtmlrenderer:core-renderer:R8,它显然来自依赖-报告使用grails。
这个版本的xhtmlrender中有一个bug,它与twitter引导程序冲突,并且只修复在github存储库中。我已经构建了这个新版本并通过maven成功地安装了它,但是对于我的生活,我无法得到“呈现”插件来使用它。我甚至尝试构建自己版本的呈现插件,但这不起作用,而且根据相关性报告,“呈现”甚至不依赖于org.xhtmlrenderer:core-renderer:R8。
在BuildConfig.groovy中,我尝试过(在许多其他事情中):
inherits("global") {
// specify dependency exclusions here; for example, uncomment this to disable ehcache:
// excludes 'ehcache'
excludes 'core-renderer-M8', 'org.xhtmlrenderer', 'core-renderer'
}和
compile 'org.xhtmlrenderer:flying-saucer-core:9.0.1-custom'
runtime 'org.xhtmlrenderer:flying-saucer-core:9.0.1-custom'都没有用。
我如何获得“呈现”来使用我定制的org.xhtmlrenderer构建?构建一个本地版本的“呈现”插件并将我在项目BuildConfig.groovy中尝试过的排除和依赖信息添加到插件BuildConfig.groovy中,这是一个诀窍吗?
发布于 2015-05-19 15:58:40
您需要做的是将grails从继承的全局依赖项中排除出来,然后具体地添加它,排除xhtmlrenderer (尽管它看起来只是包名,您需要排除飞酱油核心)。这将使您可以指定自己版本的库。
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
excludes 'grails-docs'
}
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
// runtime 'mysql:mysql-connector-java:5.1.24'
build('org.grails:grails-docs:2.3.7') {
excludes 'flying-saucer-core'
}
}
}https://stackoverflow.com/questions/30315981
复制相似问题