Hmm... I wasn't using the war plugin - but I'll take a look at that. Thanks for the suggestion.
On Tue, Feb 22, 2011 at 7:09 AM, Spencer Allain <[email protected]>wrote: > If you are using the war plugin, then you'll want to add things that you do > not want included in the runtime configuration in the providedCompile > configuration (that gets added with the war plugin) > > -Spencer > > --- On *Tue, 2/22/11, buzz chopra <[email protected]>* wrote: > > > From: buzz chopra <[email protected]> > Subject: [gradle-user] dependencies, configurations, and a bug - maybe > To: [email protected] > Date: Tuesday, February 22, 2011, 2:03 AM > > 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 > > > >
