Thanks for the insight. I'm coming from a "download them all and use Ant" background :) I did some build scripts with Ivy in Summer 2008, but that was about it (1.4.1 even).

I tried transitive=true to start things out, but was having so many problems (spring + hibernate + transitive.. and things got interesting fast hah).

But yeah, goal is to let it sort things out.. "trust the tool" :)

I've been using grails/groovy for a long time, so Gradle is a natural fit.

It all started because I wanted to try Jboss RESTEasy.. which is like 90 jars (slight exaggeration).. and then 'only' provide the dependencies for "what you need" via Maven.. and thus I figured.. time to finally get this all worked out.

It is because of great user communities like this.. that these things ahappen.


Roger

On Nov 10, 2009, at 8:21 AM, Steve Ebersole wrote:

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




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

   http://xircles.codehaus.org/manage_email


Reply via email to