[GRADLE-2344] Ambiguous Ivy module names generated Created: 11/Jun/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: | Brian Harris | Assignee: | Unassigned |
Resolution: | Won't Fix | Votes: | 0 |
Description |
If we have subprojects like so: a/b/c Two things break badly. First, the generated Ivy modules for both subprojects have "c" as the module name and we deploy them to the same Ivy repository. Because the organization names are both "a" the two Ivy modules conflict and cannot be consumed. Second, intra-project dependencies can be resolved incorrectly. We've seen the case where a/b/c declares a dependency on a/d/c however the Gradle resolution results in a/b/c only depending on a/b/c and not a/d/c. It seems that the same ambiguity we ran into with the Ivy repo is also suffered internal to Gradle. Our workaround is to rename the projects like this a/b/b-c Which is not ideal. |
Comments |
Comment by Brian Harris [ 11/Jun/12 ] |
Sorry, not a great issue title and also I'd like to edit the description, but I don't seem to have edit rights. |
Comment by Daz DeBoer [ 11/Jul/12 ] |
In order for the projects to be disambiguated, you need to give them different names. This is primarily required because we use the project name as the ivy module name, which must be unique within a repository. There is not currently any way to publish to an ivy repository using a module name different to the project name. Otherwise, ambiguous project names are not explicitly disallowed. However, since we don't currently do any testing with ambiguous project names, you are likely to hit problems even when not publishing to ivy repositories. It is easy to give your project a different name to the directory that holds it: in settings.xml simply use something like project(':A:D:C').name = 'D-C' Then your module will be published with identifier 'D-C', and you can reference the project everywhere as :A:D:D-C . |
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. |