Skip to content

Commit a8f00b0

Browse files
committed
Make use of narayana Jakarta artifacts
1 parent 0750c67 commit a8f00b0

File tree

6 files changed

+122
-202
lines changed

6 files changed

+122
-202
lines changed

gradle/libraries.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,8 @@ ext {
141141
jodaTime: "joda-time:joda-time:${jodaTimeVersion}",
142142

143143
informix: 'com.ibm.informix:jdbc:4.10.12',
144-
jboss_jta: "org.jboss.narayana.jta:narayana-jta:5.11.1.Final",
145-
// todo: update the version when the parent pom is published
146-
jboss_tx_spi: "org.jboss:jboss-transaction-spi:7.6.0.Final",
147-
// todo (jakarta): update the version when it is released
144+
jboss_jta: "org.jboss.narayana.jta:narayana-jta:5.11.2.Final",
145+
jboss_tx_spi: "org.jboss:jboss-transaction-spi:7.6.1.Final",
148146
jboss_jta_jakarta: "org.jboss.narayana.jta:narayana-jta-jakarta:5.11.2.Final",
149147
jboss_tx_spi_jakarta: "org.jboss:jboss-transaction-spi-jakarta:7.6.1.Final",
150148
xapool: "com.experlog:xapool:1.5.0",

hibernate-core-jakarta/hibernate-core-jakarta.gradle

Lines changed: 89 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -48,48 +48,47 @@ dependencies {
4848
'org.eclipse.transformer:org.eclipse.transformer:0.2.0',
4949
'org.eclipse.transformer:org.eclipse.transformer.cli:0.2.0'
5050

51-
// todo: enable again when we can finally use the Jakarta JARs from narayana
52-
// testCompile( project(':hibernate-testing-jakarta') )
53-
// testCompile fileTree(dir: 'libs', include: '*.jar')
54-
//
55-
// testCompile( libraries.shrinkwrap_api )
56-
// testCompile( libraries.shrinkwrap )
57-
// testCompile( libraries.jakarta_jacc )
58-
// testCompile( libraries.jakarta_validation )
59-
// testCompile( libraries.jandex )
60-
// testCompile( libraries.classmate )
61-
// testCompile( libraries.mockito )
62-
// testCompile( libraries.mockito_inline )
63-
// testCompile( libraries.jodaTime )
64-
// testCompile( libraries.assertj )
65-
//
66-
// testCompile( libraries.jakarta_cdi )
67-
//
68-
// testCompile( libraries.jakarta_validator ) {
69-
// // for test runtime
70-
// transitive = true
71-
// }
72-
//
73-
// // for testing stored procedure support
74-
// testCompile( libraries.derby )
75-
//
76-
// testRuntime( "org.jboss.spec.javax.ejb:jboss-ejb-api_3.2_spec:1.0.0.Final" )
77-
// testRuntime( libraries.jakarta_el )
78-
// testRuntime( 'jaxen:jaxen:1.1' )
79-
// testRuntime( libraries.javassist )
80-
// testRuntime( libraries.byteBuddy )
81-
// testRuntime( libraries.jakarta_weld )
82-
// testRuntime( libraries.atomikos )
83-
// testRuntime( libraries.atomikos_jta )
84-
//// todo (jakarta): replace this when the jakarta artifact is released
85-
// testRuntime( project(':hibernate-transaction-client') )
86-
//// testRuntime( libraries.wildfly_transaction_client_jakarta )
87-
//
88-
// testCompile libraries.shrinkwrap_descriptors_api_javaee
89-
// testCompile libraries.shrinkwrap_descriptors_impl_javaee
90-
//
91-
// testCompile libraries.jboss_ejb_spec_jar
92-
// testCompile libraries.jboss_annotation_spec_jar
51+
testCompile( project(':hibernate-testing-jakarta') )
52+
testCompile fileTree(dir: 'libs', include: '*.jar')
53+
54+
testCompile( libraries.shrinkwrap_api )
55+
testCompile( libraries.shrinkwrap )
56+
testCompile( libraries.jakarta_jacc )
57+
testCompile( libraries.jakarta_validation )
58+
testCompile( libraries.jandex )
59+
testCompile( libraries.classmate )
60+
testCompile( libraries.mockito )
61+
testCompile( libraries.mockito_inline )
62+
testCompile( libraries.jodaTime )
63+
testCompile( libraries.assertj )
64+
65+
testCompile( libraries.jakarta_cdi )
66+
67+
testCompile( libraries.jakarta_validator ) {
68+
// for test runtime
69+
transitive = true
70+
}
71+
72+
// for testing stored procedure support
73+
testCompile( libraries.derby )
74+
75+
testRuntime( "org.jboss.spec.javax.ejb:jboss-ejb-api_3.2_spec:1.0.0.Final" )
76+
testRuntime( libraries.jakarta_el )
77+
testRuntime( 'jaxen:jaxen:1.1' )
78+
testRuntime( libraries.javassist )
79+
testRuntime( libraries.byteBuddy )
80+
testRuntime( libraries.jakarta_weld )
81+
testRuntime( libraries.atomikos )
82+
testRuntime( libraries.atomikos_jta )
83+
// todo (jakarta): replace this when the jakarta artifact is released
84+
testRuntime( project(':hibernate-transaction-client') )
85+
// testRuntime( libraries.wildfly_transaction_client_jakarta )
86+
87+
testCompile libraries.shrinkwrap_descriptors_api_javaee
88+
testCompile libraries.shrinkwrap_descriptors_impl_javaee
89+
90+
testCompile libraries.jboss_ejb_spec_jar
91+
testCompile libraries.jboss_annotation_spec_jar
9392
}
9493

9594
jar {
@@ -134,52 +133,51 @@ jar {
134133
}
135134
}
136135

137-
// todo: enable again when we can finally use the Jakarta JARs from narayana
138-
//task unpackTestJar(type: Copy) {
139-
// dependsOn jar
140-
// fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
141-
// def outputDir = file("${buildDir}/unpacked/" + it.name)
142-
// from zipTree(it)
143-
// into outputDir
144-
// }
145-
//}
146-
//
147-
//task copyBundleResources (type: Copy) {
148-
// dependsOn unpackTestJar
149-
// File unpackedDir = new File(project.buildDir, "libs/hibernate-core-jakarta-${project.version}-test.jar")
150-
// ext {
151-
// bundlesTargetDir = file( "${buildDir}/bundles" )
152-
// bundleTokens = dbBundle[db]
153-
// ext.bundleTokens['buildDirName'] = buildDir.absolutePath
154-
// }
155-
//
156-
// from file("${buildDir}/unpacked/${unpackedDir.name}/templates")
157-
// into ext.bundlesTargetDir
158-
// filter( ReplaceTokens, tokens: ext.bundleTokens)
159-
// doFirst {
160-
// ext.bundlesTargetDir.mkdirs()
161-
// }
162-
//}
163-
//
164-
//processTestResources.dependsOn copyBundleResources
165-
//
166-
//artifacts {
167-
// tests new File(project.buildDir, "libs/hibernate-core-jakarta-${project.version}-test.jar")
168-
//}
169-
//
170-
//test {
171-
// fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
172-
// def outputDir = file("${buildDir}/unpacked/" + it.name)
173-
// testClassesDirs += files(outputDir)
174-
// classpath += files(outputDir)
175-
// }
176-
// systemProperty 'file.encoding', 'utf-8'
177-
//
178-
// if ( gradle.ext.javaVersions.test.launcher.asInt() >= 9 ) {
179-
// // See org.hibernate.boot.model.naming.NamingHelperTest.DefaultCharset.set
180-
// jvmArgs( ['--add-opens', 'java.base/java.nio.charset=ALL-UNNAMED'] )
181-
// // Weld needs this to generate proxies
182-
// jvmArgs( ['--add-opens', 'java.base/java.security=ALL-UNNAMED'] )
183-
// jvmArgs( ['--add-opens', 'java.base/java.lang=ALL-UNNAMED'] )
184-
// }
185-
//}
136+
task unpackTestJar(type: Copy) {
137+
dependsOn jar
138+
fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
139+
def outputDir = file("${buildDir}/unpacked/" + it.name)
140+
from zipTree(it)
141+
into outputDir
142+
}
143+
}
144+
145+
task copyBundleResources (type: Copy) {
146+
dependsOn unpackTestJar
147+
File unpackedDir = new File(project.buildDir, "libs/hibernate-core-jakarta-${project.version}-test.jar")
148+
ext {
149+
bundlesTargetDir = file( "${buildDir}/bundles" )
150+
bundleTokens = dbBundle[db]
151+
ext.bundleTokens['buildDirName'] = buildDir.absolutePath
152+
}
153+
154+
from file("${buildDir}/unpacked/${unpackedDir.name}/templates")
155+
into ext.bundlesTargetDir
156+
filter( ReplaceTokens, tokens: ext.bundleTokens)
157+
doFirst {
158+
ext.bundlesTargetDir.mkdirs()
159+
}
160+
}
161+
162+
processTestResources.dependsOn copyBundleResources
163+
164+
artifacts {
165+
tests new File(project.buildDir, "libs/hibernate-core-jakarta-${project.version}-test.jar")
166+
}
167+
168+
test {
169+
fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
170+
def outputDir = file("${buildDir}/unpacked/" + it.name)
171+
testClassesDirs += files(outputDir)
172+
classpath += files(outputDir)
173+
}
174+
systemProperty 'file.encoding', 'utf-8'
175+
176+
if ( gradle.ext.javaVersions.test.launcher.asInt() >= 9 ) {
177+
// See org.hibernate.boot.model.naming.NamingHelperTest.DefaultCharset.set
178+
jvmArgs( ['--add-opens', 'java.base/java.nio.charset=ALL-UNNAMED'] )
179+
// Weld needs this to generate proxies
180+
jvmArgs( ['--add-opens', 'java.base/java.security=ALL-UNNAMED'] )
181+
jvmArgs( ['--add-opens', 'java.base/java.lang=ALL-UNNAMED'] )
182+
}
183+
}

hibernate-envers-jakarta/hibernate-envers-jakarta.gradle

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ dependencies {
2929
'org.eclipse.transformer:org.eclipse.transformer.cli:0.2.0'
3030

3131
testCompile( project( ':hibernate-envers-jakarta' ) )
32-
// todo: enable again when we can finally use the Jakarta JARs from narayana
33-
// testCompile( project( ':hibernate-testing-jakarta' ) )
34-
// testCompile( project( path: ':hibernate-core-jakarta', configuration: 'tests' ) )
32+
testCompile( project( ':hibernate-testing-jakarta' ) )
33+
testCompile( project( path: ':hibernate-core-jakarta', configuration: 'tests' ) )
3534
}
3635

3736
jar {
@@ -76,30 +75,29 @@ jar {
7675
}
7776
}
7877

79-
// todo: enable again when we can finally use the Jakarta JARs from narayana
80-
//task unpackTestJar(type: Copy) {
81-
// dependsOn jar
82-
// fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
83-
// def outputDir = file("${buildDir}/unpacked/" + it.name)
84-
// from zipTree(it)
85-
// into outputDir
86-
// }
87-
//}
88-
//
89-
//test {
90-
// dependsOn unpackTestJar
91-
// fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
92-
// def outputDir = file("${buildDir}/unpacked/" + it.name)
93-
// testClassesDirs += files(outputDir)
94-
// classpath += files(outputDir)
95-
// }
96-
// systemProperty 'file.encoding', 'utf-8'
97-
//
98-
// if ( gradle.ext.javaVersions.test.launcher.asInt() >= 9 ) {
99-
// // See org.hibernate.boot.model.naming.NamingHelperTest.DefaultCharset.set
100-
// jvmArgs( ['--add-opens', 'java.base/java.nio.charset=ALL-UNNAMED'] )
101-
// // Weld needs this to generate proxies
102-
// jvmArgs( ['--add-opens', 'java.base/java.security=ALL-UNNAMED'] )
103-
// jvmArgs( ['--add-opens', 'java.base/java.lang=ALL-UNNAMED'] )
104-
// }
105-
//}
78+
task unpackTestJar(type: Copy) {
79+
dependsOn jar
80+
fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
81+
def outputDir = file("${buildDir}/unpacked/" + it.name)
82+
from zipTree(it)
83+
into outputDir
84+
}
85+
}
86+
87+
test {
88+
dependsOn unpackTestJar
89+
fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
90+
def outputDir = file("${buildDir}/unpacked/" + it.name)
91+
testClassesDirs += files(outputDir)
92+
classpath += files(outputDir)
93+
}
94+
systemProperty 'file.encoding', 'utf-8'
95+
96+
if ( gradle.ext.javaVersions.test.launcher.asInt() >= 9 ) {
97+
// See org.hibernate.boot.model.naming.NamingHelperTest.DefaultCharset.set
98+
jvmArgs( ['--add-opens', 'java.base/java.nio.charset=ALL-UNNAMED'] )
99+
// Weld needs this to generate proxies
100+
jvmArgs( ['--add-opens', 'java.base/java.security=ALL-UNNAMED'] )
101+
jvmArgs( ['--add-opens', 'java.base/java.lang=ALL-UNNAMED'] )
102+
}
103+
}

hibernate-jboss-jta/hibernate-jboss-jta.gradle

Lines changed: 0 additions & 70 deletions
This file was deleted.

hibernate-testing-jakarta/hibernate-testing-jakarta.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ dependencies {
2828
compile( libraries.byteman_bmunit )
2929
compile( libraries.xapool )
3030
compile( libraries.log4j )
31-
// todo (jakarta): replace this when the jakarta artifacts are released
32-
compile project( ':hibernate-jboss-jta' )
3331
compile( libraries.jboss_tx_spi_jakarta ) {
3432
transitive=false;
3533
}
36-
// compile ( libraries.jboss_jta_jakarta ) {
37-
// transitive=false;
38-
// }
34+
compile ( libraries.jboss_jta_jakarta ) {
35+
transitive=false;
36+
}
3937

4038
jakartaeeTransformJars 'biz.aQute.bnd:biz.aQute.bnd.transform:5.1.1',
4139
'commons-cli:commons-cli:1.4',

settings.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ include 'hibernate-core-jakarta'
9191
include 'hibernate-entitymanager'
9292
include 'hibernate-testing'
9393
include 'hibernate-testing-jakarta'
94-
// todo (jakarta): remove these two when the jakarta artifacts are released
95-
include 'hibernate-jboss-jta'
9694
include 'hibernate-transaction-client'
9795

9896
include 'hibernate-envers'

0 commit comments

Comments
 (0)