Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Updating a soavirt.war deployment with a Windows Batch script

Options

This is a simple script that will allow us to update a soavirt.war based deployment when a new WAR is released

SET SOAVIRT_LOCATION=C:\parasoft\SOAVIRT
SET UPDATE_FOLDER=c:\parasoft\update\soavirtBackups
SET WAR_LOCATION=C:\parasoft\wars
SET WORKSPACE_LOCATION=C:\parasoft\SOAVIRTworkspace
SET NEW_SOAVIRT_WAR=C:\Users\proserve\Downloads\soavirt.war

REM Adjust path to 7Zip program as needed below
set THE_ZIP="c:\program files\7-zip\7z.exe"

echo shutting down soavirt...
cd %SOAVIRT_LOCATION%\bin\
call shutdown.bat
PING 1.1.1.1 -n 1 -w 20000 >NUL

echo copying files...
Xcopy /Y %WORKSPACE_LOCATION% %UPDATE_FOLDER%\workspaceBackup\ /S
copy /Y %SOAVIRT_LOCATION%\conf\server.xml %UPDATE_FOLDER%
copy /Y %WAR_LOCATION%\WEB-INF\config.properties %UPDATE_FOLDER%

echo removing old SOAVIRT...
del /Y %WAR_LOCATION%\* /S

echo bringing CTS war back in
%THE_ZIP% x %NEW_SOAVIRT_WAR% -y -o%WAR_LOCATION%
copy /Y %NEW_SOAVIRT_WAR% %SOAVIRT_LOCATION%\webapps

echo bringing old config files back in
copy /Y %UPDATE_FOLDER%\server.xml %SOAVIRT_LOCATION%\conf\server.xml
copy /Y %UPDATE_FOLDER%\config.properties %WAR_LOCATION%\WEB-INF\config.properties

echo backup complete...
cd c:/parasoft
rem call startsoavirt.bat
Tagged:

Tagged