ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée (JIRA) <j...@apache.org>
Subject [jira] Commented: (IVY-1227) UseCacheOnly doesn't respect the cache configuration in the ivysettings
Date Tue, 05 Oct 2010 13:19:32 GMT

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

Nicolas Lalevée commented on IVY-1227:
--------------------------------------

I finally applied the patch on the trunk. I did some manual testing, it seems to work quite
well. I think it needs some unit testing though.

> UseCacheOnly doesn't respect the cache configuration in the ivysettings
> -----------------------------------------------------------------------
>
>                 Key: IVY-1227
>                 URL: https://issues.apache.org/jira/browse/IVY-1227
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2.0-RC1
>            Reporter: Nicolas Lalevée
>             Fix For: trunk
>
>         Attachments: IVY-1227-r997376.patch, test-ivy-usecacheonly.zip
>
>
> In my ivysettings.xml I have configured some cache which avoid having the resolver use
the common .ivy2 cache. If on the resolve task I set useCacheOnly="true", then my artifacts
in the cache won't be found.
> I'll attach a complete test case for the different scenario:
> # defaultResolver="ibiblio", useCacheOnly="false", dependency on common-logging-1.1:
nominal behaviour, everything works fine, artifacts get downloaded into .ivy2
> # defaultResolver="ibiblio", useCacheOnly="true", dependency on common-logging-1.1: there
is a bug in the CacheResolver, artifacts are not "downloaded", they not found. It was a missing
ensuredConfigured(). I'll commit that as I am quite confident in that fix. With the fix, everything
goes well.
> # defaultResolver="chain", useCacheOnly="false", dependency on common-logging-1.2: it
should be not be found in the ibiblio resolver but in the local one. Everything works fine,
it get cached correctly from the local repo.
> # defaultResolver="chain", useCacheOnly="true", dependency on common-logging-1.2: it
is not found. As I was debugging it, in fact the CacheResolver isn't configured with the proper
cache manager, so it uses the default one. So it looks in the wrong cache.
> My proposal as the last fix is to not use the cache resolver as a dictator resolver when
we want useCacheOnly. I don't see any obvious way to make cache resolver aware of the cache
it should look into, further more when there is chaining. I suggest to move this logic in
the configured resolvers. I tried a very simple patch and it seems to work nicely. See the
attached patch. I am not confident enough to commit it without review as it might be quite
incomplete or have some side effect. At least it works with some chaining and even if there
is some useOrigin=true

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


Mime
View raw message