You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Scott Hebert (JIRA)" <ji...@apache.org> on 2008/03/24 18:49:24 UTC

[jira] Commented: (IVY-773) Extra Attributes are not available to resolver after resolve if cache was empty

    [ https://issues.apache.org/jira/browse/IVY-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581622#action_12581622 ] 

Scott Hebert commented on IVY-773:
----------------------------------

I also discovered that this is only a problem is the module in question is using a static revision.

            boolean isDynamic = getSettings().getVersionMatcher().isDynamic(systemMrid);


> Extra Attributes are not available to resolver after resolve if cache was empty
> -------------------------------------------------------------------------------
>
>                 Key: IVY-773
>                 URL: https://issues.apache.org/jira/browse/IVY-773
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-2
>            Reporter: Scott Hebert
>
> _A bit of background_
> I am creating a resolver that I've called *BuddyResolver*. Essentially, I need to enforce an access scheme whereby I only want certain modules to use a module as a dependency. My thought was to add an extra attribute to the info section of an ivy file and have the resolver peek at its attributes to see if the current module is a buddy of the one is trying to download.
> Let me illustrate....
> *ComponentA* is published on a repository. The authors have deemed that it is only available to *ComponentB*. 
> *ComponentA* has the following in its +ivy.xml+:
> {code:xml}
> <info organisation="ABC" module="ComponentA" revision="2.15.0" 
> status="Development" publication="20070919115137" 
> buddies="ABC/ComponentB" branch="MAIN">
> {code} 
> Now *ComponentC* adds *ComponentA* to its dependency section.
> A resolve operation is done and my BuddyResolver attempts to query the extra attributes. If the cache is clean, then the attributes are lost. The method that I using to query this is: *BasicResolver.getDependency(DependencyDescriptor arg0, ResolveData arg1)*. 
> Note, that it is run again with a populated cache, the I can obtain the value of my extra attribute.
> I think I narrowed it down to this line in BasicResolver:
> {code:java}
> 281:             systemMd.setResolvedModuleRevisionId(resolvedMrid);
> {code}
> This method seems to modify the object *rmr* that is going to be returned by the _getDependency()_ method.
> I'd be happy to provide any information I can to help solve the bug.
> Thanks,
> Scott

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.