【发布时间】:2016-06-11 12:47:23
【问题描述】:
多模块项目的模块具有以下依赖项:web->core->persistence
我在 web 模块中添加了 spring-boot-gradle-plugin:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.3.RELEASE")
}
}
apply plugin: 'spring-boot'
由于 spring-boot-gradle-plugin 下载旧的休眠版本,我在持久性模块中有重复。
我试图覆盖 web 模块中的休眠依赖项并且它正在工作:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.3.RELEASE")
}
}
apply plugin: 'spring-boot'
dependencies {
compile project(':core')
//Other dependencies
compile "org.hibernate:hibernate-core:${hibernateVersion}"
compile "org.hibernate:hibernate-validator:${hibernateValidatorVersion}"
compile "org.hibernate:hibernate-entitymanager:${hibernateVersion}"
}
为什么插件会下载旧的hibernate版本?是否有可能从 spring-boot-gradle-plugin 中排除旧的休眠版本?
【问题讨论】:
标签: spring hibernate dependencies multi-module spring-boot-gradle-plugin