From 81e51e2c9dd22531caa82ee30d7a7b1181a03279 Mon Sep 17 00:00:00 2001 From: Tobia Di Pisa Date: Wed, 13 Mar 2024 10:08:36 +0100 Subject: [PATCH] Updated migration guidelines to report print YAML changes (#10060) --- .../mapstore-migration-guide.md | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/docs/developer-guide/mapstore-migration-guide.md b/docs/developer-guide/mapstore-migration-guide.md index 16deec715a..296d01ba42 100644 --- a/docs/developer-guide/mapstore-migration-guide.md +++ b/docs/developer-guide/mapstore-migration-guide.md @@ -22,6 +22,52 @@ This is a list of things to check if you want to update from a previous version ## Migration from 2023.02.02 to 2024.01.00 +### Maven project update + +With this release the maven `pom.xml` files has been restructured to centralize dependencies version in the `dependencyManagement` section and then in some properties in the root `pom.xml` file. +This regards also the projects that now hold the versions of the dependencies in the properties section. +Your projects will work in any case, but we suggest to update your `pom.xml` files to align them to the new structure (see template file in the MapStore2 repository for more details). + +### Print config file update + +Due to the introduction of the new `Jackson Yaml` parser, the MapStore `config.yaml` file has been reviewed and updated. Below are reported all the relevant changes that need to be applied also to `config.yaml` of MapStore donwstream projects where the printing engine is present. + +Due to the new library being stricter on the format of the Yaml, some changes in the configuration files were made, to make them compliant with yaml format: + +- Removed not allowed characters from property values (`@` in `@shared.privileged.geoserver.pass@`) +- Removed references without anchors (document declares link to `*commonFooter` but anchor `&commonFooter` was not defined previously) +- Added a space between key\value pairs (`"absoluteX: 30"` instead of `"absoluteX:30"`) + +Some additional updates has been provided due to parsing issue with the new library: + +```yaml +- !ipMatch + host: 127.0.0.1 + # Allow to all hosts + mask: 0.0.0.0 +``` + +`!ipMatch` is mapped to [AddressHostMatcher](https://github.com/mapfish/mapfish-print-v2/blob/0c055e2a36bec3b12eafd207144ff8eb7b37f987/src/main/java/org/mapfish/print/config/AddressHostMatcher.java#L26), which does not have host property. Should instead use ip property (e.g IP: 127.0.0.1) + +```yaml +- !text + width: 300 + text: '${comment}' + ... +``` + +`!text` is mapped to [TextBlock class](https://github.com/mapfish/mapfish-print-v2/blob/4b73912e5565ae206af5b5c434ef37454a98c252/src/main/java/org/mapfish/print/config/layout/TextBlock.java#L37). It does not have width property, so it should be removed. + +```yaml +lastPage: + rotation: true + ... +``` + +lastPage is mapped to [LastPage class](https://github.com/mapfish/mapfish-print-v2/blob/4b73912e5565ae206af5b5c434ef37454a98c252/src/main/java/org/mapfish/print/config/layout/LastPage.java#L30), and does not have rotation property. + +### Database update + The resource metadata has been recently extented to include information about resource creator and editor and to provide the advertises/unadvertised resource functionalities. If your installation has the [database creation mode](https://docs.mapstore.geosolutionsgroup.com/en/latest/developer-guide/database-setup/#database-creation-mode) set to `update` (the default), the columns will be added automatically and you do not have to do any action. If it is set to `validate` instead you will have to run the update scripts.