groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Hsu (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (GROOVY-8372) GrapeIvy downloads wrong artifact for non-default conf when artifact name is not the same as the module
Date Sun, 26 Nov 2017 19:52:01 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16266153#comment-16266153
] 

Anthony Hsu edited comment on GROOVY-8372 at 11/26/17 7:51 PM:
---------------------------------------------------------------

Attached a self-contained zip that illustrates the issue. With Groovy 2.2.1, the correct y-foo-1.2.3.jar
gets resolved:

{code}
$ javac -cp .:lib/groovy-all-2.2.1.jar:lib/ivy-2.4.0.jar GrapesTest.java && java -cp
.:lib/groovy-all-2.2.1.jar:lib/ivy-2.4.0.jar GrapesTest
...
[SUCCESSFUL ] x#y;1.2.3!y-foo.jar (3ms)
{code}

whereas with Groovy 2.2.2, y-1.2.3.jar gets resolved (incorrect):

{code}
$ javac -cp .:lib/groovy-all-2.2.2.jar:lib/ivy-2.4.0.jar GrapesTest.java && java -cp
.:lib/groovy-all-2.2.2.jar:lib/ivy-2.4.0.jar GrapesTest
...
[SUCCESSFUL ] x#y;1.2.3!y.jar (2ms)
{code}


was (Author: erwaman):
Attached a self-contained zip that illustrates the issue. With Groovy 2.2.1, the correct y-foo-1.2.3.jar
gets resolved:

{code}
$ javac -cp .:lib/groovy-all-2.2.1.jar:lib/ivy-2.4.0.jar GrapesTest.java && java -cp
.:lib/groovy-all-2.2.1.jar:lib/ivy-2.4.0.jar GrapesTest
...
[SUCCESSFUL ] x#y;1.2.3!y-foo.jar (3ms)
{code}

whereas with Groovy 2.2.2, y-1.2.3.jar gets resolved (incorrect):

{code}
$ javac -cp .:lib/groovy-all-2.2.2.jar:lib/ivy-2.4.0.jar GrapesTest.java && java -cp
.:lib/groovy-all-2.2.2.jar:lib/ivy-2.4.0.jar GrapesTest
...
SUCCESSFUL ] x#y;1.2.3!y.jar (2ms)
{code}

> GrapeIvy downloads wrong artifact for non-default conf when artifact name is not the
same as the module
> -------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-8372
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8372
>             Project: Groovy
>          Issue Type: Bug
>          Components: Grape
>    Affects Versions: 2.2.2
>            Reporter: Anthony Hsu
>            Priority: Trivial
>         Attachments: grapesTest.zip
>
>
> In my Ivy repo, there exists the following directory with the following contents:
> {noformat}
> com/example/foo/bar/1.2.3/
>   bar-1.2.3.jar
>   bar-1.2.3.ivy
>   bar-qux-1.2.3.jar
> {noformat}
> In bar-1.2.3.ivy, the following conf and publication exist:
> {noformat:title=bar-1.2.3.ivy}
> ...
> <configurations>
>   <conf name="qux"/>
>   ...
> </configurations>
> ...
> <publications>
>   <artifact name="bar" type="jar" ext="jar" conf="apiElements,archives,runtime,runtimeElements"/>
>   <artifact name="bar-qux" type="jar" ext="jar" conf="qux"/>
>   ...
> </publications>
> ...
> {noformat}
> When I try to use Grape to resolve bar-qux-1.2.3.jar by setting
> * org = com.example.foo
> * module = bar
> * version = 1.2.3
> * conf = qux
> bar-1.2.3.jar gets downloaded instead of bar-qux-1.2.3.jar.
> This issue seems to be caused by GROOVY-6470. The correct jar (bar-qux-1.2.3.jar) gets
downloaded when using groovy-all-2.2.1, but the wrong jar is downloaded when using groovy-all-2.2.2
and newer.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message