Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-357

workdir jars not removed on addon uninstall on Windows

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.RC3
    • Fix Version/s: 1.0.0.RC4
    • Component/s: @ CORE
    • Labels:
      None
    • Environment:
      Windows XP SP3 with Sun jdk1.6.0_16

      Description

      Addon jars remain in the work dir after an addon uninstall on Windows. AddOnOperations.cleanUp() uses File.deleteOnExit() for the deletion: my guess is that these files are still locked when the JVM tries to remove them because these jars are listed in java.ext.dirs, and Windows supports locking files that are in use.
      The only solution I can come up with is that Roo should create a simple text file containing the files to delete and would leave it up to the roo.bat script to delete these files before starting the JVM (could even be done by another Java program started by the script instead of a 'del' command, as long as that JVM command doesn't list the work dir in the java.ext.dirs).
      Every Java-based solution running just in the Roo JVM will suffer from the fact that the jars are locked already by the same JVM that tries to remove them, so this takes more than a simple code patch; a 2-step process in the .bat file seems like the best bet to me.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jkuipers Joris Kuipers
                Reporter:
                jkuipers Joris Kuipers
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: