You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Peter Donald (JIRA)" <ji...@apache.org> on 2012/10/07 01:49:04 UTC

[jira] [Updated] (BUILDR-319) cannot create 3 artifacts in the same or inherited namespace with only version difference

     [ https://issues.apache.org/jira/browse/BUILDR-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Donald updated BUILDR-319:
--------------------------------

    Fix Version/s: 1.5
    
> cannot create 3 artifacts in the same or inherited namespace with only version difference
> -----------------------------------------------------------------------------------------
>
>                 Key: BUILDR-319
>                 URL: https://issues.apache.org/jira/browse/BUILDR-319
>             Project: Buildr
>          Issue Type: Bug
>            Reporter: Ittay Dror
>             Fix For: 1.5
>
>
> consider this buildfile:
> define 'foo' do
>   artifact_ns do |ns|
>     ns.foo1 = "foo:foo:jar:1"
>     ns.foo2 = "foo:foo:jar:2"
>     ns.foo3 = "foo:foo:jar:3"
>   end
> end
> > buildr
> (in /tmp, development)
> Buildr aborted!
> Unsatisfied dependency foo2 -> foo:foo:jar:2 -> 2 not satisfied by foo3 -> foo:foo:jar:3 -> 3
> /tmp/buildfile:5
> /tmp/buildfile:2
> (See full trace by running task with --trace)
> the reason is that in ArtifactNamespace#use, a search is made for the same artifact, but without a version. if it is found, and it has a requirement it is checked. if not, the requirement (set in the ctor to the version) is nilled. in the case above, foo1 is defined and its requirement is set to nil, when foo2 is defined, it finds foo1, that doesn't have a requirement, so nothing is done. but foo2.requirement stays unchanged. when foo3 is defined, foo2 is found, and it has a requirement and hence the failure.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira