HHH-16511 - Ability to drop-in extra JDBC drivers

This commit is contained in:
Steve Ebersole 2023-04-24 14:35:51 -05:00
parent a79b4df426
commit 519f0f7ced
4 changed files with 15 additions and 0 deletions

1
drivers/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
**/*

4
drivers/README.adoc Normal file
View File

@ -0,0 +1,4 @@
== Extra JDBC Drivers
This directory is a place to drop JDBC drivers (or any test related jars) to be added to the project's
`testRuntimeOnly` class-path.

View File

@ -82,6 +82,15 @@ ext {
'jdbc.url' : 'jdbc:jtds:sybase://' + dbHost + ':5000/hibernate_orm_test;maxStatements=0;cacheMetaData=false',
'connection.init_sql' : 'set ansinull on'
],
sybase_jconn_ci : [
'db.dialect' : 'org.hibernate.dialect.SybaseASEDialect',
'jdbc.driver': 'com.sybase.jdbc4.jdbc.SybDriver',
'jdbc.user' : 'hibernate_orm_test',
'jdbc.pass' : 'hibernate_orm_test',
// Disable prepared statement caching to avoid issues with changing schemas
'jdbc.url' : 'jdbc:sybase:Tds:' + dbHost + ':5000/hibernate_orm_test?SQLINITSTRING=set quoted_identifier on&SQLINITSTRING=set ANSINULL on',
'connection.init_sql' : ''
],
mysql : [
'db.dialect' : 'org.hibernate.dialect.MySQLDialect',
'jdbc.driver': 'com.mysql.cj.jdbc.Driver',

View File

@ -95,6 +95,7 @@ dependencies {
testRuntimeOnly dbLibs.oracleXml
testRuntimeOnly dbLibs.oracleXmlParser
testRuntimeOnly dbLibs.sybase
testRuntimeOnly rootProject.fileTree(dir: 'drivers', include: '*.jar')
// Since both the DB2 driver and HANA have a package "net.jpountz" we have to add dependencies conditionally
// This is due to the "no split-packages" requirement of Java 9+