Remove reflection usage in orm.hibernate4.*
Previously reflection was required when interacting with Hibernate 4 in order to support both Hibernate 3 and Hibernate 4 since there were non-passive changes in the APIs. Now that the Spring build uses Gradle it is trivial to support multiple Hibernate versions. This commit removes the reflection usage in orm.hibernate4.* by creating a spring-orm-hibernate4 module that uses gradle/merge-artifacts.gradle to build a single artifact but keep distinct classpaths. Issue: SPR-10039
This commit is contained in:
21
build.gradle
21
build.gradle
@@ -431,10 +431,9 @@ project('spring-orm') {
|
||||
// our respective orm.hibernate3 and orm.hibernate4 packages
|
||||
compile("aopalliance:aopalliance:1.0")
|
||||
compile("org.hibernate:com.springsource.org.hibernate:3.3.1.GA", optional)
|
||||
compile("org.hibernate:hibernate-core:4.1.0.Final", optional)
|
||||
compile("org.hibernate:hibernate-cglib-repack:2.1_3", optional)
|
||||
compile("org.hibernate:hibernate-annotations:3.4.0.GA", optional)
|
||||
compile("org.hibernate:hibernate-entitymanager:4.1.0.Final", optional)
|
||||
compile("org.hibernate:hibernate-entitymanager:3.4.0.GA", optional)
|
||||
compile("org.apache.openjpa:openjpa:1.1.0", optional)
|
||||
compile("org.eclipse.persistence:org.eclipse.persistence.core:1.0.1", optional)
|
||||
compile("org.eclipse.persistence:org.eclipse.persistence.jpa:1.0.1", optional)
|
||||
@@ -459,6 +458,24 @@ project('spring-orm') {
|
||||
}
|
||||
}
|
||||
|
||||
project('spring-orm-hibernate4') {
|
||||
description = 'Spring Object/Relational Mapping - Hibernate 4 support'
|
||||
ext.mergeIntoProject = project(':spring-orm')
|
||||
apply from: "${gradleScriptDir}/merge-artifacts.gradle"
|
||||
dependencies {
|
||||
compile project(":spring-orm").sourceSets.main.output
|
||||
compile project(":spring-tx")
|
||||
compile project(":spring-jdbc")
|
||||
compile("org.hibernate:hibernate-core:4.1.0.Final", optional)
|
||||
compile("org.hibernate:hibernate-entitymanager:4.1.0.Final", optional)
|
||||
compile(project(":spring-web")) { dep ->
|
||||
optional dep
|
||||
exclude group: 'javax.persistence', module: 'persistence-api'
|
||||
}
|
||||
compile("javax.servlet:servlet-api:2.5", optional)
|
||||
}
|
||||
}
|
||||
|
||||
project('spring-webmvc') {
|
||||
description = 'Spring Web MVC'
|
||||
dependencies {
|
||||
|
||||
Reference in New Issue
Block a user