Building and Installing Patches
The SDK provides a means to build patches to releases. Other users can use the SDK to patch their copies of the release using the patch.
To Create a Patch
1. Determine that you need to create a patch to a release, for example, Release 8.0.
2. If you have not already installed this release into your SDK, then do so using the install target.
3. Switch to this release using the switchdebs target.
4. Create a new project using the newproject target.
5. Working in this project, modify existing files using the customize target to copy them over to the project, and create new files as appropriate for the patch.
6. Use the merge, dist, and deploy targets to test that the patch works.
7. Create the patch JAR file by running the project.createHotFix target. A JAR file is created that contains the files required by the patch.
This patch file is now ready for distribution.
To Install a Patch
1. Determine that you need to apply a patch to a release, and obtain the patch as a JAR file from Sterling Commerce.
2. If you have not already installed this release into your SDK, then do so using the install target.
3. Copy the patch JAR file to a convenient temporary location on your SDK machine.
4. By running the install target, install the patch:
sdk install <Location of patch JAR file>The patch is automatically unpacked into an overlay/ directory under the release directory, for example: sdk_home/releases/debs-8.0/overlay/.
5. When you build a project using this release, then files from the overlay/ directory overwrite files from the release WAR file as they are copied over to the sdk_home/builds/project/ directory.
If you run the examine or customize targets for a file, then if the file exists in the patch, then that is the copy that is used, and not the original file in the release WAR file.
You can apply one or more patches to a release. However, if the same file is present in more than one patch, then the version of the file under the overlay/ directory is the copy from the most recently-applied patch.