[GRADLE-560] Mapping of Ivy dependency lookups insufficient Created: 21/Jul/09 Updated: 04/Jan/13 Resolved: 24/Nov/10 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 0.7 |
Fix Version/s: | 0.9-rc-1 |
Type: | Improvement | ||
Reporter: | Spencer Allain | Assignee: | Hans Dockter |
Resolution: | Fixed | Votes: | 0 |
Attachments: | build.gradle |
Description |
The shortened string form of a dependency is: Mappings of all of the values are: http://ant.apache.org/ivy/history/trunk/concept.html#patterns [branch] always unset The biggest issue is not being able to adjust [artifact] individually: Consider jsf and richfaces as two modules. /repo/sun/jsf/1.1/jars/ /repo/jboss/richfaces/jars/ Short of mis-using 'classifier', without being able to specify [artifact] different from [module], there isn't any pattern that matches the desired jars. Even more complex is sl4fj which can't even work with a pattern attempting to abuse 'classifier' (and this is just a subset of jars): /repo/slf4j.org/slf4j/1.5.8/jars/ Simply by being able to specify [artifact] differently from [module] (like you already can in straight Ivy) these mappings are trivial. gradle should allow specifying an optional 'artifact' property that would be used with Ivy mappings to allow for just such dependency cases. |
Comments |
Comment by Hans Dockter [ 21/Jul/09 ] |
You can do this. But unfortunately this is not mentioned in the user's guide yet. Have a look at the samples/dependencies/build.gradle. There we define artifacts for a classifier dependency. This should be really mentioned in the user's guide. |
Comment by Spencer Allain [ 21/Jul/09 ] |
Below is a very trivial build.gradle file that exhibits behavior that is very unexpected (at least to me) build.gradle def path = '/' repositories repositories.localRepository def pattern1 = addArtifactPattern(path + pattern1) dependencies } Snippet of relevant output – artifact group#name1;version!name.extension(type): //name-version-classifier.extension /group/name1//version/type/name/extension/default/[originalname]/classifier – artifact group#name1;version!name1.jar: //name1-version-classifier1.jar /group/name1//version/jar/name1/jar/default/[originalname]/classifier1 Here is what's really confusing me: 1. 'group' and 'version' take precedence over the initially specified values ('group1' and 'version1') |
Comment by Spencer Allain [ 21/Jul/09 ] |
Wiki messed up the formatting, I probably should have just uploaded a file in the first place. |
Comment by Hans Dockter [ 21/Jul/09 ] |
I think Gradle should complain about the above instead of doing rather mysterious things. But the behavior is explainable.
FYI: you can nest code within {code} This will keep the formatting. |