Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0.beta1
    • Component/s: workspace resolver
    • Labels:
      None
    • Environment:

      Eclipse Version: 3.6.1.r361_v20100909-9gF78GrkFqw7GrsZnvz0JWNTeb6fue6896L Build id: M20100909-0800
      IvyDE Version 2.1.0.201008101807
      Running on MacBook Pro running Mac OS X Leopard 10.6.5

      Description

      With the "Delete old retrieve artifacts" option active, the IvyDE extension deleted my entire project directory! The only thing in my workspace project folder is a list of jars (resolved from my ivy file, which was deleted)!!!

      After looking into this further, I think this most likely happened because my retrieve pattern did not contain /lib. It was just:
      [artifact]-[revision].[ext] (I may have had an ivy property on the front as in $

      {project.lib}/[artifact]-[revision].[ext])

      Still, this should never happen!
      Luckily, I had everything checked into version control but this could have been a disaster.

      -----------------------------------------------------
      Steps I took:

      I installed IvyDE about 15 minutes ago, via Eclipse Marketplace. After eclipse restart I right clicked on the project and chose Build Path > Add Libraries > IvyDE Managed Dependencies.

      On the main tab, I chose my ivy file from the workspace.
      On the settings tab, I enabled project specific settings and chose my settings file and properties file from the workspace.
      On the retrieve tab, I enabled project specific settings, chose "do retrieve after resolve" and set my retrieve pattern to the exact value of my ivy.retrieve.pattern variable which was [artifact]-[revsion].[ext] (I may have had a property on the front like ${project.lib}

      which is in my ivy properties file)
      On the advanced tab, I enabled project specific settings and set "order of the classpath entries" to lexical

      I clicked FINISHED and it deleted my entire project!!!!!
      Leaving only the jars in it's place.

      ###
      The person fixing this should verify that this does not happen when the retrieve pattern contains an unknown variable such as:
      $

      {some.variable}

      /[artifact]-[revision].[ext]
      ###

      Also, if the artifact variable is going to result in the entire project being deleted, at least a warning should be displayed. Perhaps red text at the bottom that displays:

      Warning: all files in the directory /full/path/to/directory/derived/from/retrieve/pattern will be deleted.

      (where the full path to the retrieve location is derived based on the retrieve pattern)

      Lastly, I would recommend changing the default pattern for types from * to *.jar
      That one change, alone, would have prevented this from happening.

        Activity

        Hide
        Nicolas Lalevée added a comment -

        Now the retrieve will fail is the resolved pattern is the root of the project.

        Show
        Nicolas Lalevée added a comment - Now the retrieve will fail is the resolved pattern is the root of the project.

          People

          • Assignee:
            Nicolas Lalevée
            Reporter:
            Kevin G
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development