You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Nicolas Lalevée (JIRA)" <ji...@apache.org> on 2010/10/05 15:19:34 UTC

[jira] Updated: (IVY-1227) UseCacheOnly doesn't respect the cache configuration in the ivysettings

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

Nicolas Lalevée updated IVY-1227:
---------------------------------

    Fix Version/s: trunk

> 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
>            Assignee: 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.