[GRADLE-1898] Runtime dependency ignored when another dependency already depends on a different configuration of the same dependency which is processed first Created: 07/Nov/11  Updated: 04/Jan/13  Resolved: 09/Nov/11

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-5
Fix Version/s: 1.0-milestone-6

Type: Bug
Reporter: Mauro Molinari Assignee: Unassigned
Resolution: Fixed Votes: 1

Attachments: Zip Archive GRADLE-1898.zip    

 Description   

Consider the attached multiproject.
The root project has a runtime dependency on projects A and B.
However, the war task depends on a custom task.
This custom task (which is then executed before the war) itself depends on the production of the JAR of a custom configuration of B: this JAR is marked with "custom" classifier.

On the other hand, A has a compile dependency on the custom configuration of B.
So, when the war task of the root project is invoked, in the WEB-INF lib of the resulting WAR I find:
A.jar
B-custom.jar

However, since the root project explicitely depends on project B (default configuration!), I would expect to find B.jar in the root project war too!

In real-world cases, if B-custom.jar is a stripped-down version of B.jar, the resulting war has an incomplete classpath.



 Comments   
Comment by Davide Cavestro [ 07/Nov/11 ]

This seems an annoying regression cause both milestone-3 and milestone-4 produce a WAR with the following contents

WEB-INF/
`-- lib
    |-- A.war
    |-- B-custom.jar
    `-- B.jar
Generated at Wed Jun 30 12:07:20 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.