groovy
  1. groovy
  2. GROOVY-3846

Grape command cannot remove and/or update a "grape"

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8-rc-1, 1.7.9
    • Component/s: Grape
    • Labels:
      None
    • Environment:
      Groovy Trunk 2009-10-26T09:00+00:00
    • Number of attachments :
      1

      Description

      The grape command has options to install and list the currently installed "grapes". It needs an option to remove a "grape" as well.

      The problem of the moment is pre-release snapshot software, e.g. groovyx.gpars:gpars:0.9-beta-1-SNAPSHOT. I keep updating this in my Maven cache but Grape never sees that it needs to re-grab from the Maven cache to the Grape cache. Currently I have to manually delete the files in teh Grape cache – which is silly.

      Alternatively this could be seen as a bug in that Grape has no way of checking to see if it needs to do an update – it assumes the version number uniquely determines a jar, which is simply not true for SNAPSHOTs.

        Activity

        Hide
        Bob Swift added a comment -

        I would like to see a force (or replace) option on grape install that would download and replace an existing jar.

        Show
        Bob Swift added a comment - I would like to see a force (or replace) option on grape install that would download and replace an existing jar.
        Hide
        Paul King added a comment - - edited

        Interim potential patch - adds a "grape uninstall" command-line option. With some shortcomings:

        • Doesn't parse content inside ivy-version.xml file which contains the real published artifact names; it just uses the common hard-coded filename pattern at the moment (which means it won't work with time stamped SNAPSHOT files currently)
        • Not as configurable as it could be - e.g. uses some hard-coded patterns for finding the ivy-version file (but we do this elsewhere currently anyway)
        • Currently doesn't do transitive dependencies (which might be dangerous anyway)
        • We could add bells and whistles: make version optional (removes multiple versions), support classifier
        • We could clean up more rigorously, e.g. remove ivydata props files, remove *.xml.original files

        Of these, at least the first should be fixed before applying.

        Show
        Paul King added a comment - - edited Interim potential patch - adds a "grape uninstall" command-line option. With some shortcomings: Doesn't parse content inside ivy-version.xml file which contains the real published artifact names; it just uses the common hard-coded filename pattern at the moment (which means it won't work with time stamped SNAPSHOT files currently) Not as configurable as it could be - e.g. uses some hard-coded patterns for finding the ivy-version file (but we do this elsewhere currently anyway) Currently doesn't do transitive dependencies (which might be dangerous anyway) We could add bells and whistles: make version optional (removes multiple versions), support classifier We could clean up more rigorously, e.g. remove ivydata props files, remove *.xml.original files Of these, at least the first should be fixed before applying.
        Hide
        Paul King added a comment -

        Attaching revised patch which processes the artifact entries in the ivy-version.xml file.

        Show
        Paul King added a comment - Attaching revised patch which processes the artifact entries in the ivy-version.xml file.
        Hide
        Paul King added a comment -

        Russel, any chance you can try out the patch? See if it solves your problem? I think it is about the best we can do without continuing to push Ivy to have such functionality built-in.

        Show
        Paul King added a comment - Russel, any chance you can try out the patch? See if it solves your problem? I think it is about the best we can do without continuing to push Ivy to have such functionality built-in.
        Hide
        Paul King added a comment -

        proposed change added

        Show
        Paul King added a comment - proposed change added

          People

          • Assignee:
            Paul King
            Reporter:
            Russel Winder
          • Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: