PME offers the ability to modify one or many json files in the repository prior to running the build.
The manipulator is controlled by the
jsonUpdate property. The format is
Multiple comma separated values may be supplied. If the replacement-value is not specified the operation becomes a delete rather than an update.
The format for the xpath-style expression is specified in the JSON-Path project here.
Note: Any ‘,’ or ‘:’ in the path expression or replacement value should be escaped with ‘\’.
As an example:
- For the file manager/ui/war/npm-shrinkwrap.json
- Use the path expression $..resolved to deep scan for resolved.
- As there is no replacement, these are then deleted.
- For the file distro/data/src/main/resources/data/basic-settings.json
- Use the path expression $..version to deep scan for version.
- Replace the value with 1.3.1.rebuild-1