On Tue, 2009-11-10 at 08:00 -0500, Roger Studner wrote:
> First.. just a simple "is this really how a dependencies() section  
> looks:
> repositories {
>       mavenCentral()
> }
> 
> dependencies {
>       groovy 'org.codehaus.groovy:groovy:1.6.5'
>      compile group:'org.springframework', name:'spring',  
> version:'2.5.6'       
>       compile group: 'org.slf4j', name: 'slf4j-api', version: '1.5.2'
>       compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.5.2'
>       compile group: 'org.hibernate', name: 'ejb3-persistence', version:  
> '1.0.2.GA'
>       compile group: 'org.hibernate', name: 'hibernate-annotations',  
> version: '3.4.0.GA'
>       compile group: 'org.hibernate', name: 'hibernate', version: '3.2.1.ga'
>       compile group: 'org.hibernate', name: 'hibernate-entitymanager',  
> version: '3.4.0.GA'
>       compile group: 'org.hibernate', name: 'hibernate-commons- 
> annotations', version: '3.3.0.ga'
>       compile group: 'dom4j', name: 'dom4j', version: '1.6.1'
>       compile group: 'org.apache.poi', name:'poi', version:'3.5-FINAL'
>       compile group: 'org.apache.poi', name:'poi-contrib', version:'3.5- 
> FINAL'
>       compile group: 'org.apache.poi', name:'poi-scratchpad', version:'3.5- 
> FINAL'        
>       compile group: 'log4j', name:'log4j', version:'1.2.15'
>       compile group: 'commons-logging', name: 'commons-logging', version:  
> '1.1.1'       
>       testCompile group:'junit', name:'junit', version:'3.8.2'
>      testCompile group: 'junit', name: 'junit', version: '4.7'
>      testCompile group:'org.springframework', name:'spring',  
> version:'2.5.6'       
>      testCompile group:'org.springframework', name:'spring-test',  
> version:'2.5.6'       
>       testCompile group: 'org.slf4j', name: 'slf4j-api', version: '1.5.2'
>       testCompile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.5.2'
>       testCompile group: 'org.hibernate', name: 'ejb3-persistence',  
> version: '1.0.2.GA'
>       testCompile group: 'org.hibernate', name: 'hibernate-annotations',  
> version: '3.4.0.GA'
>       testCompile group: 'org.hibernate', name: 'hibernate', version:  
> '3.2.1.ga'
>       testCompile group: 'org.hibernate', name: 'hibernate-entitymanager',  
> version: '3.4.0.GA'
>       testCompile group: 'org.hibernate', name: 'hibernate-commons- 
> annotations', version: '3.3.0.ga'
>       testCompile group: 'dom4j', name: 'dom4j', version: '1.6.1'
>       testCompile group: 'org.apache.poi', name:'poi', version:'3.5-FINAL'
>       testCompile group: 'org.apache.poi', name:'poi-contrib', version:'3.5- 
> FINAL'
>       testCompile group: 'org.apache.poi', name:'poi-scratchpad',  
> version:'3.5-FINAL'   
>       testCompile group: 'log4j', name:'log4j', version:'1.2.15'
>       testCompile group: 'commons-logging', name: 'commons-logging',  
> version: '1.1.1'      
> }
No, the configuration are "additive" following the pattern described at
http://www.gradle.org/0.8/docs/userguide/userguide_single.html#sec:java_plugin_and_dependency_management

testCompile extends from compile meaning any dependency defined in
compile is automatically available in testCompile.

Also you should consider whether to utilize transitive dependencies.
This really depends on taste a bit, bu personally, for example, I'd say
to not specify dependency on hibernate-commons-annotations unless your
project itself is actually using it.  That is a "transitive dependency"
that will be pulled into your project by both hibernate-annotations and
hibernate-entity-manager.  Same for slf4j, although there slf4j-log4j12
should really be a runtime dep not s compile dep as well.

-- 
Steve Ebersole <[email protected]>
Hibernate.org


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to