[GRADLE-2291] Exclusions set on all configurations not honoured by detachedConfiguration3 while executing eclipseWtpComponent Created: 10/May/12 Updated: 10/Feb/17 Resolved: 10/Feb/17 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.0-rc-3 |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Mauro Molinari | Assignee: | Unassigned |
Resolution: | Won't Fix | Votes: | 4 |
Description |
I have a project with the following: apply plugin: 'war' apply plugin: 'eclipse-wtp' configurations.all { exclude group: 'com.sun.jdmk', module: 'jmxtools' exclude group: 'com.sun.jmx', module: 'jmxri' exclude group: 'javax.jms', module: 'jms' } dependencies { compile 'log4j:log4j:1.2.15' } repositories { mavenCentral() } Those exclusions are needed because log4j depends on those libraries that do not have associated JARs in Maven Central. This is a problem since Gradle 1.0-milestone-7 (see also > Building > :myproject:eclipseWtpComponent > Resolving dependencies 'detachedConfi :myproject:eclipseWtpComponent FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':myproject:eclipseWtpComponent'. > Could not resolve all dependencies for configuration 'detachedConfiguration3'. > Artifact 'javax.jms:jms:1.1@jar' not found. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED It seems like "detachedConfiguration3" is created afterwards and it doesn't inherit the exclusions previously set. I made some tests, but I wasn't able to make this configuration to use the exclusions. What I had to do to work around this problem is quite "dirty":
However, this workaround is quite error prone and badly maintainable. |
Comments |
Comment by Andreas Schmid [ 14/Dec/14 ] |
I cannot reproduce the behaviour using Gradle 2.0. Is that correct? |
Comment by Mauro Molinari [ 14/Dec/14 ] |
I trust you if you say it now works. Unfortunately, I don't work anymore for the company where I had the actual project where I needed the global exclusions I mentioned in my original report. So, if the simple test case I provided now works, I would say it's ok in Gradle 2.0 now. |
Comment by Andreas Schmid [ 14/Dec/14 ] |
Yes, in my test I copied your reproducer and it has worked for me |
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. |