Skip to content

Commit

Permalink
HHH-16511 - Ability to drop-in extra JDBC drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
sebersole committed Apr 25, 2023
1 parent a79b4df commit 519f0f7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*
4 changes: 4 additions & 0 deletions drivers/README.adoc
Original file line number Diff line number Diff line change
@@ -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.
9 changes: 9 additions & 0 deletions gradle/databases.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions gradle/java-module.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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+
Expand Down

0 comments on commit 519f0f7

Please sign in to comment.