Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.8.6, 2.0-rc-2
    • Fix Version/s: None
    • Component/s: Grape
    • Labels:
      None
    • Environment:
      Using Groovy Trunk 2009-10-11 on Ubuntu 9.04 Jaunty Jackalope
    • Number of attachments :
      0

      Description

      Grapes makes the assumption that a jar with a given number remains the same and so does not refresh. For released jars this is an almost reasonable assumption. For snapshot jars it is decidedly unsafe. For example say I use gpars-0.9-beta-1-SNAPSHOT and the jar source is my local Maven cache. On first use Grapes copies the jar from teh Maven cache to the Grapes cache. If I update the Maven cache with a new version, Grapes fails to take a new copy. Thus error.

        Activity

        Hide
        Merlyn Albery-Speyer added a comment -

        Relates to GROOVY-3846.

        Show
        Merlyn Albery-Speyer added a comment - Relates to GROOVY-3846 .
        Hide
        Merlyn Albery-Speyer added a comment -

        From http://ant.apache.org/ivy/faq.html:

        "When I update an ivy file in my repository ivy do not take the change into account. Is this normal ?

        This the default behaviour of ivy, which relies on the revision and on its cache to avoid too many downloads. However, this can be changed on each resolver using the checkmodified attribute, or globally by setting ivy.resolver.default.check.modified variable to true."

        Show
        Merlyn Albery-Speyer added a comment - From http://ant.apache.org/ivy/faq.html: "When I update an ivy file in my repository ivy do not take the change into account. Is this normal ? This the default behaviour of ivy, which relies on the revision and on its cache to avoid too many downloads. However, this can be changed on each resolver using the checkmodified attribute, or globally by setting ivy.resolver.default.check.modified variable to true."
        Hide
        Merlyn Albery-Speyer added a comment -

        Perhaps this issue can be resolved through better Groovy documentation? From reading the Ivy documentation is appears that adding a checkmodified="true" attribute to a resolver in the grapeConfig.xml, e.g.:

        <ibiblio name="local" root="file:$

        {user.home}

        /.m2/repository/" m2compatible="true" checkmodified="true"/>

        See http://ant.apache.org/ivy/history/trunk/settings/resolvers.html

        Show
        Merlyn Albery-Speyer added a comment - Perhaps this issue can be resolved through better Groovy documentation? From reading the Ivy documentation is appears that adding a checkmodified="true" attribute to a resolver in the grapeConfig.xml, e.g.: <ibiblio name="local" root="file:$ {user.home} /.m2/repository/" m2compatible="true" checkmodified="true"/> See http://ant.apache.org/ivy/history/trunk/settings/resolvers.html
        Hide
        Paul King added a comment -
        Show
        Paul King added a comment - See also: http://jira.codehaus.org/browse/GRAILS-7203
        Hide
        Paul King added a comment -

        Question for Russel. Are you using the Grape.grab() method calls in your scripts? Or using the @Grab annotation?

        Show
        Paul King added a comment - Question for Russel. Are you using the Grape.grab() method calls in your scripts? Or using the @Grab annotation?
        Hide
        Russel Winder added a comment -

        Paul,

        Sorry for missing this question (for over a year, yes I know .

        I don't use Grape.grab(), my usage is all @Grab.

        Show
        Russel Winder added a comment - Paul, Sorry for missing this question (for over a year, yes I know . I don't use Grape.grab(), my usage is all @Grab.
        Hide
        Russel Winder added a comment -

        Should the properties of this bug be updated to reflect the fact that it is a problem for Groovy 1.8.6 and 2.0.0-rc-2?

        Show
        Russel Winder added a comment - Should the properties of this bug be updated to reflect the fact that it is a problem for Groovy 1.8.6 and 2.0.0-rc-2?
        Hide
        blackdrag blackdrag added a comment -

        added the versions as suggested by Russel

        Show
        blackdrag blackdrag added a comment - added the versions as suggested by Russel
        Hide
        Croesus added a comment -

        the attribute

        checkmodified="true"

        Does not work.
        It seems like Grails solved the problem by using Aether dependency management, maybe groovy should also have this option?

        Show
        Croesus added a comment - the attribute checkmodified="true" Does not work. It seems like Grails solved the problem by using Aether dependency management, maybe groovy should also have this option?
        Hide
        Pascal Schumacher added a comment -

        Sounds like this is an Apache Ivy bug instead of a Groovy bug?

        Show
        Pascal Schumacher added a comment - Sounds like this is an Apache Ivy bug instead of a Groovy bug?
        Hide
        Paul King added a comment -

        There is no doubt an Ivy issue in the mix but other projects, e.g. Gradle, Grails, Maven?, etc. have moved to using other libraries, e.g. Aether libraries instead of Ivy. It would involve some rework no doubt but perhaps that might be appropriate for Groovy at some point. Grails allows switching between the two which seems like what we would want to do too.

        Show
        Paul King added a comment - There is no doubt an Ivy issue in the mix but other projects, e.g. Gradle, Grails, Maven?, etc. have moved to using other libraries, e.g. Aether libraries instead of Ivy. It would involve some rework no doubt but perhaps that might be appropriate for Groovy at some point. Grails allows switching between the two which seems like what we would want to do too.

          People

          • Assignee:
            Unassigned
            Reporter:
            Russel Winder
          • Votes:
            6 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated: