hibernate-orm/hibernate-infinispan/hibernate-infinispan.gradle

73 lines
2.1 KiB
Groovy

configurations {
all*.exclude group: 'org.jboss.logging', module: 'jboss-logging-spi'
}
if ( useInfinispan7ForTesting() ) {
configurations.testRuntime.resolutionStrategy.force 'org.infinispan:infinispan-core:7.2.1.Final'
}
private boolean useInfinispan7ForTesting() {
if ( project.hasProperty( 'useInfinispan7ForTesting' ) ) {
println 'useInfinispan7ForTesting = ' + useInfinispan7ForTesting
return useInfinispan7ForTesting.equals( 'true' );
}
else {
return false;
}
}
dependencies {
compile project( ':hibernate-core' )
compile( libraries.infinispan )
compile( libraries.rhq )
testCompile project( ':hibernate-testing' )
testCompile( libraries.infinispan_test )
testCompile( libraries.jboss_common_core )
testCompile( libraries.jnp_client )
testCompile( libraries.jnp_server )
testCompile( libraries.rhq )
testCompile ('mysql:mysql-connector-java:5.1.17')
}
def pomName() {
return 'Hibernate/Infinispan Integration'
}
def pomDescription() {
return 'Integration for Infinispan into Hibernate as a second-level caching service'
}
def osgiDescription() {
return pomDescription()
}
test {
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'
// Use Infinispan's test JGroups stack that uses TEST_PING
systemProperties['hibernate.cache.infinispan.jgroups_cfg'] = '2lc-test-tcp.xml'
// systemProperties['log4j.configuration'] = 'file:/log4j/log4j-infinispan.xml'
if ( useInfinispan7ForTesting() ) {
systemProperties['hibernate.cache.infinispan.cfg'] = 'src/test/resources/infinispan-7-configs.xml';
}
enabled = true
}
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