HHH-12231 Have the provisioned WildFly server apply an override to JPA 2.2 API
This commit is contained in:
parent
a185c3a33d
commit
dd5e25fe9c
|
@ -8,7 +8,7 @@ import org.apache.tools.ant.filters.ReplaceTokens
|
|||
*/
|
||||
|
||||
plugins {
|
||||
id "org.wildfly.build.provision" version "0.0.2"
|
||||
id "org.wildfly.build.provision" version "0.0.3"
|
||||
}
|
||||
|
||||
apply from: rootProject.file( 'gradle/base-information.gradle' )
|
||||
|
@ -37,7 +37,6 @@ ext {
|
|||
|
||||
// "10" for WildFly 10.x, "11" for 11.x, etc
|
||||
wildFlyMajorVersion = project.wildflyVersion.split( '\\.' )[0]
|
||||
wildFlyJPA22PatchVersion = '1.0.0.Beta1'
|
||||
|
||||
artifactClassifier = "wildfly-${wildFlyMajorVersion}-dist"
|
||||
|
||||
|
@ -70,12 +69,16 @@ configurations {
|
|||
|
||||
provision {
|
||||
destinationDir = file("$project.wildFlyInstallDir")
|
||||
override( 'org.hibernate.javax.persistence:hibernate-jpa-2.1-api' ) {
|
||||
groupId = 'javax.persistence'
|
||||
artifactId = 'javax.persistence-api'
|
||||
version = '2.2'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
jipijapa "org.wildfly:jipijapa-hibernate5:${wildflyVersion}"
|
||||
byteBuddy libraries.byteBuddy
|
||||
wildflyJPA22Patch "org.hibernate.javax.persistence:hibernate-jpa-api-2.2-wildflymodules:${wildFlyJPA22PatchVersion}:wildfly-${wildflyVersion}-patch@zip"
|
||||
|
||||
testCompile project( ":hibernate-core" )
|
||||
testCompile project( ":hibernate-envers" )
|
||||
|
@ -167,23 +170,8 @@ task release( dependsOn: createModulesZip )
|
|||
task installWildFly( dependsOn: [createModulesZip, provision] ) {
|
||||
description = 'Downloads the WildFly distribution, installs it into a local directory, includes present version of Hibernate ORM, JPA 2.2 : ready for integration tests'
|
||||
|
||||
final File patchFile = configurations.wildflyJPA22Patch.resolvedConfiguration.resolvedArtifacts[0].file
|
||||
inputs.file( patchFile )
|
||||
|
||||
doLast {
|
||||
// until we have a version of WF supporting EE 8 (JPA 2.2), we need to patch
|
||||
// the install to support JPA 2.2
|
||||
|
||||
def executableExtension = (System.properties['os.name'].toLowerCase().contains('windows')) ? 'bat' : 'sh'
|
||||
|
||||
exec {
|
||||
ignoreExitValue = true
|
||||
|
||||
executable "$project.wildFlyInstallDir/bin/jboss-cli." + executableExtension
|
||||
args "patch apply $patchFile.absolutePath --override-all"
|
||||
}
|
||||
|
||||
// and then install the Hibernate ORM modules from the current build
|
||||
// install the Hibernate ORM modules from the current build
|
||||
copy {
|
||||
duplicatesStrategy DuplicatesStrategy.EXCLUDE
|
||||
from zipTree( createModulesZip.archivePath )
|
||||
|
|
Loading…
Reference in New Issue