[
https://issues.apache.org/jira/browse/IVY-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582410#action_12582410
]
Scott Hebert commented on IVY-773:
----------------------------------
I tried it ... seems to behave differently compared to a dynamic revision.
With a dependency section of
{code:xml}
<dependencies>
<dependency org="CAE" name="TEST2" rev="2.15.0"/>
</dependencies>
{code}
I'm getting this warning:
{noformat}
ivy internal error: no node found for CAE#TEST2#MAIN;2.15.0: looked in
[CAE#TEST1#MAIN;1.0, CAE#TEST2#MAIN;2.15.0, 3rdParties#CAE-Boost#MAIN;1.34.0]
and root module id was CAE#TEST1#MAIN;1.0
{noformat}
It also mentions a file is being evicted:
{noformat}
:: evicted modules:
3rdParties#CAE-Boost#MAIN;1.34.0 transitively in [default]
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| default | 2 | 2 | 2 | 1 || 1 | 1 |
---------------------------------------------------------------------
{noformat}
If I use this:
{code:xml}
<dependencies>
<dependency org="CAE" name="TEST2" rev="2.15.+"/>
</dependencies>
{code}
There are no errors, evictions or warnings.
{noformat}
:: resolution report :: resolve 791ms :: artifacts dl 1372ms
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| default | 2 | 2 | 2 | 0 || 2 | 2 |
---------------------------------------------------------------------
{noformat}
> 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
> Assignee: Xavier Hanin
>
> _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.