diff --git a/documentation/documentation.gradle b/documentation/documentation.gradle index e52467bbe9..7ae6595f32 100644 --- a/documentation/documentation.gradle +++ b/documentation/documentation.gradle @@ -1,3 +1,4 @@ +import org.apache.tools.ant.filters.ReplaceTokens import org.asciidoctor.gradle.AsciidoctorTask /* * Hibernate, Relational Persistence for Idiomatic Java @@ -69,8 +70,27 @@ dependencies { testCompile( project(path: ':hibernate-entitymanager', configuration: 'tests') ) testRuntime( libraries.h2 ) + testRuntime( libraries.hsqldb ) + testRuntime( libraries.postgresql ) + testRuntime( libraries.mysql ) } +processTestResources.doLast( { + copy { + from( sourceSets.test.java.srcDirs ) { + include '**/*.properties' + include '**/*.xml' + } + into sourceSets.test.output.classesDir + } + copy { + ext.targetDir = file( "${buildDir}/resources/test" ) + from file('src/test/resources') + into targetDir + filter( ReplaceTokens, tokens: dbBundle[db] ); + } +} ) + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // grouping tasks - declaration, see below for task dependency definitions // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/documentation/src/test/resources/hibernate.properties b/documentation/src/test/resources/hibernate.properties index cda8dd0f91..5b40489d55 100644 --- a/documentation/src/test/resources/hibernate.properties +++ b/documentation/src/test/resources/hibernate.properties @@ -5,10 +5,11 @@ # See the lgpl.txt file in the root directory or . # -hibernate.dialect org.hibernate.dialect.H2Dialect -hibernate.connection.driver_class org.h2.Driver -hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;LOCK_TIMEOUT=10000 -hibernate.connection.username sa +hibernate.dialect @db.dialect@ +hibernate.connection.driver_class @jdbc.driver@ +hibernate.connection.url @jdbc.url@ +hibernate.connection.username @jdbc.user@ +hibernate.connection.password @jdbc.pass@ hibernate.connection.pool_size 5