Re: [gradle-user] Re: Define transitive dependencies for subprojects

2011-01-28 Thread Mathias Kalb
Hi, I adopt the knowledge about transitive dependency to our real life use case. We have many WAR files which include two JARs. Both JARs are provided. It only works if i define it like the following example. Look at the difference between compile and providedCompile. That was unexpected for

[gradle-user] Re: Define transitive dependencies for subprojects

2011-01-28 Thread Peter Niederwieser
Mathias, of course, two simple transitive flags (one on Configuration and another on Dependency) won't allow you to model all conceivable cases. But that's not the goal. The real question is if they allow you to model the cases that are relevant in practice. Your last example looked very

Re: [gradle-user] Re: Define transitive dependencies for subprojects

2011-01-28 Thread Mathias Kalb
Hi, excuse me, that I was not clear. A general remark: It helps if posts are formulated as clearly and explicitly as possible. For example, your latest post raised the following questions in my head: - Why do you first say that the Jars are included in the War, and then use providedCompile?

[gradle-user] Re: Define transitive dependencies for subprojects

2011-01-28 Thread Peter Niederwieser
Your last example is a good candidate for a JIRA issue. Section 23.4 of the user guide touches the subject, but the workaround described there won't work for project dependencies. -- Peter Niederwieser Developer, Gradle http://www.gradle.org Trainer Consultant, Gradle Inc.

Re: [gradle-user] Re: Define transitive dependencies for subprojects

2011-01-27 Thread Mathias Kalb
Hi Peter, I tried it with the pair of parentheses, but the result was confusing. There is a difference between Code 1 and Code 2. Code 1: dependencies { compile (project(':MySubProject')) { transitive = false } } Code 2: configurations { compile.transitive = false }

[gradle-user] Re: Define transitive dependencies for subprojects

2011-01-27 Thread Peter Niederwieser
The first case is clear. The project dependency added to the compile configuration has transitive resolution disabled. This also affects configurations extending from compile, because they see the very same dependency (aliasing effect). In the second case, the question is what compile.transitive

Re: [gradle-user] Re: Define transitive dependencies for subprojects

2011-01-27 Thread Mathias Kalb
Hi Peter, thank you for your explanation. I expected the behavior of the second case also for the first case. But now I have a question. If I have two compile project dependencies, how can I define the behavior of the second case? dependencies { compile (project(':J1')) {

[gradle-user] Re: Define transitive dependencies for subprojects

2011-01-27 Thread Peter Niederwieser
Before devoting more time to this discussion, I'd like to hear a convincing use case. -- Peter Niederwieser Developer, Gradle http://www.gradle.org Trainer Consultant, Gradle Inc. http://www.gradle.biz Founder, Spock Framework http://spockframework.org -- View this message in context:

Re: [gradle-user] Re: Define transitive dependencies for subprojects

2011-01-27 Thread Mathias Kalb
Am 27.01.2011 19:23, schrieb Peter Niederwieser: Before devoting more time to this discussion, I'd like to hear a convincing use case. I don't have a real use case for this example. I'm learning gradle, writing examples and sometimes I find a bug or a missing feature. And maybe this is a

Re: [gradle-user] Re: Define transitive dependencies for subprojects

2011-01-27 Thread Hans Dockter
On Thu, Jan 27, 2011 at 6:29 PM, Mathias Kalb mathias.k...@prodato.dewrote: Hi Peter, thank you for your explanation. I expected the behavior of the second case also for the first case. But now I have a question. If I have two compile project dependencies, how can I define the behavior

Re: [gradle-user] Re: Define transitive dependencies for subprojects

2011-01-27 Thread Hans Dockter
On Thu, Jan 27, 2011 at 10:07 PM, Hans Dockter h...@gradle.biz wrote: On Thu, Jan 27, 2011 at 6:29 PM, Mathias Kalb mathias.k...@prodato.dewrote: Hi Peter, thank you for your explanation. I expected the behavior of the second case also for the first case. But now I have a question. If

[gradle-user] Re: Define transitive dependencies for subprojects

2011-01-26 Thread Peter Niederwieser
http://jira.codehaus.org/browse/GRADLE-1317 describes the problem (it's not limited to transitive = false) and the workaround. -- Peter Niederwieser Developer, Gradle http://www.gradle.org Trainer Consultant, Gradle Inc. http://www.gradle.biz Founder, Spock Framework http://spockframework.org

Re: [gradle-user] Re: Define transitive dependencies for subprojects

2011-01-26 Thread Mathias Kalb
Hi Peter, thank you. I know the mails from last week with the exclude problem. But I didn't thought, that it is the same bug. Should I add a comment to the JIRA issue with the transitive bug? regards, Mathias Kalb Am 26.01.2011 18:52, schrieb Peter Niederwieser:

[gradle-user] Re: Define transitive dependencies for subprojects

2011-01-26 Thread Peter Niederwieser
It's not an exclude or transitive bug. It's simply not possible to configure a project dependency without adding a pair of parentheses. As such it's not necessary to add a comment about transitive to the issue. -- Peter Niederwieser Developer, Gradle http://www.gradle.org Trainer Consultant,