Hello,

the "runtime" extends the "compile" dependency.

Look at the "User Guide": 20.5. Dependency management

You can use the "dependencyReport" to show informations about the dependencies.

regards,
Mathias Kalb

Am 22.02.2011 08:03, schrieb buzz chopra:
Hello Gradle User Community,

Either I'm not understanding the concept of configurations or there is
a bug. Before I file a bug I'd like to ask the user community if my
understanding is in/correct:

It seems that the dependencies calculated for each of the
configurations below ("compile" and "runtime") are not mutually
exclusive - that is servlet-api-2.5.jar shows up in the "runtime"
collection even though it is:
   1. not explicitly included in the "runtime" configuration
   2. excluded from the stuff that might include it as a transitive
dependency in the "runtime" configuration

Question: Am I not using the concept of a configuration correctly?

Thanks in advance!

Bz

Given:
--- contents of gradle.build follow ---
   dependencies {
     compile( group: 'javax.servlet', name: 'servlet-api', version: '2.5' )
     compile( group: 'org.eclipse.jetty.aggregate', name:
'jetty-servlet',      version: '7.3.0.v20110203' )
     compile( project(':common') )

     runtime( group: 'org.eclipse.jetty.aggregate', name:
'jetty-servlet',      version: '7.3.0.v20110203' ) { exclude group:
'javax.servlet', name: 'servlet-api' }
     runtime( project(':common') ) { exclude group: 'javax.servlet',
name: 'servlet-api' }
   }

   task print_runtime_classpath<<  {
      configurations.runtime.collect { print "${it} \n" }
   }
--- contents of gradle.build end ---

In this case, the following is executed and printed:

   [bz@bluegiant client]$ gradle -v

   ------------------------------------------------------------
   Gradle 0.9.2
   ------------------------------------------------------------

   Gradle build time: Sunday, 23 January 2011 01:34:21 PM EST
   Groovy: 1.7.6
   Ant: Apache Ant version 1.8.1 compiled on April 30 2010
   Ivy: 2.2.0
   JVM: 1.6.0_21 (Sun Microsystems Inc. 17.0-b16)
   OS: Linux 2.6.35.10-74.fc14.x86_64 amd64

   [bz@bluegiant client]$ gradle print_runtime_classpath
   :client:print_runtime_classpath
   
/home/bz/.gradle/cache/org.eclipse.jetty.aggregate/jetty-servlet/jars/jetty-servlet-7.3.0.v20110203.jar
   /home/bz/Dev/test/common/build/libs/common.jar
   /home/bz/.gradle/cache/javax.servlet/servlet-api/jars/servlet-api-2.5.jar

BUILD SUCCESSFUL

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

     http://xircles.codehaus.org/manage_email





--
PRODATO Integration Technology GmbH
Hauptstrasse 40, 91054 Erlangen
http://www.prodato.de

Mathias Kalb, Dipl.-Inf. (FH)
mailto:[email protected]
fon: +49-9131-612877
fax: +49-9131-612881

Sitz: Ebermannstadt, Registergericht Bamberg HRB 3748
Geschäftsführer: Dr. Michael Schlundt, Dr. Christian Meiler, Prof. Dr. Stefan 
Jablonski
USt-IdNr. DE199384894


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

   http://xircles.codehaus.org/manage_email


Reply via email to