a little improvment on the build script

This commit is contained in:
Strong Liu 2012-03-23 16:02:45 +08:00
parent 5a2b019e66
commit d2852e3c4d
3 changed files with 5 additions and 15 deletions

View File

@ -60,7 +60,7 @@ libraries = [
// Annotations // Annotations
commons_annotations: commons_annotations:
'org.hibernate.common:hibernate-commons-annotations:4.0.1.Final', 'org.hibernate.common:hibernate-commons-annotations:4.0.1.Final@jar',
jandex: 'org.jboss:jandex:1.0.3.Final', jandex: 'org.jboss:jandex:1.0.3.Final',
classmate: 'com.fasterxml:classmate:0.5.4', classmate: 'com.fasterxml:classmate:0.5.4',
@ -145,10 +145,6 @@ subprojects { subProject ->
} }
toolsJar = file("${System.getProperty('java.home')}/../lib/tools.jar") toolsJar = file("${System.getProperty('java.home')}/../lib/tools.jar")
if(!toolsJar.exists()){
toolsJar = file("${System.getProperty('java.home')}/../Classes/classes.jar")
}
// appropriately inject the common dependencies into each sub-project // appropriately inject the common dependencies into each sub-project
dependencies { dependencies {
compile( libraries.logging ) compile( libraries.logging )
@ -156,7 +152,7 @@ subprojects { subProject ->
testCompile( libraries.byteman ) testCompile( libraries.byteman )
testCompile( libraries.byteman_install ) testCompile( libraries.byteman_install )
testCompile( libraries.byteman_bmunit ) testCompile( libraries.byteman_bmunit )
testCompile files( toolsJar ) testCompile files( toolsJar )
testRuntime( libraries.slf4j_api ) testRuntime( libraries.slf4j_api )
testRuntime( libraries.slf4j_log4j12 ) testRuntime( libraries.slf4j_log4j12 )
testRuntime( libraries.jcl_slf4j ) testRuntime( libraries.jcl_slf4j )

View File

@ -5,12 +5,8 @@ apply plugin: org.hibernate.build.gradle.testing.matrix.MatrixTestingPlugin
dependencies { dependencies {
compile( libraries.jta ) compile( libraries.jta )
compile( libraries.dom4j ) { compile( libraries.dom4j )
transitive = false compile( libraries.commons_annotations )
}
compile( libraries.commons_annotations ) {
transitive = false
}
compile( libraries.jpa ) compile( libraries.jpa )
compile( libraries.javassist ) compile( libraries.javassist )
compile( libraries.antlr ) compile( libraries.antlr )

View File

@ -6,9 +6,7 @@ dependencies {
compile( project( ':hibernate-entitymanager' ) ) compile( project( ':hibernate-entitymanager' ) )
compile( libraries.commons_annotations ) compile( libraries.commons_annotations )
provided( [group: 'org.hibernate', name: 'hibernate-tools', version: '3.2.0.ga'] ) provided( [group: 'org.hibernate', name: 'hibernate-tools', version: '3.2.0.ga'] )
compile( libraries.dom4j ) { compile( libraries.dom4j )
trasitive = false
}
provided( libraries.ant ) provided( libraries.ant )
testCompile( libraries.junit ) testCompile( libraries.junit )
testCompile( project(':hibernate-testing') ) testCompile( project(':hibernate-testing') )