Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0-RC1
    • Component/s: Core
    • Labels:
      None

      Description

      I recently tried to use ivy in offline, everything is in ivy-cache, but ivy seems to check dynamique revision all the time.
      Exemple: Suppose you have this dependency on your project
      <dependency org="jasperreports" name="jasperreports" rev="2.0.5" conf="runtime->runtime"/>

      Looking in the POM file (http://repo1.maven.org/maven2/jasperreports/jasperreports/2.0.5/jasperreports-2.0.5.pom) we can see that jasperreports depends on commons-logging#[1.0,)

      This revision is evaluated on every resolve/retrieve.
      I've tried to tune my cache with a large TTL, but the problem is still here.
      My cache configuration :
      <caches default="mycache" checkUpToDate="false">
      <cache name="mycache" basedir="$

      {ivy.home.dir}

      /ivy-cache" defaultTTL="1d">
      <ttl revision="latest.integration" duration="1d" />
      </cache>
      </caches>

      Maybe there is a regression on my version?

      Even if the TTL options seems to be interessant, i'm not so sure that this is the best solution for working in "offline mode".
      It could be a nice improvement to reuse the cache even if TTL is expired when repo are not reachable.

      What do you think about it?

        Activity

        Hide
        mark birenbaum added a comment -

        I'm seeing this as well, with beta 2. (on windows).

        Show
        mark birenbaum added a comment - I'm seeing this as well, with beta 2. (on windows).
        Hide
        Xavier Hanin added a comment -

        I've fixed the problem with TTL in IVY-1012, and also changed some tiny things to make it more usable for offline mode: I've added the option to use 'eternal' as ttl duration, and also changed when ttl is checked. So now if you don't have any specific ttl in your Ivy settings, all you have to do when offline is to set the property ivy.cache.ttl.default to eternal (with -Divy.cache.ttl.default=eternal when calling ant for instance). If you set ttls yourself, it's a bit more work to override the values in offline mode, but it's still possible.

        So IMO the current trunk version is enough for offline support. WDYT?

        Show
        Xavier Hanin added a comment - I've fixed the problem with TTL in IVY-1012 , and also changed some tiny things to make it more usable for offline mode: I've added the option to use 'eternal' as ttl duration, and also changed when ttl is checked. So now if you don't have any specific ttl in your Ivy settings, all you have to do when offline is to set the property ivy.cache.ttl.default to eternal (with -Divy.cache.ttl.default=eternal when calling ant for instance). If you set ttls yourself, it's a bit more work to override the values in offline mode, but it's still possible. So IMO the current trunk version is enough for offline support. WDYT?
        Hide
        Jean-Louis Boudart added a comment -

        Tested on trunk Head Revision.

        Works good for me i'll close the issue

        Show
        Jean-Louis Boudart added a comment - Tested on trunk Head Revision. Works good for me i'll close the issue

          People

          • Assignee:
            Xavier Hanin
            Reporter:
            Jean-Louis Boudart
          • Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development