[GRADLE-2909] Project dependencies have changed since 1.4 for providedCompile project('path' : ':project', 'configuration' : 'tomcatOnly') Created: 01/Oct/13 Updated: 10/Feb/17 Resolved: 10/Feb/17 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Task | ||
Reporter: | Gradle Forums | Assignee: | Unassigned |
Resolution: | Won't Fix | Votes: | 1 |
Description |
providedCompile project('path' : ':project', 'configuration' : 'tomcatOnly') this works for bringing in a dependent war in gradle 1.4 It no longer works in gradle 1.5+ here is configuration from the subproject configurations {tomcatOnly task tomcatCommonJar(type: Jar) { jar.dependsOn 'tomcatCommonJar' artifacts { here is the root project apply plugin: 'java' dependencies { the root project has compile errors that are a result of the providedCompile statement not bringing in the dependent jar. What has changed between gradle 1.4 and 1.5+ because this works fine in 1.4? |
Comments |
Comment by Gradle Forums [ 01/Oct/13 ] |
Looks good to me. Did you do a clean build after switching Gradle versions? |
Comment by Gradle Forums [ 01/Oct/13 ] |
I did a clean and made sure the jars were rebuilt. No difference in the behavior. I looked at the log files using debug and I can see that in 1.4 the dependent jar is brought in, but I am now using 1.8 and there is no sign of the dependent jar file. The only relevant lines I see in the 1.8 debug log is this 12:59:38.922 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Visiting dependency sams:ConcurrentTaskEngine:unspecified(compile) -> com.sams:SAMS-COMMON:8.6.8(dependency: com.sams#SAMS-COMMON;8.6.8 {providedCompile=[tomcatOnly]}) whereas in 1.4 I see 14:11:38.977 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Visiting dependency sams#ConcurrentTaskEngine;unspecified(compile) -> com.sams#SAMS-COMMON;8.6.8([tomcatOnly]) 14:11:40.639 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Visiting dependency sams#ConcurrentTaskEngine;unspecified(providedRuntime) -> com.sams#SAMS-COMMON;8.6.8([tomcatOnly]) 14:11:40.710 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Visiting configuration com.sams#SAMS-COMMON;8.6.8(tomcatOnly). 14:11:40.713 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Attaching com.sams#SAMS-COMMON;8.6.8(tomcatOnly) to its parents. I can also see the dependent jar being included in 1.4 and not in the 1.8 log file. Something has changed semantically, I'm just not able to see it. Also, this issue starts with 1.5 and is consistent through 1.8. |
Comment by Peter Niederwieser [ 30/Oct/13 ] |
Here is a complete example. Running gradle build succeeds with 1.5 and 1.6, but fails with 1.7, 1.8, or master. settings.gradle: include "foo", "bar" foo/build.gradle: apply plugin: 'java' dependencies { bar/build.gradle: apply plugin: "java" configurations { task otherJar(type: Jar) { jar { artifacts { foo/src/main/java/Main.java: public class Main { bar/src/main/java/bar/Bar.java: package bar; public class Bar {} |
Comment by Benjamin Muschko [ 15/Nov/16 ] |
As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub. We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to. Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:
We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle! |
Comment by Benjamin Muschko [ 10/Feb/17 ] |
Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved. |