2015-05-19 00:23:35 -04:00
|
|
|
/*
|
|
|
|
* 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>.
|
|
|
|
*/
|
2011-02-22 17:28:42 -05:00
|
|
|
configurations {
|
|
|
|
all*.exclude group: 'org.jboss.logging', module: 'jboss-logging-spi'
|
|
|
|
}
|
|
|
|
|
2015-08-06 05:55:52 -04:00
|
|
|
if ( project.hasProperty( 'overrideInfinispanVersionForTesting' ) ) {
|
|
|
|
println 'Overrriding Infinispan version to test vs Infinispan version: ' + overrideInfinispanVersionForTesting
|
|
|
|
configurations.testRuntime.resolutionStrategy.force 'org.infinispan:infinispan-core:' + overrideInfinispanVersionForTesting
|
2015-08-06 05:28:14 -04:00
|
|
|
}
|
|
|
|
|
2010-10-09 14:55:13 -04:00
|
|
|
dependencies {
|
2012-03-09 14:34:02 -05:00
|
|
|
compile project( ':hibernate-core' )
|
2012-08-08 05:09:11 -04:00
|
|
|
compile( libraries.infinispan )
|
2012-03-09 14:34:02 -05:00
|
|
|
|
2013-11-26 18:48:25 -05:00
|
|
|
testCompile project( ':hibernate-testing' )
|
2012-08-08 05:09:11 -04:00
|
|
|
testCompile( libraries.infinispan_test )
|
|
|
|
testCompile( libraries.jboss_common_core )
|
|
|
|
testCompile( libraries.jnp_client )
|
|
|
|
testCompile( libraries.jnp_server )
|
2015-08-04 05:24:26 -04:00
|
|
|
testCompile( libraries.mockito )
|
2012-09-25 10:39:32 -04:00
|
|
|
testCompile ('mysql:mysql-connector-java:5.1.17')
|
2010-10-09 14:55:13 -04:00
|
|
|
}
|
|
|
|
|
2015-04-10 12:58:22 -04:00
|
|
|
mavenPom {
|
|
|
|
name = 'Hibernate/Infinispan Integration'
|
|
|
|
description = 'Integration for Infinispan into Hibernate as a second-level caching service'
|
2013-04-16 19:25:20 -04:00
|
|
|
}
|
|
|
|
|
2013-12-02 21:53:19 -05:00
|
|
|
def osgiDescription() {
|
2015-04-10 12:58:22 -04:00
|
|
|
return mavenPom.description
|
2013-12-02 21:53:19 -05:00
|
|
|
}
|
|
|
|
|
2015-07-27 12:00:30 -04:00
|
|
|
classes.doLast {
|
|
|
|
javaexec {
|
|
|
|
classpath = project.sourceSets.main.runtimeClasspath
|
|
|
|
main = "org.infinispan.factories.components.ComponentMetadataPersister"
|
|
|
|
args = [
|
|
|
|
project.sourceSets.main.output.classesDir,
|
|
|
|
project.sourceSets.main.output.resourcesDir.toPath().resolve("hibernate-infinispan-component-metadata.dat").toString()
|
|
|
|
].toList()
|
|
|
|
standardOutput = { def f = File.createTempFile('metadata-log', null ); f.deleteOnExit(); f.newOutputStream() }()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-10-09 14:55:13 -04:00
|
|
|
test {
|
2010-10-15 12:24:44 -04:00
|
|
|
systemProperties['java.net.preferIPv4Stack'] = true
|
|
|
|
systemProperties['jgroups.ping.timeout'] = 500
|
|
|
|
systemProperties['jgroups.ping.num_initial_members'] = 1
|
|
|
|
systemProperties['jgroups.udp.enable_bundling'] = false
|
|
|
|
systemProperties['jgroups.bind_addr'] = 'localhost'
|
2012-01-10 13:09:01 -05:00
|
|
|
// Use Infinispan's test JGroups stack that uses TEST_PING
|
2012-10-23 03:27:27 -04:00
|
|
|
systemProperties['hibernate.cache.infinispan.jgroups_cfg'] = '2lc-test-tcp.xml'
|
|
|
|
// systemProperties['log4j.configuration'] = 'file:/log4j/log4j-infinispan.xml'
|
2015-11-11 17:00:10 -05:00
|
|
|
enabled = project.hasProperty('testInfinispan')
|
2015-08-26 10:21:03 -04:00
|
|
|
// Without this I have trouble running specific test using --tests switch
|
|
|
|
doFirst {
|
|
|
|
filter.includePatterns.each {
|
|
|
|
include "${it.replaceAll('\\.', "\\${File.separator}")}.class"
|
|
|
|
}
|
|
|
|
filter.setIncludePatterns('*')
|
|
|
|
}
|
2010-10-09 14:55:13 -04:00
|
|
|
}
|
|
|
|
|
2012-09-25 10:39:32 -04:00
|
|
|
task packageTests(type: Jar) {
|
|
|
|
from sourceSets.test.output
|
|
|
|
classifier = 'tests'
|
|
|
|
}
|
|
|
|
|
|
|
|
task sourcesTestJar(type: Jar, dependsOn:classes) {
|
|
|
|
from sourceSets.test.allSource
|
|
|
|
classifier = 'test-sources'
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts.archives packageTests
|
|
|
|
artifacts.archives sourcesTestJar
|