I made a couple changes to the roo.bat that might help:
Code:
@echo off
setlocal enabledelayedexpansion
rem Remap temp directory
if exist temp\nul goto START_ROO
md temp
:START_ROO
rem save the original temp directories
SET ROO_BACKUP_TEMP=%TEMP%
SET ROO_BACKUP_TMP=%TMP%
rem set the new temp directories
SET TEMP=temp
SET TMP=temp
for %%? in ("%~dp0..") do set ROO_HOME=%%~f?
rem echo Resolved ROO_HOME: "%ROO_HOME%"
rem Build a classpath containing our two magical startup JARs
for %%a in ("%ROO_HOME%\bin\*.jar") do set ROO_CP=!ROO_CP!%%a;
rem Hop, hop, hop...
java -Dflash.message.disabled=false -Djline.nobell=true %ROO_OPTS% -Droo.args="%*" -DdevelopmentMode=false -Dorg.osgi.framework.storage="%ROO_HOME%\cache" -Dfelix.auto.deploy.dir="%ROO_HOME%\bundle" -Dfelix.config.properties="file:%ROO_HOME%\conf\config.properties" -cp "%ROO_CP%" org.springframework.roo.bootstrap.Main
rem echo Roo exited with code %errorlevel%
:end
rem list the temp files created during the session
dir temp
rem remove the temp files
rd /s /q temp
rem set the original temp directories back
SET TEMP=%ROO_BACKUP_TEMP%
SET TMP=%ROO_BACKUP_TMP%
SET ROO_BACKUP_TEMP=
SET ROO_BACKUP_TMP=
It basically creates a temp directory under the roo project directory and sets the environment variables TEMP and TMP to it. Then when you exit roo it lists all the temp files that were created, and then deletes them.
It also saves the original TEMP directory paths and sets them back at the end.
NOTE: Use with caution as I don't know the exact ramifications of removing the temp files. Also, this should work for multiple roo instances going as it uses a temp folder local to the roo instance running but if you open two instances in the same folder you could be deleting the other instances temp files, which I would assume would be pretty bad. I also don't know how this would effect the Roo that is called through STS, as I usually use the command line in a seperate window and not through STS.