[GRADLE-1597] Custom configuration transitive dependency omitted due to project naming Created: 07/Jun/11  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-2
Fix Version/s: None

Type: Bug
Reporter: Daniel Gredler Assignee: Unassigned
Resolution: Won't Fix Votes: 1

Attachments: File build.gradle     Text File log.txt    

 Description   

Sorry for using the "blocker" priority, but I think it may be appropriate here...

I have a project "jee:war" which generates a WAR, with a little extra customization in order to add a WebStart application to the WAR (build file attached). The client-side WebStart dependencies are specified using a custom configuration named "webstart".

Now, in terms of alphabetical order of the sub-projects, the "jee" directory which contains the "war" directory is almost last; there is only one sub-project that is transitively referenced in the "webstart" configuration that comes after "jee", and that is "label-printing". This is the dependency chain for the "label-printing" module which should get included transitively via the encoding client as part of the "webstart" configuration: "encoding:client" > "label-printing:client" > "label-printing:facade".

However, looking at the logs ("gradle jee:war:dependencies -i", output is attached), it appears that the sub-projects are evaluated in alphabetical order, and that the custom "webstart" configuration in "jee:war" is resolved at the time that the "jee:war" project is evaluated – before the "label-printing:client" project is evaluated. It appears that this results in any transitive dependencies out of "label-printing:client" being omitted from the custom "webstart" configuration, because the "label-printing:client" project hasn't been evaluated yet.

So it looks like some transitive project dependencies are being omitted from custom configurations just because they have a name that starts with a letter which appears later in the alphabet! If we rename the "jee:war" module to "xjee:war", so that it's last in the list of sub-projects (alphabetically), the "label-printing:facade" project gets included transitively in the custom "webstart" configuration!

Here's the most relevant section of the log file (with a couple of lines bolded, for emphasis):

Settings evaluated using settings file 'C:\work\trunk\Core\r2\Development\Sources\xbo\settings.gradle'.
Projects loaded. Root project using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\build.gradle'.
Included projects: [root project 'xbo', project ':bootstrap', project ':dsp-adapter', project ':encoding', project ':framework', project ':hardware', project ':jee', project ':label-printing', project ':routing-matrix', project ':sort-programs', project ':bootstrap:client', project ':bootstrap:data-loader', project ':bootstrap:persistence', project ':bootstrap:server', project ':bootstrap:test', project ':dsp-adapter:abol', project ':dsp-adapter:api', project ':dsp-adapter:canada', project ':dsp-adapter:indicia', project ':dsp-adapter:xlogics', project ':encoding:client', project ':encoding:facade', project ':encoding:integration', project ':encoding:legacyimporter', project ':encoding:mock', project ':encoding:server', project ':encoding:shared', project ':framework:client', project ':framework:facade', project ':framework:server', project ':framework:shared', project ':hardware:barcode-scanner', project ':hardware:label-printer', project ':hardware:scale', project ':hardware:scale-calibration', project ':hardware:scale-calibration-mock', project ':hardware:shared', project ':jee:war', project ':label-printing:client', project ':label-printing:facade', project ':label-printing:server', project ':label-printing:shared', project ':routing-matrix:api', project ':routing-matrix:server', project ':routing-matrix:test-bench', project ':sort-programs:api', project ':sort-programs:server']
Evaluating root project 'xbo' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\build.gradle'.
Evaluating project ':bootstrap' using empty build file.
Evaluating project ':dsp-adapter' using empty build file.
Evaluating project ':encoding' using empty build file.
Evaluating project ':framework' using empty build file.
Evaluating project ':hardware' using empty build file.
Evaluating project ':jee' using empty build file.
Evaluating project ':label-printing' using empty build file.
Evaluating project ':routing-matrix' using empty build file.
Evaluating project ':sort-programs' using empty build file.
Evaluating project ':bootstrap:client' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\bootstrap\client\build.gradle'.
Evaluating project ':bootstrap:data-loader' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\bootstrap\data-loader\build.gradle'.
Evaluating project ':bootstrap:persistence' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\bootstrap\persistence\build.gradle'.
Evaluating project ':bootstrap:server' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\bootstrap\server\build.gradle'.
Evaluating project ':bootstrap:test' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\bootstrap\test\build.gradle'.
Evaluating project ':dsp-adapter:abol' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\dsp-adapter\abol\build.gradle'.
Evaluating project ':dsp-adapter:api' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\dsp-adapter\api\build.gradle'.
Evaluating project ':dsp-adapter:canada' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\dsp-adapter\canada\build.gradle'.
Evaluating project ':dsp-adapter:indicia' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\dsp-adapter\indicia\build.gradle'.
Evaluating project ':dsp-adapter:xlogics' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\dsp-adapter\xlogics\build.gradle'.
Evaluating project ':encoding:client' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\encoding\client\build.gradle'.
Evaluating project ':encoding:facade' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\encoding\facade\build.gradle'.
Evaluating project ':encoding:integration' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\encoding\integration\build.gradle'.
Evaluating project ':encoding:legacyimporter' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\encoding\legacyimporter\build.gradle'.
Evaluating project ':encoding:mock' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\encoding\mock\build.gradle'.
Evaluating project ':encoding:server' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\encoding\server\build.gradle'.
Evaluating project ':encoding:shared' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\encoding\shared\build.gradle'.
Evaluating project ':framework:client' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\framework\client\build.gradle'.
Evaluating project ':framework:facade' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\framework\facade\build.gradle'.
Evaluating project ':framework:server' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\framework\server\build.gradle'.
Evaluating project ':framework:shared' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\framework\shared\build.gradle'.
Evaluating project ':hardware:barcode-scanner' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\hardware\barcode-scanner\build.gradle'.
Evaluating project ':hardware:label-printer' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\hardware\label-printer\build.gradle'.
Evaluating project ':hardware:scale' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\hardware\scale\build.gradle'.
Evaluating project ':hardware:scale-calibration' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\hardware\scale-calibration\build.gradle'.
Evaluating project ':hardware:scale-calibration-mock' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\hardware\scale-calibration-mock\build.gradle'.
Evaluating project ':hardware:shared' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\hardware\shared\build.gradle'.
Evaluating project ':jee:war' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\jee\war\build.gradle'.
Compiling build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\jee\war\build.gradle' using BuildScriptClasspathScriptTransformer.
Compiling build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\jee\war\build.gradle' using BuildScriptTransformer.
:: loading settings :: url = jar:file:/C:/java/gradle-1.0-milestone-2/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: com.dp.connect.jee#war;1.0.0-SNAPSHOT
confs: [webstart]
found com.dp.connect.bootstrap#client;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.bootstrap#client;1.0.0-SNAPSHOT (forced)
found org.codehaus.groovy#groovy;1.8.0 in MavenRepo
found antlr#antlr;2.7.7 in MavenRepo
found asm#asm;3.2 in MavenRepo
found asm#asm-commons;3.2 in MavenRepo
found asm#asm-tree;3.2 in MavenRepo
found asm#asm-util;3.2 in MavenRepo
found asm#asm-analysis;3.2 in MavenRepo
found com.dp.connect.framework#client;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.framework#client;1.0.0-SNAPSHOT (forced)
found com.dp.connect.framework#facade;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.framework#facade;1.0.0-SNAPSHOT (forced)
found com.dp.connect.framework#shared;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.framework#shared;1.0.0-SNAPSHOT (forced)
found commons-math#commons-math;1.2 in MavenRepo
found commons-lang#commons-lang;2.4 in MavenRepo
found commons-beanutils#commons-beanutils;1.8.3 in MavenRepo
found commons-logging#commons-logging;1.1.1 in MavenRepo
found commons-collections#commons-collections;3.2.1 in MavenRepo
found log4j#log4j;1.2.16 in MavenRepo
found com.dp.connect.label-printing#shared;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.label-printing#shared;1.0.0-SNAPSHOT (forced)
found org.springframework#spring-beans;3.0.5.RELEASE in MavenRepo
found org.springframework#spring-core;3.0.5.RELEASE in MavenRepo
found org.springframework#spring-asm;3.0.5.RELEASE in MavenRepo
found org.springframework#spring-aop;3.0.5.RELEASE in MavenRepo
found aopalliance#aopalliance;1.0 in MavenRepo
found org.springframework#spring-context;3.0.5.RELEASE in MavenRepo
found org.springframework#spring-expression;3.0.5.RELEASE in MavenRepo
found org.springframework#spring-web;3.0.5.RELEASE in MavenRepo
found com.jgoodies#forms;1.1.0 in MavenRepo
found com.jgoodies#binding;2.0.1-extensible in http://atlno-stage01.newops.dhlgm.corp/mvn_repository_contribution/
found com.jgoodies#validation;2.0.0 in MavenRepo
found org.jdesktop#swingworker;1.1 in http://atlno-stage01.newops.dhlgm.corp/mvn_repository_contribution/
found org.jdesktop#swingx;2007_09_16 in http://atlno-stage01.newops.dhlgm.corp/mvn_repository_contribution/
found commons-cli#commons-cli;1.2 in MavenRepo
found jasperreports#jasperreports;3.0.0 in MavenRepo
found commons-collections#commons-collections;3.2.1 in MavenRepo
[3.2.1] commons-collections#commons-collections;[2.1,)
found commons-digester#commons-digester;2.1 in MavenRepo
[2.1] commons-digester#commons-digester;[1.7,)
found commons-logging#commons-logging;1.1.1 in MavenRepo
[1.1.1] commons-logging#commons-logging;[1.0,)
found jfree#jcommon;1.0.2 in MavenRepo
[1.0.2] jfree#jcommon;[1.0.0,)
found xml-apis#xml-apis;1.3.02 in MavenRepo
found eclipse#jdtcore;3.2.0.v_658 in MavenRepo
[3.2.0.v_658] eclipse#jdtcore;[3.1.0,)
found com.lowagie#itext;2.0.1 in MavenRepo
found jfree#jfreechart;1.0.2 in MavenRepo
found commons-httpclient#commons-httpclient;3.1 in MavenRepo
found commons-codec#commons-codec;1.2 in MavenRepo
found com.dp.connect.encoding#client;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.encoding#client;1.0.0-SNAPSHOT (forced)
found com.dp.connect.encoding#facade;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.encoding#facade;1.0.0-SNAPSHOT (forced)
found com.dp.connect.encoding#shared;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.encoding#shared;1.0.0-SNAPSHOT (forced)
found com.dp.connect.label-printing#client;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.label-printing#client;1.0.0-SNAPSHOT (forced)
found com.dp.connect.hardware#label-printer;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.hardware#label-printer;1.0.0-SNAPSHOT (forced)
found com.dp.connect.hardware#shared;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.hardware#shared;1.0.0-SNAPSHOT (forced)
found com.dp.connect.hardware#scale-calibration;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.hardware#scale-calibration;1.0.0-SNAPSHOT (forced)
found com.dp.connect.hardware#scale;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.hardware#scale;1.0.0-SNAPSHOT (forced)
found javax.comm.custom#commw32;1.0 in clientModuleChain
found javax.comm.custom#commws;1.0 in clientModuleChain
found javax.comm.custom#win32com;1.0 in clientModuleChain
found com.dp.connect.hardware#scale-calibration-mock;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.hardware#scale-calibration-mock;1.0.0-SNAPSHOT (forced)
found com.dp.connect.hardware#barcode-scanner;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.hardware#barcode-scanner;1.0.0-SNAPSHOT (forced)
found com.dp.connect.routing-matrix#server;1.0.0-SNAPSHOT in internal-repository
[1.0.0-SNAPSHOT] com.dp.connect.routing-matrix#server;1.0.0-SNAPSHOT (forced)
:: resolution report :: resolve 4844ms :: artifacts dl 0ms
:: evicted modules:
commons-beanutils#commons-beanutils;1.7.0 by commons-beanutils#commons-beanutils;1.8.3 in [webstart]
jfree#jcommon;1.0.0 by jfree#jcommon;1.0.2 in [webstart]
commons-logging#commons-logging;1.0.4 by commons-logging#commons-logging;1.1.1 in [webstart]
---------------------------------------------------------------------

  modules artifacts
conf number search dwnlded evicted number dwnlded

---------------------------------------------------------------------

webstart 58 5 0 3 0 0

---------------------------------------------------------------------
Evaluating project ':label-printing:client' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\label-printing\client\build.gradle'.
Evaluating project ':label-printing:facade' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\label-printing\facade\build.gradle'.
Evaluating project ':label-printing:server' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\label-printing\server\build.gradle'.
Evaluating project ':label-printing:shared' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\label-printing\shared\build.gradle'.
Evaluating project ':routing-matrix:api' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\routing-matrix\api\build.gradle'.
Evaluating project ':routing-matrix:server' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\routing-matrix\server\build.gradle'.
Evaluating project ':routing-matrix:test-bench' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\routing-matrix\test-bench\build.gradle'.
Evaluating project ':sort-programs:api' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\sort-programs\api\build.gradle'.
Evaluating project ':sort-programs:server' using build file 'C:\work\trunk\Core\r2\Development\Sources\xbo\sort-programs\server\build.gradle'.
All projects evaluated.



 Comments   
Comment by Luke Daley [ 21/Aug/11 ]

Can you please try adding a configuration time dependency from jee:war on the client projects…

evaluationDependsOn ":encoding", ":label-printing"

Please let me know if that fixes the problem.

(for more info, see: http://gradle.org/current/docs/userguide/multi_project_builds.html#sub:configuration_time_dependencies)

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:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

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.

Generated at Wed Jun 30 11:59:36 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.