Make use of narayana Jakarta artifacts
This commit is contained in:
parent
0750c6784e
commit
a8f00b00aa
|
@ -141,10 +141,8 @@ ext {
|
||||||
jodaTime: "joda-time:joda-time:${jodaTimeVersion}",
|
jodaTime: "joda-time:joda-time:${jodaTimeVersion}",
|
||||||
|
|
||||||
informix: 'com.ibm.informix:jdbc:4.10.12',
|
informix: 'com.ibm.informix:jdbc:4.10.12',
|
||||||
jboss_jta: "org.jboss.narayana.jta:narayana-jta:5.11.1.Final",
|
jboss_jta: "org.jboss.narayana.jta:narayana-jta:5.11.2.Final",
|
||||||
// todo: update the version when the parent pom is published
|
jboss_tx_spi: "org.jboss:jboss-transaction-spi:7.6.1.Final",
|
||||||
jboss_tx_spi: "org.jboss:jboss-transaction-spi:7.6.0.Final",
|
|
||||||
// todo (jakarta): update the version when it is released
|
|
||||||
jboss_jta_jakarta: "org.jboss.narayana.jta:narayana-jta-jakarta:5.11.2.Final",
|
jboss_jta_jakarta: "org.jboss.narayana.jta:narayana-jta-jakarta:5.11.2.Final",
|
||||||
jboss_tx_spi_jakarta: "org.jboss:jboss-transaction-spi-jakarta:7.6.1.Final",
|
jboss_tx_spi_jakarta: "org.jboss:jboss-transaction-spi-jakarta:7.6.1.Final",
|
||||||
xapool: "com.experlog:xapool:1.5.0",
|
xapool: "com.experlog:xapool:1.5.0",
|
||||||
|
|
|
@ -48,48 +48,47 @@ dependencies {
|
||||||
'org.eclipse.transformer:org.eclipse.transformer:0.2.0',
|
'org.eclipse.transformer:org.eclipse.transformer:0.2.0',
|
||||||
'org.eclipse.transformer:org.eclipse.transformer.cli:0.2.0'
|
'org.eclipse.transformer:org.eclipse.transformer.cli:0.2.0'
|
||||||
|
|
||||||
// todo: enable again when we can finally use the Jakarta JARs from narayana
|
testCompile( project(':hibernate-testing-jakarta') )
|
||||||
// testCompile( project(':hibernate-testing-jakarta') )
|
testCompile fileTree(dir: 'libs', include: '*.jar')
|
||||||
// testCompile fileTree(dir: 'libs', include: '*.jar')
|
|
||||||
//
|
testCompile( libraries.shrinkwrap_api )
|
||||||
// testCompile( libraries.shrinkwrap_api )
|
testCompile( libraries.shrinkwrap )
|
||||||
// testCompile( libraries.shrinkwrap )
|
testCompile( libraries.jakarta_jacc )
|
||||||
// testCompile( libraries.jakarta_jacc )
|
testCompile( libraries.jakarta_validation )
|
||||||
// testCompile( libraries.jakarta_validation )
|
testCompile( libraries.jandex )
|
||||||
// testCompile( libraries.jandex )
|
testCompile( libraries.classmate )
|
||||||
// testCompile( libraries.classmate )
|
testCompile( libraries.mockito )
|
||||||
// testCompile( libraries.mockito )
|
testCompile( libraries.mockito_inline )
|
||||||
// testCompile( libraries.mockito_inline )
|
testCompile( libraries.jodaTime )
|
||||||
// testCompile( libraries.jodaTime )
|
testCompile( libraries.assertj )
|
||||||
// testCompile( libraries.assertj )
|
|
||||||
//
|
testCompile( libraries.jakarta_cdi )
|
||||||
// testCompile( libraries.jakarta_cdi )
|
|
||||||
//
|
testCompile( libraries.jakarta_validator ) {
|
||||||
// testCompile( libraries.jakarta_validator ) {
|
// for test runtime
|
||||||
// // for test runtime
|
transitive = true
|
||||||
// transitive = true
|
}
|
||||||
// }
|
|
||||||
//
|
// for testing stored procedure support
|
||||||
// // for testing stored procedure support
|
testCompile( libraries.derby )
|
||||||
// testCompile( libraries.derby )
|
|
||||||
//
|
testRuntime( "org.jboss.spec.javax.ejb:jboss-ejb-api_3.2_spec:1.0.0.Final" )
|
||||||
// testRuntime( "org.jboss.spec.javax.ejb:jboss-ejb-api_3.2_spec:1.0.0.Final" )
|
testRuntime( libraries.jakarta_el )
|
||||||
// testRuntime( libraries.jakarta_el )
|
testRuntime( 'jaxen:jaxen:1.1' )
|
||||||
// testRuntime( 'jaxen:jaxen:1.1' )
|
testRuntime( libraries.javassist )
|
||||||
// testRuntime( libraries.javassist )
|
testRuntime( libraries.byteBuddy )
|
||||||
// testRuntime( libraries.byteBuddy )
|
testRuntime( libraries.jakarta_weld )
|
||||||
// testRuntime( libraries.jakarta_weld )
|
testRuntime( libraries.atomikos )
|
||||||
// testRuntime( libraries.atomikos )
|
testRuntime( libraries.atomikos_jta )
|
||||||
// testRuntime( libraries.atomikos_jta )
|
// todo (jakarta): replace this when the jakarta artifact is released
|
||||||
//// todo (jakarta): replace this when the jakarta artifact is released
|
testRuntime( project(':hibernate-transaction-client') )
|
||||||
// testRuntime( project(':hibernate-transaction-client') )
|
// testRuntime( libraries.wildfly_transaction_client_jakarta )
|
||||||
//// testRuntime( libraries.wildfly_transaction_client_jakarta )
|
|
||||||
//
|
testCompile libraries.shrinkwrap_descriptors_api_javaee
|
||||||
// testCompile libraries.shrinkwrap_descriptors_api_javaee
|
testCompile libraries.shrinkwrap_descriptors_impl_javaee
|
||||||
// testCompile libraries.shrinkwrap_descriptors_impl_javaee
|
|
||||||
//
|
testCompile libraries.jboss_ejb_spec_jar
|
||||||
// testCompile libraries.jboss_ejb_spec_jar
|
testCompile libraries.jboss_annotation_spec_jar
|
||||||
// testCompile libraries.jboss_annotation_spec_jar
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
|
@ -134,52 +133,51 @@ jar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: enable again when we can finally use the Jakarta JARs from narayana
|
task unpackTestJar(type: Copy) {
|
||||||
//task unpackTestJar(type: Copy) {
|
dependsOn jar
|
||||||
// dependsOn jar
|
fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
|
||||||
// fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
|
def outputDir = file("${buildDir}/unpacked/" + it.name)
|
||||||
// def outputDir = file("${buildDir}/unpacked/" + it.name)
|
from zipTree(it)
|
||||||
// from zipTree(it)
|
into outputDir
|
||||||
// into outputDir
|
}
|
||||||
// }
|
}
|
||||||
//}
|
|
||||||
//
|
task copyBundleResources (type: Copy) {
|
||||||
//task copyBundleResources (type: Copy) {
|
dependsOn unpackTestJar
|
||||||
// dependsOn unpackTestJar
|
File unpackedDir = new File(project.buildDir, "libs/hibernate-core-jakarta-${project.version}-test.jar")
|
||||||
// File unpackedDir = new File(project.buildDir, "libs/hibernate-core-jakarta-${project.version}-test.jar")
|
ext {
|
||||||
// ext {
|
bundlesTargetDir = file( "${buildDir}/bundles" )
|
||||||
// bundlesTargetDir = file( "${buildDir}/bundles" )
|
bundleTokens = dbBundle[db]
|
||||||
// bundleTokens = dbBundle[db]
|
ext.bundleTokens['buildDirName'] = buildDir.absolutePath
|
||||||
// ext.bundleTokens['buildDirName'] = buildDir.absolutePath
|
}
|
||||||
// }
|
|
||||||
//
|
from file("${buildDir}/unpacked/${unpackedDir.name}/templates")
|
||||||
// from file("${buildDir}/unpacked/${unpackedDir.name}/templates")
|
into ext.bundlesTargetDir
|
||||||
// into ext.bundlesTargetDir
|
filter( ReplaceTokens, tokens: ext.bundleTokens)
|
||||||
// filter( ReplaceTokens, tokens: ext.bundleTokens)
|
doFirst {
|
||||||
// doFirst {
|
ext.bundlesTargetDir.mkdirs()
|
||||||
// ext.bundlesTargetDir.mkdirs()
|
}
|
||||||
// }
|
}
|
||||||
//}
|
|
||||||
//
|
processTestResources.dependsOn copyBundleResources
|
||||||
//processTestResources.dependsOn copyBundleResources
|
|
||||||
//
|
artifacts {
|
||||||
//artifacts {
|
tests new File(project.buildDir, "libs/hibernate-core-jakarta-${project.version}-test.jar")
|
||||||
// tests new File(project.buildDir, "libs/hibernate-core-jakarta-${project.version}-test.jar")
|
}
|
||||||
//}
|
|
||||||
//
|
test {
|
||||||
//test {
|
fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
|
||||||
// fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
|
def outputDir = file("${buildDir}/unpacked/" + it.name)
|
||||||
// def outputDir = file("${buildDir}/unpacked/" + it.name)
|
testClassesDirs += files(outputDir)
|
||||||
// testClassesDirs += files(outputDir)
|
classpath += files(outputDir)
|
||||||
// classpath += files(outputDir)
|
}
|
||||||
// }
|
systemProperty 'file.encoding', 'utf-8'
|
||||||
// systemProperty 'file.encoding', 'utf-8'
|
|
||||||
//
|
if ( gradle.ext.javaVersions.test.launcher.asInt() >= 9 ) {
|
||||||
// if ( gradle.ext.javaVersions.test.launcher.asInt() >= 9 ) {
|
// See org.hibernate.boot.model.naming.NamingHelperTest.DefaultCharset.set
|
||||||
// // See org.hibernate.boot.model.naming.NamingHelperTest.DefaultCharset.set
|
jvmArgs( ['--add-opens', 'java.base/java.nio.charset=ALL-UNNAMED'] )
|
||||||
// jvmArgs( ['--add-opens', 'java.base/java.nio.charset=ALL-UNNAMED'] )
|
// Weld needs this to generate proxies
|
||||||
// // Weld needs this to generate proxies
|
jvmArgs( ['--add-opens', 'java.base/java.security=ALL-UNNAMED'] )
|
||||||
// jvmArgs( ['--add-opens', 'java.base/java.security=ALL-UNNAMED'] )
|
jvmArgs( ['--add-opens', 'java.base/java.lang=ALL-UNNAMED'] )
|
||||||
// jvmArgs( ['--add-opens', 'java.base/java.lang=ALL-UNNAMED'] )
|
}
|
||||||
// }
|
}
|
||||||
//}
|
|
|
@ -29,9 +29,8 @@ dependencies {
|
||||||
'org.eclipse.transformer:org.eclipse.transformer.cli:0.2.0'
|
'org.eclipse.transformer:org.eclipse.transformer.cli:0.2.0'
|
||||||
|
|
||||||
testCompile( project( ':hibernate-envers-jakarta' ) )
|
testCompile( project( ':hibernate-envers-jakarta' ) )
|
||||||
// todo: enable again when we can finally use the Jakarta JARs from narayana
|
testCompile( project( ':hibernate-testing-jakarta' ) )
|
||||||
// testCompile( project( ':hibernate-testing-jakarta' ) )
|
testCompile( project( path: ':hibernate-core-jakarta', configuration: 'tests' ) )
|
||||||
// testCompile( project( path: ':hibernate-core-jakarta', configuration: 'tests' ) )
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
|
@ -76,30 +75,29 @@ jar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: enable again when we can finally use the Jakarta JARs from narayana
|
task unpackTestJar(type: Copy) {
|
||||||
//task unpackTestJar(type: Copy) {
|
dependsOn jar
|
||||||
// dependsOn jar
|
fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
|
||||||
// fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
|
def outputDir = file("${buildDir}/unpacked/" + it.name)
|
||||||
// def outputDir = file("${buildDir}/unpacked/" + it.name)
|
from zipTree(it)
|
||||||
// from zipTree(it)
|
into outputDir
|
||||||
// into outputDir
|
}
|
||||||
// }
|
}
|
||||||
//}
|
|
||||||
//
|
test {
|
||||||
//test {
|
dependsOn unpackTestJar
|
||||||
// dependsOn unpackTestJar
|
fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
|
||||||
// fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
|
def outputDir = file("${buildDir}/unpacked/" + it.name)
|
||||||
// def outputDir = file("${buildDir}/unpacked/" + it.name)
|
testClassesDirs += files(outputDir)
|
||||||
// testClassesDirs += files(outputDir)
|
classpath += files(outputDir)
|
||||||
// classpath += files(outputDir)
|
}
|
||||||
// }
|
systemProperty 'file.encoding', 'utf-8'
|
||||||
// systemProperty 'file.encoding', 'utf-8'
|
|
||||||
//
|
if ( gradle.ext.javaVersions.test.launcher.asInt() >= 9 ) {
|
||||||
// if ( gradle.ext.javaVersions.test.launcher.asInt() >= 9 ) {
|
// See org.hibernate.boot.model.naming.NamingHelperTest.DefaultCharset.set
|
||||||
// // See org.hibernate.boot.model.naming.NamingHelperTest.DefaultCharset.set
|
jvmArgs( ['--add-opens', 'java.base/java.nio.charset=ALL-UNNAMED'] )
|
||||||
// jvmArgs( ['--add-opens', 'java.base/java.nio.charset=ALL-UNNAMED'] )
|
// Weld needs this to generate proxies
|
||||||
// // Weld needs this to generate proxies
|
jvmArgs( ['--add-opens', 'java.base/java.security=ALL-UNNAMED'] )
|
||||||
// jvmArgs( ['--add-opens', 'java.base/java.security=ALL-UNNAMED'] )
|
jvmArgs( ['--add-opens', 'java.base/java.lang=ALL-UNNAMED'] )
|
||||||
// jvmArgs( ['--add-opens', 'java.base/java.lang=ALL-UNNAMED'] )
|
}
|
||||||
// }
|
}
|
||||||
//}
|
|
|
@ -1,70 +0,0 @@
|
||||||
/*
|
|
||||||
* Hibernate, Relational Persistence for Idiomatic Java
|
|
||||||
*
|
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
description = 'JBoss JTA transformed to be JTA 2.0 compatible'
|
|
||||||
|
|
||||||
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
|
|
||||||
|
|
||||||
tasks.withType(PublishToMavenRepository) {
|
|
||||||
onlyIf {
|
|
||||||
repository.name == "MavenLocal"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations {
|
|
||||||
jakartaeeTransformJars
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile( libraries.jakarta_jta )
|
|
||||||
compile( libraries.jakarta_resource )
|
|
||||||
compile( libraries.jboss_tx_spi_jakarta )
|
|
||||||
|
|
||||||
jakartaeeTransformJars 'biz.aQute.bnd:biz.aQute.bnd.transform:5.1.1',
|
|
||||||
'commons-cli:commons-cli:1.4',
|
|
||||||
'org.slf4j:slf4j-simple:1.7.30',
|
|
||||||
'org.slf4j:slf4j-api:1.7.26',
|
|
||||||
'org.eclipse.transformer:org.eclipse.transformer:0.2.0',
|
|
||||||
'org.eclipse.transformer:org.eclipse.transformer.cli:0.2.0'
|
|
||||||
testCompile ( libraries.jboss_jta ) {
|
|
||||||
transitive=false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
|
||||||
def sourceJarPath = project.configurations.testCompile.find { it.name.startsWith("narayana-jta-") }
|
|
||||||
inputs.files(sourceJarPath).skipWhenEmpty()
|
|
||||||
outputs.dir project.buildDir
|
|
||||||
doLast {
|
|
||||||
new File(project.buildDir, "libs").mkdirs()
|
|
||||||
fileTree(project.buildDir).matching { include 'libs/*.jar' }.each { delete it }
|
|
||||||
|
|
||||||
println 'Initial bundle jar name [ ' + sourceJarPath + ' ]'
|
|
||||||
|
|
||||||
def finalBundleJarName = project.buildDir.path + '/libs/hibernate-jboss-jta-' + project.version + ".jar"
|
|
||||||
println 'Default jakarta final bundle jar name [ ' + finalBundleJarName + ' ]'
|
|
||||||
|
|
||||||
def transformerArgs = [
|
|
||||||
sourceJarPath, finalBundleJarName,
|
|
||||||
'-q', // quiet output
|
|
||||||
'-tr', new File(getProjectDir().getParentFile(), 'rules/jakarta-renames.properties').path,
|
|
||||||
'-tv', new File(getProjectDir().getParentFile(), 'rules/jakarta-versions.properties').path,
|
|
||||||
'-td', new File(getProjectDir().getParentFile(), 'rules/jakarta-direct.properties').path,
|
|
||||||
]
|
|
||||||
|
|
||||||
println 'Transformer options:'
|
|
||||||
transformerArgs.each {
|
|
||||||
println ' [ ' + it + ' ]'
|
|
||||||
}
|
|
||||||
|
|
||||||
javaexec {
|
|
||||||
classpath configurations.jakartaeeTransformJars
|
|
||||||
main = 'org.eclipse.transformer.jakarta.JakartaTransformer'
|
|
||||||
args = transformerArgs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -28,14 +28,12 @@ dependencies {
|
||||||
compile( libraries.byteman_bmunit )
|
compile( libraries.byteman_bmunit )
|
||||||
compile( libraries.xapool )
|
compile( libraries.xapool )
|
||||||
compile( libraries.log4j )
|
compile( libraries.log4j )
|
||||||
// todo (jakarta): replace this when the jakarta artifacts are released
|
|
||||||
compile project( ':hibernate-jboss-jta' )
|
|
||||||
compile( libraries.jboss_tx_spi_jakarta ) {
|
compile( libraries.jboss_tx_spi_jakarta ) {
|
||||||
transitive=false;
|
transitive=false;
|
||||||
}
|
}
|
||||||
// compile ( libraries.jboss_jta_jakarta ) {
|
compile ( libraries.jboss_jta_jakarta ) {
|
||||||
// transitive=false;
|
transitive=false;
|
||||||
// }
|
}
|
||||||
|
|
||||||
jakartaeeTransformJars 'biz.aQute.bnd:biz.aQute.bnd.transform:5.1.1',
|
jakartaeeTransformJars 'biz.aQute.bnd:biz.aQute.bnd.transform:5.1.1',
|
||||||
'commons-cli:commons-cli:1.4',
|
'commons-cli:commons-cli:1.4',
|
||||||
|
|
|
@ -91,8 +91,6 @@ include 'hibernate-core-jakarta'
|
||||||
include 'hibernate-entitymanager'
|
include 'hibernate-entitymanager'
|
||||||
include 'hibernate-testing'
|
include 'hibernate-testing'
|
||||||
include 'hibernate-testing-jakarta'
|
include 'hibernate-testing-jakarta'
|
||||||
// todo (jakarta): remove these two when the jakarta artifacts are released
|
|
||||||
include 'hibernate-jboss-jta'
|
|
||||||
include 'hibernate-transaction-client'
|
include 'hibernate-transaction-client'
|
||||||
|
|
||||||
include 'hibernate-envers'
|
include 'hibernate-envers'
|
||||||
|
|
Loading…
Reference in New Issue