IvyDE
  1. IvyDE
  2. IVYDE-317

IvyDE classpath containers become empty on eclipse/MyEclipse startup

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.2.0.beta1
    • Fix Version/s: 2.2.0.final
    • Component/s: classpath container
    • Labels:
      None

      Description

      As J.C. mentioned, we have found that when we enable "Resolve in Workspace" for the IvyDE classpath containers, we consistently see that containers become empty in our projects. When this occurs, it may be as simple as performing an Ivy > Refresh (or combination of Ivy>Refresh, Ivy->Resolve, and file Refresh). However, it may also require removing and re-adding the classpath container manually.

      While attempting to setup a test-case to demonstrate the problem, for some time, I was not able to consistently reproduce any of the issues that I encountered. Some of the issues that I did see along the way include
      • when changing ivy.xml directly, upon save only one (of two in my case) classpatch containers would be updated to reflect the changes
      • when importing a project, sometimes one or more/all classpath containers would not be created. A manual Ivy->refresh was required
      • losing the export setting on one of the Ivy classpath containers
      • random disappearing IvyDE classpath containers

      What I eventually found is that in our application project environment, we have Eclipse set to refresh files on startup. When I set this in my test environment, I consistently see the behavior described where IvyDE classpath containers disappear on eclipse startup. Note that I have Ivy set to “Do Nothing” and “Refresh” and both have consistently resulted in the issue.

      I have attached the sample projects from my investigation. Unfortunately, I was unable to include the eclipse workspace itself due to file size limitations. I believe the only significant change in the eclipse environment is to set Refresh on startup in General->Startup and Shutdown. Let me know if you have any other questions.

      Thanks and I hope this helps you resolve the issue more quickly.

      We've found it gets worse with "Resolve in Workspace" active. Michael
      is actively working on a test case that doesn't require us to send you
      our entire codebase.

      It appears that when I shut down and restart Eclipse the Ivy Classpath Container loses its contents. I could swear sometimes it doesn't, but almost always when I restart Eclipse, it is empty until it does an automatic Resolve when I bring up Eclipse.

      What we'd like to see is that the Ivy Classpath Container actually persist its contents, even between Eclipse restarts. So that when Eclipse comes up, no resolve is necessary. And at times, I really don't want to do a resolve, because it will trigger download of stuff I really am not ready for yet. I'd like to control when I resolve and get new stuff downloaded, so right now the only choice I have is to either check the checkbox to Resolve on Launch, or do a manual resolve. This usually also causes an entire rebuild of the projects, which sucks, because that can take 10-40 minutes depending on how good the hardware is.

      So, is there a way to make the Classpath Container remember its contents, even between Eclipse restarts, and never lose it until the project is either deleted from the workspace, or another resolve is done?

      It is supposed to work. But like you I have noticed that sometimes it looses its content too, which is boring me too. I have never took time to investigate though.

        Activity

        Hide
        Michael Ondrejko added a comment -

        I am still seeing the same problem. Regardless the value of resolveInWorkspace, when I start an exclipse workspace, I see that Ivy classpath containers have been emptied. Is there anything special to do to see that these containers are not emptied?

        Show
        Michael Ondrejko added a comment - I am still seeing the same problem. Regardless the value of resolveInWorkspace, when I start an exclipse workspace, I see that Ivy classpath containers have been emptied. Is there anything special to do to see that these containers are not emptied?
        Hide
        Nicolas Lalevée added a comment -

        Work around implemented. A container state need to be successfully resolved before being saved.

        Show
        Nicolas Lalevée added a comment - Work around implemented. A container state need to be successfully resolved before being saved.
        Hide
        Nicolas Lalevée added a comment -

        As far I could see the state a classpath container is maintained by Eclipse itself. But for some reason, project open/close messes with it. I have open an issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=387535

        There is a workaround implementable in IvyDE, which is already done in the Maven plugin for instance: make the plugin persist itself the containers contents rather than relying on Eclipse's API.

        Show
        Nicolas Lalevée added a comment - As far I could see the state a classpath container is maintained by Eclipse itself. But for some reason, project open/close messes with it. I have open an issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=387535 There is a workaround implementable in IvyDE, which is already done in the Maven plugin for instance: make the plugin persist itself the containers contents rather than relying on Eclipse's API.

          People

          • Assignee:
            Nicolas Lalevée
            Reporter:
            Michael Ondrejko
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development