-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
A user should be able to apply legacy patches when building a bootable JAR.
The maven plugin offers a "legacy-patch-cli-script" configuration item to reference a CLI script that contains patch command(s). For example:
"patch apply patch-oneoff1.zip --override-all
patch apply patch-oneoff2.zip --override-all
patch info --json-output"
Documentation of the legacy-patch-cli-script makes it clear that the option "--override-all" can be required when trimming the server with Galleon.
In order to optimize the server content, the configuration item "legacy-patch-clean-up" (false by default), can be set to remove unused patch related content (should be tech-preview feature for XP 2.0):
- <JBOSS_HOME>/.installation/patches directory is removed
- Patched modules original locations in base layer are removed. They are not needed, .overlays content override them.
- New modules added by the patch that are not referenced by the existing or patched modules graph are deleted.
- overlays directories that are not present in the .overlays file are removed (can occur when multiple patches are applied).
Advantages of optimization:
- Smaller JAR
- Fix unwanted optional module dependencies that would happen with patch.