Configuring Modified war Files|Configuring Modified war Files#

These instructions were created for the User Application but the same concepts can be used for modifying or adding additional jar files.

Expected to be done on the User Application Server.

Prerequisites#

The following files and directories are required: (This was on a Windows platform, but concept could be applied to any platform with minor changes)
  • Directory named D:\Software\config\
  • Directory named "D:\Software\config\gifs" that contains the customized User App gifs(info)
    • Place gif files in (D:\Software\Config\gifs)
  • One of more UserAppStrings_XX.jar files as desired.
    • Place these in (D:\Software\Config\Modified-Jar files)
  • configidmwars.bat
    • Place file in (D:\Software\)

NOTE: Some of the servers have items at D:\Novell\Software\config. The instructions are ONLY valid for D:\Software\config\

configidmwars.bat(info)#

As there were several steps involved in this configuration, many of the steps can be automated with this batch file.

The file, we expected to be at: D:\Novell\Software\configidmwars.bat

Contents of configidmwars.bat(info):

# configidmwars.bat 2010-12-07 jim@willeke.com
net stop jboss
rmdir /S/Q D:\Novell\Software\Config\wars\Wip-war\
mkdir D:\Novell\Software\Config\wars\Wip-war\
rmdir /S/Q D:\Novell\Software\Config\wars\Org-war\
mkdir D:\Novell\Software\Config\wars\Org-war\
copy D:\Novell\idm\jboss\server\IDM\deploy\IDM.war D:\Software\config\wars\Org-war
for /f "tokens=2-4* delims=/ " %%a in ('DATE /T') do set THEDATE=%%c%%b%%a
For /F "tokens=2-4 delims=:" %%a in ('Command /C Echo. ^| Time ^| Find "current"') Do Set THETIME=%%a%%b
Set THETIME=%THETIME:~1%
echo . %THEDATE%
echo . %THETIME%
ren D:\Software\config\wars\Org-war\IDM.war "%THEDATE%-%THETIME%%-IDM.war"
copy D:\Novell\idm\jboss\server\IDM\deploy\IDM.war D:\Software\config\wars\Wip-war
cd D:\Software\config\wars\Wip-war\
"D:\Program Files\Java\jdk1.6.0_17\bin\jar.exe" xvf IDM.war
del D:\Software\config\wars\Wip-war\IDM.war
copy /y "D:\Software\config\modified-jar files\*.jar" D:\Software\config\wars\wip-war\web-inf\lib\
copy /y D:\Software\config\gifs\*.gif D:\Software\config\wars\wip-war\resource\themes\Linen\images\
"D:\Program Files\Java\jdk1.6.0_17\bin\jar.exe" cvf IDM.war .\
copy D:\Software\config\wars\Wip-war\IDM.war D:\Novell\idm\jboss\server\IDM\deploy\
rmdir /s/q D:\Novell\idm\jboss\server\IDM\tmp\
rmdir /s/q D:\Novell\idm\jboss\server\IDM\work\
net start jboss

Additional Information on Using JAR files#

Process #

This process maybe done by using the configidmwars.bat(info) file.

These specific modified files are used for modified strings and Localization Novell User Application.

  • Read through these commands and verify that the required files and directory structure exists.
  • cd D:\Software\config\wars\Wip-war
  • Run the following commands overwriting any files if prompted:
Stop Jboss:
net stop jboss
  • Remove any existing files in D:\Software\Config\wars\Wip-war\ and D:\Software\Config\wars\Org-war\ or create the directories if they do not exist.
rmdir /S/Q D:\Software\Config\wars\Wip-war\
mkdir D:\Software\Config\wars\Wip-war\

rmdir /S/Q D:\Software\Config\wars\Org-war\
mkdir D:\Software\Config\wars\Org-war\
  • Make safety copy of IDM.war file. It will look like: 20100612- 914-IDM.war showing the date-time the file was copied.
copy D:\Novell\idm\jboss\server\IDM\deploy\IDM.war D:\Software\config\wars\Org-war
for /f "tokens=2-4* delims=/ " %%a in ('DATE /T') do set THEDATE=%%c%%b%%a
For /F "tokens=2-4 delims=:" %%a in ('Command /C Echo. ^| Time ^| Find "current"') Do Set THETIME=%%a%%b
Set THETIME=%THETIME:~1%
echo . %THEDATE%
echo . %THETIME%
ren D:\Software\config\wars\Org-war\IDM.war "%THEDATE%-%THETIME%%-IDM.war"
  • Copy and then decompress the existing IDM.war file:
copy D:\Novell\idm\jboss\server\IDM\deploy\IDM.war D:\Software\config\wars\Wip-war
cd D:\Software\config\wars\Wip-war\
"D:\Program Files\Java\jdk1.6.0_17\bin\jar.exe" xvf IDM.war
del D:\Software\config\wars\Wip-war\IDM.war
copy /y "D:\Software\config\modified-jar files\*.jar" D:\Software\config\wars\wip-war\web-inf\lib\
  • Copy any modified gif files:
copy /y D:\Software\config\gifs\*.gif D:\Software\config\wars\wip-war\resource\themes\Linen\images\
  • Create the new IDM.war file:
"D:\Program Files\Java\jdk1.6.0_17\bin\jar.exe" cvf IDM.war .\
  • Put the new IDM.war file back:
copy D:\Software\config\wars\Wip-war\IDM.war D:\Novell\idm\jboss\server\IDM\deploy\
  • Clear the tmp and work directories - You may have some caching happening and this will clear the caching.
rmdir /s/q D:\Novell\idm\jboss\server\IDM\tmp\
rmdir /s/q D:\Novell\idm\jboss\server\IDM\work\
  • Start Jboss
net start jboss

More Information#

There might be more information for this subject on one of the following:

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
bat
configidmwars.bat 1.4 kB 1 02-Jan-2011 12:49 jim configidmwars.bat file
« This page (revision-5) was last changed on 02-Jan-2011 12:51 by jim