From 2c45f71daf2843124ddf54b317a5aabc3998eaca Mon Sep 17 00:00:00 2001 From: Lorenzo Natali Date: Tue, 6 Oct 2026 10:20:45 +0200 Subject: [PATCH] Align project with MapStore2 master Update submodule, devDependencies, webpack-dev-server 5 config, backend (Spring 7 / Jakarta / Tomcat 10.1 / Java 17) and configs. --- Dockerfile | 4 +- MapStore2 | 2 +- README.md | 2 +- build/extension/module.app.webpack.config.js | 18 +- build/extension/webpack.config.js | 8 +- configs/config.json | 46 ++- configs/localConfig.json | 339 ++++++------------ configs/new.json | 75 ++-- configs/pluginsConfig.json | 331 ++++++++++------- package.json | 140 ++++---- pom.xml | 31 +- web/cargo/logging.properties | 79 ++++ web/pom.xml | 55 +-- web/src/main/resources/applicationContext.xml | 28 ++ web/src/main/resources/log4j.properties | 15 - web/src/main/resources/log4j2.properties | 25 ++ web/src/main/resources/proxy.properties | 4 +- web/src/main/resources/sample_categories.xml | 3 + .../main/webapp/WEB-INF/configs-servlet.xml | 2 +- .../webapp/WEB-INF/extensions-servlet.xml | 2 +- .../webapp/WEB-INF/loadAssets-servlet.xml | 2 +- web/src/main/webapp/WEB-INF/web.xml | 94 +++-- web/src/printing/applicationContext-print.xml | 12 + webpack.config.js | 39 +- 24 files changed, 723 insertions(+), 633 deletions(-) create mode 100644 web/cargo/logging.properties delete mode 100644 web/src/main/resources/log4j.properties create mode 100644 web/src/main/resources/log4j2.properties diff --git a/Dockerfile b/Dockerfile index 9f2c0ae..3ad735b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM tomcat:8.5-jdk8-openjdk +FROM tomcat:10.1-jdk17 MAINTAINER geosolutions # Tomcat specific options ENV CATALINA_BASE "$CATALINA_HOME" -ENV JAVA_OPTS="${JAVA_OPTS} -Xms512m -Xmx512m -XX:MaxPermSize=128m" +ENV JAVA_OPTS="${JAVA_OPTS} -Xms512m -Xmx512m" # Optionally remove Tomcat manager, docs, and examples ARG TOMCAT_EXTRAS=false diff --git a/MapStore2 b/MapStore2 index d450d10..daf4fa0 160000 --- a/MapStore2 +++ b/MapStore2 @@ -1 +1 @@ -Subproject commit d450d10db61b3fe92da569b5839e27f851db9005 +Subproject commit daf4fa030156cb17bd8def87fe1ffed111a99e03 diff --git a/README.md b/README.md index b8ef860..045938a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Clone the repository with the --recursive option to automatically clone submodul `git clone --recursive https://github.com/geosolutions-it/MapStoreExtension` -Install NodeJS >= 12.16.1 , if needed, from [here](https://nodejs.org/en/download/releases/). +Install NodeJS >= 20 and Java 17 (for the backend), if needed. NodeJS is available [here](https://nodejs.org/en/download/releases/). You can start the development application locally: diff --git a/build/extension/module.app.webpack.config.js b/build/extension/module.app.webpack.config.js index 9a56e4d..b404d67 100644 --- a/build/extension/module.app.webpack.config.js +++ b/build/extension/module.app.webpack.config.js @@ -5,15 +5,16 @@ const webpackConfig = require("../../webpack.config"); const { name } = require('../../config'); // emulate the extension root directory -webpackConfig.devServer.proxy["/extensions/"] = { - target: "http://localhost:8082" -}; +webpackConfig.devServer.proxy = [ + { + context: ["/extensions/"], + target: "http://localhost:8082" + }, + ...webpackConfig.devServer.proxy +]; // emulate the extensions.json - -// before option has changed in the v4 of webpack-dev-server, -// see https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md -webpackConfig.devServer.before = function(app) { - app.get("/extensions/extensions.json", function(req, res) { +webpackConfig.devServer.setupMiddlewares = (middlewares, devServer) => { + devServer.app.get("/extensions/extensions.json", (req, res) => { res.json({ [name]: { "bundle": "index.js", @@ -21,5 +22,6 @@ webpackConfig.devServer.before = function(app) { } }); }); + return middlewares; }; module.exports = webpackConfig; diff --git a/build/extension/webpack.config.js b/build/extension/webpack.config.js index 53c41ce..f8bd632 100644 --- a/build/extension/webpack.config.js +++ b/build/extension/webpack.config.js @@ -10,9 +10,11 @@ const webpackConfig = createExtensionWebpackConfig({ overrides: { // serve translations (and index.json) devServer: { - publicPath: "/extensions/", - contentBase: './assets', - contentBasePublicPath: '/extensions/' + devMiddleware: { publicPath: "/extensions/" }, + static: { + directory: './assets', + publicPath: '/extensions/' + } } } }); diff --git a/configs/config.json b/configs/config.json index 33ce172..99ac43a 100644 --- a/configs/config.json +++ b/configs/config.json @@ -1,20 +1,38 @@ { + "version": 2, "map": { "projection": "EPSG:900913", "units": "m", - "center": {"x": 1250000.000000, "y": 5370000.000000, "crs": "EPSG:900913"}, - "zoom":5, - "maxExtent": [ - -20037508.34, -20037508.34, - 20037508.34, 20037508.34 - ], - "layers": [{ - "type": "osm", - "title": "Open Street Map", - "name": "mapnik", - "source": "osm", - "group": "background", - "visibility": true - }] + "center": { + "x": 1250000.0, + "y": 5370000.0, + "crs": "EPSG:900913" + }, + "zoom": 5, + "maxExtent": [-20037508.34, -20037508.34, 20037508.34, 20037508.34], + "layers": [ + { + "format": "image/jpeg", + "group": "background", + "name": "osm:osm", + "opacity": 1, + "title": "OSM Bright", + "thumbURL": "product/assets/img/osm-bright.jpg", + "type": "wms", + "url": [ + "https://maps1.geosolutionsgroup.com/geoserver/wms", + "https://maps2.geosolutionsgroup.com/geoserver/wms", + "https://maps3.geosolutionsgroup.com/geoserver/wms", + "https://maps4.geosolutionsgroup.com/geoserver/wms", + "https://maps5.geosolutionsgroup.com/geoserver/wms", + "https://maps6.geosolutionsgroup.com/geoserver/wms" + ], + "visibility": true, + "singleTile": false, + "credits": { + "title": "OSM Bright | Rendering GeoSolutions | Data © OpenStreetMap contributors, ODbL" + } + } + ] } } diff --git a/configs/localConfig.json b/configs/localConfig.json index 953e429..ae77531 100644 --- a/configs/localConfig.json +++ b/configs/localConfig.json @@ -26,12 +26,10 @@ "geoStoreUrl": "rest/geostore/", "mailingList": "https://groups.google.com/forum/#!forum/mapstore-users", "printUrl": "pdf/info.json", - "bingApiKey": "AhuXBu7ipR1gNbBfXhtUAyCZ6rkC5PkWpxs2MnMRZ1ZupxQfivjLCch22ozKSCAn", "mapquestApiKey": "__API_KEY_MAPQUEST__", "mapboxAccessToken": "__ACCESS_TOKEN_MAPBOX__", "initialMapFilter": "", "ignoreMobileCss": false, - "useAuthenticationRules": true, "loadAfterTheme": true, "defaultMapOptions": { "cesium": { @@ -42,57 +40,34 @@ "depthTestAgainstTerrain": false, "terrainProvider": { "type": "ellipsoid" + }, + "zoomToExtentSettings": { + "minRadius": 10, + "fitFactor": 2.0, + "maxZoom": 20 } }, "floatingIdentifyDelay": 1000 }, + "featureInfoMediaTypeAliases": {}, "localizedLayerStyles": { "name": "mapstore_language" }, - "authenticationRules": [ + "requestsConfigurationRules": [ { - "urlPattern": ".*geostore.*", - "method": "bearer" + "urlPattern": ".*rest/geostore.*", + "headers": { + "Authorization": "Bearer ${securityToken}" + } }, { "urlPattern": ".*rest/config.*", - "method": "bearer" - } - ], - "monitorState": [ - { - "name": "router", - "path": "router.location.pathname" - }, - { - "name": "browser", - "path": "browser" - }, - { - "name": "geostorymode", - "path": "geostory.mode" - }, - { - "name": "featuregridmode", - "path": "featuregrid.mode" - }, - { - "name": "userrole", - "path": "security.user.role" - }, - { - "name": "printEnabled", - "path": "print.capabilities" - }, - { - "name": "resourceCanEdit", - "path": "resources.initialSelectedResource.canEdit" - }, - { - "name": "resourceDetails", - "path": "resources.initialSelectedResource.attributes.details" + "headers": { + "Authorization": "Bearer ${securityToken}" + } } ], + "monitorState": [], "userSessions": { "enabled": true }, @@ -266,7 +241,8 @@ } ] } - } + }, + "tagFilterType": "category" } }, "locales": { @@ -297,6 +273,7 @@ }, "plugins": { "mobile": [ + { "name": "SecurityPopup" }, { "name": "Map", "cfg": { @@ -317,25 +294,10 @@ } }, "DrawerMenu", - { - "name": "BackgroundSelector", - "cfg": { - "bottom": 25, - "dimensions": { - "side": 65, - "sidePreview": 65, - "frame": 3, - "margin": 5, - "label": false, - "vertical": true - } - } - }, + "BackgroundSelector", { "name": "Identify", - "showIn": [ - "Settings" - ], + "showIn": ["Settings"], "cfg": { "showFullscreen": true, "position": "bottom", @@ -387,10 +349,7 @@ "name": "Search", "cfg": { "showOptions": false, - "withToggle": [ - "max-width: 768px", - "min-width: 768px" - ] + "withToggle": ["max-width: 768px", "min-width: 768px"] } }, { @@ -430,12 +389,8 @@ } }, "FeedbackMask", - { - "name": "Widgets" - }, - { - "name": "WidgetsTray" - } + { "name": "Widgets" }, + { "name": "WidgetsTray" } ], "desktop": [ "SampleExtension", @@ -446,9 +401,11 @@ "containerPosition": "header" } }, + { "name": "SecurityPopup" }, { "name": "Map", "cfg": { + "containerPosition": "background", "mapOptions": { "openlayers": { "interactions": { @@ -515,7 +472,12 @@ } }, "Home", - "FeatureEditor", + { + "name": "FeatureEditor", + "cfg": { + "containerPosition": "bottom" + } + }, "LayerDownload", { "name": "QueryPanel", @@ -540,18 +502,12 @@ "id": "Viewport", "name": "queryform.spatialfilter.methods.viewport" }, - { - "id": "BBOX", - "name": "queryform.spatialfilter.methods.box" - }, + { "id": "BBOX", "name": "queryform.spatialfilter.methods.box" }, { "id": "Circle", "name": "queryform.spatialfilter.methods.circle" }, - { - "id": "Polygon", - "name": "queryform.spatialfilter.methods.poly" - } + { "id": "Polygon", "name": "queryform.spatialfilter.methods.poly" } ] } }, @@ -572,7 +528,12 @@ "AddGroup", "TOCItemsSettings", "Tutorial", - "MapFooter", + { + "name": "MapFooter", + "cfg": { + "containerPosition": "footer" + } + }, { "name": "Measure", "cfg": { @@ -593,10 +554,7 @@ } }, { - "name": "MetadataExplorer", - "cfg": { - "wrap": true - } + "name": "Catalog" }, { "name": "About", @@ -610,33 +568,24 @@ "editCRS": true, "showLabels": true, "showToggle": true, - "filterAllowedCRS": [ - "EPSG:4326", - "EPSG:3857" - ], + "filterAllowedCRS": ["EPSG:4326", "EPSG:3857"], "additionalCRS": {} } }, { "name": "CRSSelector", "cfg": { - "additionalCRS": {}, - "filterAllowedCRS": [ - "EPSG:4326", - "EPSG:3857" - ], - "allowedRoles": [ - "ADMIN" + "allowedRoles": ["ADMIN"], + "availableProjections": [ + { "value": "EPSG:4326", "label": "EPSG:4326" }, + { "value": "EPSG:3857", "label": "EPSG:3857" } ] } }, { "name": "Search", "cfg": { - "withToggle": [ - "max-width: 768px", - "min-width: 768px" - ] + "withToggle": ["max-width: 768px", "min-width: 768px"] } }, { @@ -688,30 +637,12 @@ }, "OmniBar", "Login", - { - "name": "ResourceDetails", - "cfg": { - "resourceType": "MAP" - } - }, - { - "name": "Save", - "cfg": { - "resourceType": "MAP" - } - }, - { - "name": "SaveAs", - "cfg": { - "resourceType": "MAP" - } - }, + { "name": "ResourceDetails", "cfg": { "resourceType": "MAP" } }, + { "name": "Save", "cfg": { "resourceType": "MAP" } }, + { "name": "SaveAs", "cfg": { "resourceType": "MAP" } }, { "name": "DeleteResource", - "cfg": { - "resourceType": "MAP", - "redirectTo": "/" - } + "cfg": { "resourceType": "MAP", "redirectTo": "/" } }, "Expander", "Undo", @@ -728,16 +659,15 @@ { "name": "Timeline", "cfg": { - "expandLimit": 20 + "expandLimit": 20, + "containerPosition": "bottom" } }, "Playback", "FeedbackMask", "StyleEditor", "SidebarMenu", - { - "name": "MapViews" - }, + { "name": "MapViews" }, { "name": "Language" } @@ -883,12 +813,8 @@ "Notifications" ], "maps": [ - { - "name": "HomeDescription" - }, - { - "name": "ResourcesSearch" - }, + { "name": "HomeDescription" }, + { "name": "ResourcesSearch" }, { "name": "ResourcesGrid", "cfg": { @@ -922,35 +848,33 @@ { "labelId": "resourcesCatalog.createMap", "type": "link", - "href": "#/viewer/new" + "href": "#/viewer/new", + "resourceType": "MAP" }, { "labelId": "resourcesCatalog.createDashboard", "type": "link", - "href": "#/dashboard/" + "href": "#/dashboard/", + "resourceType": "DASHBOARD" }, { "labelId": "resourcesCatalog.createGeoStory", "type": "link", - "href": "#/geostory/newgeostory/" + "href": "#/geostory/newgeostory/", + "resourceType": "GEOSTORY" }, { "labelId": "resourcesCatalog.createContext", "type": "link", "href": "#/context-creator/new", - "disableIf": "{state('userrole') !== 'ADMIN'}" + "resourceType": "CONTEXT" } ] } ] } }, - { - "name": "TagsManager" - }, - { - "name": "Favorites" - }, + { "name": "Favorites" }, { "name": "ResourcesFiltersForm", "cfg": { @@ -1006,12 +930,8 @@ } } }, - { - "name": "Footer" - }, - { - "name": "About" - }, + { "name": "Footer" }, + { "name": "About" }, { "name": "Cookie", "cfg": { @@ -1020,30 +940,19 @@ } } ], - "permalink": [ - "Permalink", - "FeedbackMask" - ], + "permalink": ["Permalink", "FeedbackMask"], "dashboard": [ { - "name": "ResourceDetails", - "cfg": { - "resourceType": "DASHBOARD" - } - }, - { - "name": "Save", - "cfg": { - "resourceType": "DASHBOARD" - } - }, - { - "name": "SaveAs", + "name": "LayerDownload", "cfg": { - "resourceType": "DASHBOARD" + "cropDataSetVisible": false } }, + { "name": "ResourceDetails", "cfg": { "resourceType": "DASHBOARD" } }, + { "name": "Save", "cfg": { "resourceType": "DASHBOARD" } }, + { "name": "SaveAs", "cfg": { "resourceType": "DASHBOARD" } }, "Details", + { "name": "SecurityPopup" }, "AddWidgetDashboard", "MapConnectionDashboard", { @@ -1056,6 +965,18 @@ "name": "Dashboard" }, "Notifications", + { + "name": "MapEditor", + "cfg": { + "titleMsgId": "widgets.mapWidget.mapEditorTitle", + "overrideDefaultPlugins": [ + { + "name": "FeatureEditor", + "cfg": { "containerPosition": "bottom" } + } + ] + } + }, { "name": "About", "cfg": { @@ -1081,17 +1002,10 @@ }, { "name": "DeleteResource", - "cfg": { - "resourceType": "DASHBOARD", - "redirectTo": "/" - } - }, - { - "name": "DashboardExport" - }, - { - "name": "DashboardImport" + "cfg": { "resourceType": "DASHBOARD", "redirectTo": "/" } }, + { "name": "DashboardExport" }, + { "name": "DashboardImport" }, { "name": "BrandNavbar", "cfg": { @@ -1110,22 +1024,10 @@ "showConnectionsParamToggle": true, "allowFullScreen": false, "sizeOptions": { - "Small": { - "width": 600, - "height": 500 - }, - "Medium": { - "width": 800, - "height": 600 - }, - "Large": { - "width": 1000, - "height": 800 - }, - "Custom": { - "width": 0, - "height": 0 - } + "Small": { "width": 600, "height": 500 }, + "Medium": { "width": 800, "height": 600 }, + "Large": { "width": 1000, "height": 800 }, + "Custom": { "width": 0, "height": 0 } }, "selectedOption": "Small" } @@ -1179,18 +1081,12 @@ } ], "spatialMethodOptions": [ - { - "id": "BBOX", - "name": "queryform.spatialfilter.methods.box" - }, + { "id": "BBOX", "name": "queryform.spatialfilter.methods.box" }, { "id": "Circle", "name": "queryform.spatialfilter.methods.circle" }, - { - "id": "Polygon", - "name": "queryform.spatialfilter.methods.poly" - } + { "id": "Polygon", "name": "queryform.spatialfilter.methods.poly" } ], "containerPosition": "columns" } @@ -1212,6 +1108,7 @@ ], "geostory-embedded": [ "GeoStory", + { "name": "SecurityPopup" }, { "name": "GeoStoryNavigation", "cfg": { @@ -1232,30 +1129,17 @@ "minLayoutWidth": 768 } }, - { - "name": "FeedbackMask" - } + { "name": "SecurityPopup" }, + { "name": "FeedbackMask" } ], "geostory": [ + { "name": "SecurityPopup" }, { "name": "ResourceDetails", - "cfg": { - "containerPosition": "columns", - "resourceType": "GEOSTORY" - } - }, - { - "name": "Save", - "cfg": { - "resourceType": "GEOSTORY" - } - }, - { - "name": "SaveAs", - "cfg": { - "resourceType": "GEOSTORY" - } + "cfg": { "containerPosition": "columns", "resourceType": "GEOSTORY" } }, + { "name": "Save", "cfg": { "resourceType": "GEOSTORY" } }, + { "name": "SaveAs", "cfg": { "resourceType": "GEOSTORY" } }, { "name": "BrandNavbar", "cfg": { @@ -1286,17 +1170,10 @@ }, { "name": "DeleteResource", - "cfg": { - "resourceType": "GEOSTORY", - "redirectTo": "/" - } - }, - { - "name": "GeoStoryExport" - }, - { - "name": "GeoStoryImport" + "cfg": { "resourceType": "GEOSTORY", "redirectTo": "/" } }, + { "name": "GeoStoryExport" }, + { "name": "GeoStoryImport" }, "MapEditor", "MediaEditor", { @@ -1346,9 +1223,7 @@ "containerPosition": "header" } }, - { - "name": "About" - }, + { "name": "About" }, "Redirect", "Login", "Language", @@ -1377,10 +1252,10 @@ "Home", "UserManager", "GroupManager", + "TagsManager", + "IPManager", "Footer", - { - "name": "About" - } + { "name": "About" } ] } } diff --git a/configs/new.json b/configs/new.json index 78f0c9b..e037400 100644 --- a/configs/new.json +++ b/configs/new.json @@ -1,53 +1,23 @@ { - "map": { - "projection": "EPSG:900913", - "units": "m", - "center": {"x": 1250000.000000, "y": 5370000.000000, "crs": "EPSG:900913"}, - "zoom":5, - "maxExtent": [ - -20037508.34, -20037508.34, - 20037508.34, 20037508.34 - ], - "layers": [ - { - "type": "osm", - "title": "Open Street Map", - "name": "mapnik", - "source": "osm", - "group": "background", - "visibility": true - }, + "version": 2, + "map": { + "projection": "EPSG:900913", + "units": "m", + "center": { + "x": 1250000, + "y": 5370000, + "crs": "EPSG:900913" + }, + "zoom": 5, + "maxExtent": [-20037508.34, -20037508.34, 20037508.34, 20037508.34], + "layers": [ { - "type": "tileprovider", - "title": "NASAGIBS Night 2012", - "provider": "NASAGIBS.ViirsEarthAtNight2012", - "name": "Night2012", - "source": "nasagibs", - "group": "background", - "visibility": false - }, - { - "type": "tileprovider", - "title": "OpenTopoMap", - "provider": "OpenTopoMap", - "name": "OpenTopoMap", - "source": "OpenTopoMap", - "group": "background", - "visibility": false - }, - { - "format": "image/jpeg", + "type": "osm", + "title": "Open Street Map", + "name": "mapnik", + "source": "osm", "group": "background", - "name": "s2cloudless:s2cloudless", - "opacity": 1, - "title": "Sentinel 2 Cloudless", - "type": "wms", - "url": [ - "https://1maps.geo-solutions.it/geoserver/wms", "https://2maps.geo-solutions.it/geoserver/wms", "https://3maps.geo-solutions.it/geoserver/wms", "https://4maps.geo-solutions.it/geoserver/wms", "https://5maps.geo-solutions.it/geoserver/wms", "https://6maps.geo-solutions.it/geoserver/wms" - ], - "source": "s2cloudless", - "visibility": false, - "singleTile": false + "visibility": true }, { "source": "ol", @@ -55,13 +25,8 @@ "title": "Empty Background", "fixed": true, "type": "empty", - "visibility": false, - "args": [ - "Empty Background", { - "visibility": false - } - ] + "visibility": false } - ] - } + ] + } } diff --git a/configs/pluginsConfig.json b/configs/pluginsConfig.json index 3b305d4..2da686f 100644 --- a/configs/pluginsConfig.json +++ b/configs/pluginsConfig.json @@ -5,7 +5,6 @@ "glyph": "1-map", "mandatory": true, "defaultConfig": { - "mapTypeOverride": "openlayers", "mapOptions": { "openlayers": { "interactions": { @@ -26,7 +25,8 @@ "scalebar": { "container": "#footer-scalebar-container" } - } + }, + "containerPosition": "background" } }, { @@ -38,6 +38,11 @@ "name": "DrawerMenu", "hidden": true }, + { + "name": "SecurityPopup", + "mandatory": true, + "hidden": true + }, { "name": "TOC", "glyph": "1-layer", @@ -58,7 +63,9 @@ "TOCItemsSettings", "FeatureEditor", "FilterLayer", - "AddGroup" + "AddGroup", + "Swipe", + "MetadataInfo" ], "autoEnableChildren": [ "TOCItemsSettings", @@ -66,54 +73,43 @@ "FilterLayer", "AddGroup" ], - "dependencies": [ - "DrawerMenu" - ] + "dependencies": ["DrawerMenu"] }, { "name": "FeatureEditor", "glyph": "features-grid", "title": "plugins.FeatureEditor.title", "description": "plugins.FeatureEditor.description", - "dependencies": [ - "QueryPanel" - ], - "children": [ - "LayerDownload" - ], - "autoEnableChildren": [ - "LayerDownload" - ], - "defaultConfig": {} + "dependencies": ["QueryPanel"], + "children": ["LayerDownload"], + "autoEnableChildren": ["LayerDownload"], + "defaultConfig": { + "containerPosition": "bottom" + } }, { "name": "TOCItemsSettings", "glyph": "wrench", "title": "plugins.TOCItemsSettings.title", "description": "plugins.TOCItemsSettings.description", - "children": [ - "StyleEditor" - ] + "children": ["StyleEditor"] }, { "name": "MapFooter", "mandatory": true, - "hidden": true + "hidden": true, + "defaultConfig": { + "containerPosition": "footer" + } }, { "name": "Widgets", - "glyph": "stats", + "glyph": "widgets", "title": "plugins.Widgets.title", "description": "plugins.Widgets.description", - "children": [ - "WidgetsTray" - ], - "autoEnableChildren": [ - "WidgetsTray" - ], - "dependencies": [ - "WidgetsBuilder" - ] + "children": ["WidgetsTray"], + "autoEnableChildren": ["WidgetsTray"], + "dependencies": ["WidgetsBuilder"] }, { "name": "WidgetsTray", @@ -124,9 +120,7 @@ }, { "name": "WidgetsBuilder", - "dependencies": [ - "QueryPanel" - ], + "dependencies": ["QueryPanel"], "hidden": true }, { @@ -140,24 +134,36 @@ "glyph": "question-sign", "title": "plugins.HelpLink.title", "description": "plugins.HelpLink.description", - "dependencies": [ - "BurgerMenu" - ] + "dependencies": ["SidebarMenu"] }, { "name": "Share", "glyph": "share", "title": "plugins.Share.title", "description": "plugins.Share.description", - "dependencies": [ - "BurgerMenu" - ] + "dependencies": ["SidebarMenu"], + "children": ["Permalink"], + "autoEnableChildren": ["Permalink"] }, { - "name": "Version", - "glyph": "info-sign", - "title": "plugins.Version.title", - "description": "plugins.Version.description" + "name": "DynamicLegend", + "glyph": "align-left", + "title": "plugins.DynamicLegend.title", + "description": "plugins.DynamicLegend.description", + "dependencies": ["SidebarMenu"] + }, + { + "name": "Permalink", + "glyph": "link", + "title": "plugins.Permalink.title", + "description": "plugins.Permalink.description" + }, + { + "name": "LayersSelection", + "glyph": "hand-down", + "title": "plugins.LayersSelection.title", + "description": "plugins.LayersSelection.description", + "dependencies": ["SidebarMenu"] }, { "name": "BackgroundSelector", @@ -169,9 +175,7 @@ "glyph": "comment", "title": "plugins.Annotations.title", "description": "plugins.Annotations.description", - "dependencies": [ - "BurgerMenu" - ] + "dependencies": ["TOC"] }, { "name": "Identify", @@ -197,7 +201,7 @@ "glyph": "home", "title": "plugins.Home.title", "description": "plugins.Home.description", - "dependencies": ["OmniBar"] + "dependencies": ["OmniBar", "SidebarMenu"] }, { "name": "LayerDownload", @@ -249,7 +253,8 @@ "glyph": "add-folder", "title": "plugins.AddGroup.title", "description": "plugins.AddGroup.description" - }, { + }, + { "name": "FilterLayer", "glyph": "filter-layer", "title": "plugins.FilterLayer.title", @@ -267,74 +272,61 @@ "glyph": "1-ruler", "title": "plugins.Measure.title", "description": "plugins.Measure.description", - "dependencies": [ - "BurgerMenu" - ] + "dependencies": ["SidebarMenu"] }, { "name": "Print", "glyph": "print", "title": "plugins.Print.title", "description": "plugins.Print.description", - "dependencies": [ - "BurgerMenu" - ] + "dependencies": ["SidebarMenu"] }, { "name": "MapCatalog", "glyph": "maps-catalog", "title": "plugins.MapCatalog.title", "description": "plugins.MapCatalog.description", - "dependencies": [ - "BurgerMenu" - ] + "dependencies": ["SidebarMenu"] }, { "name": "MapImport", "glyph": "upload", "title": "plugins.MapImport.title", "description": "plugins.MapImport.description", - "dependencies": [ - "BurgerMenu" - ] + "dependencies": ["SidebarMenu"] }, { "name": "MapExport", "glyph": "download", "title": "plugins.MapExport.title", "description": "plugins.MapExport.description", - "dependencies": [ - "BurgerMenu" - ] + "dependencies": ["SidebarMenu"] }, { "name": "Settings", "glyph": "cog", "title": "plugins.Settings.title", "description": "plugins.Settings.description", - "children": ["Version"], - "dependencies": [ - "BurgerMenu" - ], + "dependencies": ["SidebarMenu"], "defaultConfig": { "wrap": true } }, { - "name": "MetadataExplorer", + "name": "Catalog", "glyph": "folder-open", "title": "plugins.MetadataExplorer.title", - "description": "plugins.MetadataExplorer.description", - "defaultConfig": { - "wrap": true - } + "description": "plugins.MetadataExplorer.description" }, { "name": "About", "glyph": "info-sign", "title": "plugins.About.title", "description": "plugins.About.description", - "dependencies": ["BurgerMenu"] + "dependencies": ["SidebarMenu"], + "defaultConfig": { + "githubUrl": "https://github.com/geosolutions-it/MapStore2/tree/" + } }, { "name": "MousePosition", @@ -346,13 +338,17 @@ "editCRS": true, "showLabels": true, "showToggle": true, - "filterAllowedCRS": [ - "EPSG:4326", - "EPSG:3857" - ], + "filterAllowedCRS": ["EPSG:4326", "EPSG:3857"], "additionalCRS": {} } }, + { + "name": "CameraPosition", + "glyph": "camera", + "title": "plugins.CameraPosition.title", + "description": "plugins.CameraPosition.description", + "dependencies": ["MapFooter"] + }, { "name": "CRSSelector", "glyph": "crs", @@ -360,30 +356,31 @@ "description": "plugins.CRSSelector.description", "dependencies": ["MapFooter"], "defaultConfig": { - "additionalCRS": {}, - "filterAllowedCRS": [ - "EPSG:4326", - "EPSG:3857" + "availableProjections": [ + { "value": "EPSG:4326", "label": "EPSG:4326" }, + { "value": "EPSG:3857", "label": "EPSG:3857" } ], - "allowedRoles": [ - "ADMIN" - ] + "allowedRoles": ["ADMIN"] } }, + { + "name": "Swipe" + }, + { + "name": "MetadataInfo" + }, + { + "name": "SearchByBookmark" + }, { "name": "Search", "glyph": "search", "title": "plugins.Search.title", "description": "plugins.Search.description", - "dependencies": [ - "OmniBar", - "SearchServicesConfig" - ], + "dependencies": ["OmniBar", "SearchServicesConfig"], + "children": ["SearchByBookmark"], "defaultConfig": { - "withToggle": [ - "max-width: 768px", - "min-width: 768px" - ] + "withToggle": ["max-width: 768px", "min-width: 768px"] } }, { @@ -405,32 +402,33 @@ "description": "plugins.ScaleBox.description", "dependencies": ["MapFooter"] }, + { + "name": "GlobeViewSwitcher", + "glyph": "globe", + "title": "plugins.Globe.title", + "description": "plugins.Globe.description", + "dependencies": ["Toolbar"] + }, { "name": "ZoomAll", "glyph": "resize-full", "title": "plugins.ZoomAll.title", "description": "plugins.ZoomAll.description", - "dependencies": [ - "Toolbar" - ] + "dependencies": ["Toolbar"] }, { "name": "ZoomIn", "glyph": "plus", "title": "plugins.ZoomIn.title", "description": "plugins.ZoomIn.description", - "dependencies": [ - "Toolbar" - ] + "dependencies": ["Toolbar"] }, { "name": "ZoomOut", "glyph": "minus", "title": "plugins.ZoomOut.title", "description": "plugins.ZoomOut.description", - "dependencies": [ - "Toolbar" - ] + "dependencies": ["Toolbar"] }, { "name": "OmniBar", @@ -447,30 +445,32 @@ "denyUserSelection": true, "title": "plugins.Save.title", "description": "plugins.Save.description", - "dependencies": [ - "BurgerMenu", - "SaveAs" - ] + "children": ["SaveAs"], + "autoEnableChildren": ["SaveAs"], + "dependencies": ["SidebarMenu"] }, { "name": "SaveAs", "glyph": "floppy-open", "title": "plugins.SaveAs.title", - "hidden": true, + "hidden": false, "description": "plugins.SaveAs.description", - "dependencies": [ - "BurgerMenu" - ] + "dependencies": ["SidebarMenu"] + }, + { + "name": "DeleteResource", + "glyph": "trash", + "title": "plugins.DeleteMap.title", + "hidden": false, + "description": "plugins.DeleteMap.description", + "dependencies": ["SidebarMenu"] }, { "name": "BurgerMenu", - "hidden": true, "glyph": "menu-hamburger", "title": "plugins.BurgerMenu.title", "description": "plugins.BurgerMenu.description", - "dependencies": [ - "OmniBar" - ] + "dependencies": ["OmniBar"] }, { "name": "Expander", @@ -482,25 +482,17 @@ { "name": "Undo", "glyph": "1-screen-backward", - "dependencies": [ - "Toolbar", - "Expander" - ] + "dependencies": ["Toolbar", "Expander"] }, { "name": "Redo", "glyph": "1-screen-forward", - "dependencies": [ - "Toolbar", - "Expander" - ] + "dependencies": ["Toolbar", "Expander"] }, { "name": "FullScreen", "glyph": "1-full-screen", - "dependencies": [ - "Toolbar" - ] + "dependencies": ["Toolbar"] }, { "name": "SearchServicesConfig", @@ -511,7 +503,10 @@ "glyph": "time", "title": "plugins.Timeline.title", "description": "plugins.Timeline.description", - "dependencies": ["Playback"] + "dependencies": ["Playback"], + "defaultConfig": { + "containerPosition": "bottom" + } }, { "name": "Playback", @@ -534,29 +529,95 @@ "glyph": "1-time-user", "title": "plugins.MapLoading.title", "description": "plugins.MapLoading.description", - "dependencies": [ - "Toolbar" - ] + "dependencies": ["Toolbar"] }, { "name": "MapTemplates", "title": "Map Templates", - "dependencies": [ - "BurgerMenu" - ] - }, { + "dependencies": ["SidebarMenu"] + }, + { "name": "UserExtensions", "glyph": "1-user-add", "title": "plugins.UserExtensions.title", "hidden": true, "description": "plugins.UserExtensions.description", - "dependencies": ["BurgerMenu"] - }, { + "dependencies": ["SidebarMenu"] + }, + { "name": "UserSession", "glyph": "floppy-save", "title": "plugins.UserSession.title", "description": "plugins.UserSession.description", - "dependencies": ["BurgerMenu"] + "dependencies": ["SidebarMenu"] + }, + { + "name": "StreetView", + "glyph": "road", + "title": "plugins.StreetView.title", + "description": "plugins.StreetView.description", + "dependencies": ["SidebarMenu"] + }, + { + "name": "SidebarMenu", + "hidden": true + }, + { + "name": "MapViews", + "glyph": "map-view", + "title": "plugins.MapViews.title", + "description": "plugins.MapViews.description", + "dependencies": ["SidebarMenu"] + }, + { + "name": "LongitudinalProfileTool", + "glyph": "1-line", + "title": "plugins.LongitudinalProfileTool.title", + "description": "plugins.LongitudinalProfileTool.description", + "dependencies": ["SidebarMenu"] + }, + { + "name": "GeoProcessing", + "glyph": "globe-settings", + "title": "plugins.GeoProcessing.title", + "description": "plugins.GeoProcessing.description", + "dependencies": ["SidebarMenu"] + }, + { + "name": "BrandNavbar", + "title": "plugins.BrandNavbar.title", + "description": "plugins.BrandNavbar.description", + "children": ["ResourceDetails", "Language"], + "defaultConfig": { + "containerPosition": "header" + } + }, + { + "name": "ResourceDetails", + "title": "plugins.ResourceDetails.title", + "description": "plugins.ResourceDetails.description", + "defaultConfig": { + "resourceType": "MAP" + } + }, + { + "name": "Language", + "title": "plugins.Language.title", + "description": "plugins.Language.description" + }, + { + "name": "Itinerary", + "glyph": "route", + "title": "plugins.Itinerary.title", + "description": "plugins.Itinerary.description", + "dependencies": ["SidebarMenu"] + }, + { + "name": "Isochrone", + "glyph": "1-point-dashed", + "title": "plugins.Isochrone.title", + "description": "plugins.Isochrone.description", + "dependencies": ["SidebarMenu"] } ] } diff --git a/package.json b/package.json index 3da4a56..bc9ce7c 100644 --- a/package.json +++ b/package.json @@ -34,70 +34,70 @@ ] }, "devDependencies": { - "@babel/core": "7.28.4", - "@babel/preset-env": "7.28.3", - "@babel/preset-react": "7.27.1", - "@geosolutions/acorn-jsx": "4.0.2", - "@geosolutions/jsdoc": "3.4.4", - "@geosolutions/mocha": "6.2.1-3", - "@mapstore/eslint-config-mapstore": "1.0.6", - "@testing-library/react": "12.1.5", - "axios-mock-adapter": "2.1.0", - "babel-loader": "10.0.0", - "babel-plugin-istanbul": "6.0.0", - "babel-plugin-transform-imports": "2.0.0", - "clean-webpack-plugin": "^4.0.0", - "copy-webpack-plugin": "5.0.2", - "css-loader": "5.1.2", - "css-minimizer-webpack-plugin": "3.0.2", - "denodeify": "1.2.1", - "docma": "1.5.1", - "eslint": "7.32.0", - "eslint-plugin-import": "2.29.1", - "eslint-plugin-no-only-tests": "2.6.0", - "eslint-plugin-react": "3.16.1", - "expect": "1.20.1", - "file-loader": "2.0.0", - "html-loader": "2.0.0", - "html-webpack-plugin": "5.2.0", - "karma": "6.4.0", - "karma-chrome-launcher": "3.1.1", - "karma-cli": "2.0.0", - "karma-coverage": "2.2.0", - "karma-coveralls": "2.1.0", - "karma-firefox-launcher": "2.1.2", - "karma-junit-reporter": "2.0.1", - "karma-mocha": "2.0.1", - "karma-mocha-reporter": "2.2.5", - "karma-sourcemap-loader": "0.3.8", - "karma-webpack": "5.0.0", - "less": "4.1.1", - "less-loader": "8.0.0", - "markdownlint-cli": "0.34.0", - "mini-css-extract-plugin": "1.3.9", - "mkdirp": "0.5.1", - "ncp": "2.0.0", - "postcss": "8.3.5", - "postcss-loader": "6.1.0", - "postcss-prefix-selector": "1.10.0", - "premove": "4.0.0", - "prettier": "3.5.1", - "process": "0.11.10", - "raw-loader": "0.5.1", - "readline-promise": "1.0.4", - "redux-devtools": "3.4.0", - "redux-devtools-dock-monitor": "1.1.2", - "redux-devtools-log-monitor": "1.3.0", - "redux-mock-store": "1.2.2", - "simple-git": "2.20.1", - "style-loader": "2.0.0", - "terser": "5.18.1", - "url-loader": "0.5.7", - "webpack": "5.104.1", - "webpack-bundle-size-analyzer": "2.0.2", - "webpack-cli": "4.10.0", - "webpack-dev-server": "3.11.0", - "zip-webpack-plugin": "3.0.0" + "@babel/core": "7.29.6", + "@babel/preset-env": "7.28.3", + "@babel/preset-react": "7.27.1", + "@geosolutions/acorn-jsx": "4.0.2", + "@geosolutions/jsdoc": "3.4.4", + "@geosolutions/mocha": "6.2.1-3", + "@mapstore/eslint-config-mapstore": "1.0.6", + "@testing-library/react": "12.1.5", + "axios-mock-adapter": "2.1.0", + "babel-loader": "10.0.0", + "babel-plugin-istanbul": "6.0.0", + "babel-plugin-transform-imports": "2.0.0", + "clean-webpack-plugin": "^4.0.0", + "copy-webpack-plugin": "5.0.2", + "css-loader": "5.1.2", + "css-minimizer-webpack-plugin": "3.0.2", + "denodeify": "1.2.1", + "docma": "1.5.1", + "eslint": "7.32.0", + "eslint-plugin-import": "2.29.1", + "eslint-plugin-no-only-tests": "2.6.0", + "eslint-plugin-react": "3.16.1", + "expect": "1.20.1", + "file-loader": "2.0.0", + "html-loader": "2.0.0", + "html-webpack-plugin": "5.2.0", + "karma": "6.4.0", + "karma-chrome-launcher": "3.1.1", + "karma-cli": "2.0.0", + "karma-coverage": "2.2.0", + "karma-coveralls": "2.1.0", + "karma-firefox-launcher": "2.1.2", + "karma-junit-reporter": "2.0.1", + "karma-mocha": "2.0.1", + "karma-mocha-reporter": "2.2.5", + "karma-sourcemap-loader": "0.3.8", + "karma-webpack": "5.0.0", + "less": "4.1.1", + "less-loader": "8.0.0", + "markdownlint-cli": "0.34.0", + "mini-css-extract-plugin": "1.3.9", + "mkdirp": "0.5.1", + "ncp": "2.0.0", + "postcss": "8.5.23", + "postcss-loader": "6.1.0", + "postcss-prefix-selector": "1.10.0", + "premove": "4.0.0", + "prettier": "3.5.1", + "process": "0.11.10", + "raw-loader": "0.5.1", + "readline-promise": "1.0.4", + "redux-devtools": "3.4.0", + "redux-devtools-dock-monitor": "1.1.2", + "redux-devtools-log-monitor": "1.3.0", + "redux-mock-store": "1.2.2", + "simple-git": "3.36.0", + "style-loader": "2.0.0", + "terser": "5.18.1", + "url-loader": "0.5.7", + "webpack": "5.104.1", + "webpack-bundle-size-analyzer": "2.0.2", + "webpack-cli": "5.1.4", + "webpack-dev-server": "5.2.6", + "zip-webpack-plugin": "3.0.0" }, "dependencies": { "mapstore2": "file:MapStore2" @@ -105,13 +105,13 @@ "scripts": { "postinstall": "node MapStore2/utility/build/postInstall.js", "clean": "premove dist", - "compile": "npm run clean && mkdirp ./dist && node --max_old_space_size=2048 ./node_modules/webpack/bin/webpack.js --config prod-webpack.config.js --env.production", - "fe:start": "webpack serve --progress --color --port 8081 --hot --inline --content-base .", + "compile": "npm run clean && mkdirp ./dist && node --max_old_space_size=2048 ./node_modules/webpack/bin/webpack.js --config prod-webpack.config.js --env production", + "fe:start": "webpack serve --progress --color --port 8081 --hot", "start": "concurrently -n frontend,backend -c green,blue \"npm:fe:start\" \"npm:be:start\"", - "be:start": "npm run be:build && mvn cargo:run -f ./web/pom.xml", - "be:build": "mvn clean install", - "ext:startapp": "webpack serve --progress --color --port 8081 --hot --inline --content-base . --config build/extension/module.app.webpack.config.js", - "ext:start": "webpack serve --progress --color --port 8082 --hot --inline --config build/extension/webpack.config.js", + "be:start": "npm run be:build && mvn cargo:run -f ./web/pom.xml -Pprinting", + "be:build": "mvn clean install -Pprinting", + "ext:startapp": "webpack serve --progress --color --port 8081 --hot --config build/extension/module.app.webpack.config.js", + "ext:start": "webpack serve --progress --color --port 8082 --hot --config build/extension/webpack.config.js", "ext:build": "premove ./dist && mkdirp ./dist && webpack --progress --color --config build/extension/prod-webpack.config.js", "test": "karma start ./karma.conf.single-run.js", "continuoustest": "karma start ./karma.conf.continuous-test.js", diff --git a/pom.xml b/pom.xml index 5885567..c1c9c53 100644 --- a/pom.xml +++ b/pom.xml @@ -6,33 +6,34 @@ pom 1.0-SNAPSHOT MapStoreExtension - Root Project - undefined + https://github.com/geosolutions-it/MapStoreExtension UTF-8 8080 - 9.0.116 - 2.16.1 + 10.1.55 + 2.19.4 + -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8989 2.6 3.4.0 + - 5.7.13 - 5.3.39 + 7.0.8 + 7.1.0 + - 1.5.4 - 2.0.4 - 4.5.13 - 3.0.1 - 2.3.1 + 6.0.0 + 4.0.3 4.13.2 4.0.0 - 1.10.2 + 1.10.27 + - 1.10-SNAPSHOT - 2.5-SNAPSHOT - 1.6-SNAPSHOT - 2.3.4 + 1.13-SNAPSHOT + 2.7-SNAPSHOT + 1.7-SNAPSHOT + 2.5-SNAPSHOT diff --git a/web/cargo/logging.properties b/web/cargo/logging.properties new file mode 100644 index 0000000..0bee6b3 --- /dev/null +++ b/web/cargo/logging.properties @@ -0,0 +1,79 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler + +.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler + +############################################################ +# Handler specific properties. +# Describes specific configuration info for Handlers. +############################################################ + +1catalina.org.apache.juli.AsyncFileHandler.level = ALL +1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina. +1catalina.org.apache.juli.AsyncFileHandler.maxDays = 90 +1catalina.org.apache.juli.AsyncFileHandler.encoding = UTF-8 + +2localhost.org.apache.juli.AsyncFileHandler.level = ALL +2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost. +2localhost.org.apache.juli.AsyncFileHandler.maxDays = 90 +2localhost.org.apache.juli.AsyncFileHandler.encoding = UTF-8 + +3manager.org.apache.juli.AsyncFileHandler.level = ALL +3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +3manager.org.apache.juli.AsyncFileHandler.prefix = manager. +3manager.org.apache.juli.AsyncFileHandler.maxDays = 90 +3manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8 + +4host-manager.org.apache.juli.AsyncFileHandler.level = ALL +4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager. +4host-manager.org.apache.juli.AsyncFileHandler.maxDays = 90 +4host-manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8 + +java.util.logging.ConsoleHandler.level = ALL +java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter +java.util.logging.ConsoleHandler.encoding = UTF-8 + + +############################################################ +# Facility specific properties. +# Provides extra control for each logger. +############################################################ + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler + +# For example, set the org.apache.catalina.util.LifecycleBase logger to log +# each component that extends LifecycleBase changing state: +#org.apache.catalina.util.LifecycleBase.level = FINE + +# To see debug messages for HTTP/2 handling, uncomment the following line: +#org.apache.coyote.http2.level = FINE + +# To see debug messages for WebSocket handling, uncomment the following line: +#org.apache.tomcat.websocket.level = FINE + +# MapStore debugging +#org.apache.catalina.core.StandardContext.level = FINE diff --git a/web/pom.xml b/web/pom.xml index a071417..4c72674 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -6,10 +6,10 @@ MapStoreExtension-root 1.0-SNAPSHOT - mapstore-web + MapStoreExtension-web war Template project to create MapStore extensions - WAR - + https://github.com/geosolutions-it/MapStoreExtension @@ -59,21 +59,9 @@ - javax.servlet - javax.servlet-api - ${javax.servlet-api.version} - - - - net.sf.ehcache - ehcache-web - ${ehcache-web.version} - - - - commons-pool - commons-pool - ${commons-pool.version} + jakarta.servlet + jakarta.servlet-api + ${jakarta.servlet-api.version} @@ -393,7 +381,7 @@ ${cargo.version} - tomcat9x + tomcat10x https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat/${tomcat.version}/tomcat-${tomcat.version}.zip @@ -406,9 +394,11 @@ ${project.build.directory}/apache-tomcat-${tomcat.version} - + + ${backend.debug.args} --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED + -Djava.util.logging.config.file=${project.basedir}/cargo/logging.properties ${tomcat.port} low @@ -471,11 +461,6 @@ - - org.apache.httpcomponents - httpclient - ${httpclient.version} - junit @@ -491,25 +476,13 @@ - javax.servlet - javax.servlet-api - ${javax.servlet-api.version} - - - - net.sf.ehcache - ehcache-web - ${ehcache-web.version} - - - - commons-pool - commons-pool - ${commons-pool.version} + jakarta.servlet + jakarta.servlet-api + ${jakarta.servlet-api.version} - javax.xml.ws - jaxws-api + jakarta.xml.ws + jakarta.xml.ws-api ${jaxws-api.version} diff --git a/web/src/main/resources/applicationContext.xml b/web/src/main/resources/applicationContext.xml index 6c32cf5..7a72b8e 100644 --- a/web/src/main/resources/applicationContext.xml +++ b/web/src/main/resources/applicationContext.xml @@ -28,4 +28,32 @@ + + + + + + classpath:geostore.properties + classpath*:geostore.properties + classpath:mapstore.properties + classpath:ldap.properties + file:${datadir.location:}/mapstore.properties + file:${datadir.location:}/ldap.properties + + + + + + + + + + + + classpath:mapstore-ovr.properties + file:${datadir.location:}/geostore-datasource-ovr.properties + file:${datadir.location:}/mapstore-ovr.properties + + + diff --git a/web/src/main/resources/log4j.properties b/web/src/main/resources/log4j.properties deleted file mode 100644 index 4be5588..0000000 --- a/web/src/main/resources/log4j.properties +++ /dev/null @@ -1,15 +0,0 @@ -log4j.rootLogger=INFO, fileAppender - -log4j.appender.consoleAppender=org.apache.log4j.ConsoleAppender -log4j.appender.consoleAppender.layout=org.apache.log4j.PatternLayout -log4j.appender.consoleAppender.layout.ConversionPattern=%p %d{yyyy-MM-dd HH:mm:ss.SSS} %c::%M:%L - %m%n - -log4j.logger.it.geosolutions.geostore.services.rest=INFO -log4j.logger.org.hibernate=INFO -log4j.logger.com.trg=INFO - -# File appender -log4j.appender.fileAppender=org.apache.log4j.RollingFileAppender -log4j.appender.fileAppender.layout=org.apache.log4j.PatternLayout -log4j.appender.fileAppender.layout.ConversionPattern=%p %d{yyyy-MM-dd HH:mm:ss.SSS} %C{1}.%M() - %m %n -log4j.appender.fileAppender.File=${catalina.base}/logs/MapStoreExtension.log \ No newline at end of file diff --git a/web/src/main/resources/log4j2.properties b/web/src/main/resources/log4j2.properties new file mode 100644 index 0000000..9c480cb --- /dev/null +++ b/web/src/main/resources/log4j2.properties @@ -0,0 +1,25 @@ +rootLogger.level = INFO +appenders= console, file + + +appender.console.type = Console +appender.console.name = LogToConsole +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = %p %d{yyyy-MM-dd HH:mm:ss.SSS} %c::%M:%L - %m%n +rootLogger.appenderRef.stdout.ref = LogToConsole +rootLogger.appenderRef.console.ref = LogToConsole + +appender.file.type = File +appender.file.name = LogToFile +appender.file.fileName=${sys:catalina.base}/logs/mapstore.log +appender.file.layout.type=PatternLayout +appender.file.layout.pattern=%p %d{yyyy-MM-dd HH:mm:ss.SSS} %C{1}.%M() - %m %n +rootLogger.appenderRef.file.ref = LogToFile + + +logger.restsrv.name=it.geosolutions.geostore.services.rest +logger.restsrv.level= INFO +logger.hibernate1.name=org.hibernate +logger.hibernate1.level=INFO +logger.trg1.name=com.trg +logger.trg1.level=INFO diff --git a/web/src/main/resources/proxy.properties b/web/src/main/resources/proxy.properties index 94c941e..0a09cb2 100644 --- a/web/src/main/resources/proxy.properties +++ b/web/src/main/resources/proxy.properties @@ -16,7 +16,7 @@ defaultStreamByteSize=1024 # ########### #hostnameWhitelist = localhost,demo1.geo-solutions.it,demo.geo-solutions.it -mimetypeWhitelist = application/force-download,text/html,text/plain,application/xml,text/xml,application/vnd.ogc.sld+xml,application/vnd.ogc.gml,application/json,application/vnd.ogc.wms_xml,application/x-www-form-urlencoded,image/png,application/pdf,text/csv,application/zip,text/csv;charset=UTF-8 +mimetypeWhitelist = application/force-download,text/html,text/plain,application/xml,text/xml,application/vnd.ogc.sld+xml,application/vnd.ogc.gml,application/json,application/vnd.ogc.wms_xml,application/x-www-form-urlencoded,image/png,application/pdf,text/csv,image/bil,application/bil16,application/zip,text/csv;charset=UTF-8,application/gml+xml,application/octet-stream,binary/octet-stream methodsWhitelist = GET,POST,PUT @@ -27,4 +27,4 @@ reqtypeWhitelist.capabilities = .*[Gg]et[Cc]apabilities.* reqtypeWhitelist.featureinfo = .*[Gg]et[Ff]eature[Ii]nfo.* reqtypeWhitelist.csw = .*csw.* reqtypeWhitelist.geostore = .*geostore.* -reqtypeWhitelist.generic = (.*exist.*)|(.*pdf.*)|(.*map.*)|(.*wms.*)|(.*wmts.*)|(.*tms.*)|(.*wfs.*)|(.*ows.*)|(.*spatialreference.*)|(.*wps.*) +reqtypeWhitelist.generic = (.*exist.*)|(.*pdf.*)|(.*map.*)|(.*wms.*)|(.*wmts.*)|(.*tms.*)|(.*wfs.*)|(.*ows.*)|(.*spatialreference.*)|(.*wps.*)|(.*rest.*)|(.*tileset\.json.*)|(.*\.b3dm.*)|(.*\.i3dm.*)|(.*\.pnts.*)|(.*\.glb.*)|(.*\.ifc.*) diff --git a/web/src/main/resources/sample_categories.xml b/web/src/main/resources/sample_categories.xml index 899bf85..1673bff 100644 --- a/web/src/main/resources/sample_categories.xml +++ b/web/src/main/resources/sample_categories.xml @@ -24,4 +24,7 @@ USERSESSION + + PERMALINK + diff --git a/web/src/main/webapp/WEB-INF/configs-servlet.xml b/web/src/main/webapp/WEB-INF/configs-servlet.xml index 9eddc99..9cf39d6 100644 --- a/web/src/main/webapp/WEB-INF/configs-servlet.xml +++ b/web/src/main/webapp/WEB-INF/configs-servlet.xml @@ -12,7 +12,7 @@ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"> - + diff --git a/web/src/main/webapp/WEB-INF/extensions-servlet.xml b/web/src/main/webapp/WEB-INF/extensions-servlet.xml index 206c71b..25d0d06 100644 --- a/web/src/main/webapp/WEB-INF/extensions-servlet.xml +++ b/web/src/main/webapp/WEB-INF/extensions-servlet.xml @@ -12,7 +12,7 @@ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"> - + diff --git a/web/src/main/webapp/WEB-INF/loadAssets-servlet.xml b/web/src/main/webapp/WEB-INF/loadAssets-servlet.xml index 28d407b..220ee5b 100644 --- a/web/src/main/webapp/WEB-INF/loadAssets-servlet.xml +++ b/web/src/main/webapp/WEB-INF/loadAssets-servlet.xml @@ -12,7 +12,7 @@ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"> - + diff --git a/web/src/main/webapp/WEB-INF/web.xml b/web/src/main/webapp/WEB-INF/web.xml index 4ea227f..a7e191c 100644 --- a/web/src/main/webapp/WEB-INF/web.xml +++ b/web/src/main/webapp/WEB-INF/web.xml @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ /proxy.properties,${datadir.location}/proxy.properties - - - org.springframework.web.context.ContextLoaderListener - + + org.springframework.web.context.ContextLoaderListener + + springRequestContextFilter org.springframework.web.filter.RequestContextFilter @@ -53,25 +54,52 @@ /rest/* - - - CompressionFilter - net.sf.ehcache.constructs.web.filter.GzipFilter - - - CompressionFilter - *.css - - - CompressionFilter - *.html - - - CompressionFilter - *.js - + + + noCacheFilter + it.geosolutions.mapstore.filters.NoCacheFilter + + + noCacheFilter + / + + + noCacheFilter + *.html + + + noCacheFilter + *.json + + + noCacheFilter + *.txt + + + + viewFramingFilter + org.apache.catalina.filters.HttpHeaderSecurityFilter + + antiClickJackingOption + SAMEORIGIN + + + + hstsEnabled + false + + + blockContentTypeSniffingEnabled + false + + + + viewFramingFilter + /index.html + + loadAssets org.springframework.web.servlet.DispatcherServlet @@ -102,8 +130,7 @@ /extensions/* - - + CXFServlet org.apache.cxf.transport.servlet.CXFServlet @@ -124,6 +151,21 @@ HttpProxy /proxy/* + + + + mapfish.print + org.mapfish.print.servlet.MapPrinterServlet + + config + printing/config.yaml + + + + mapfish.print + /pdf/* + + index.html diff --git a/web/src/printing/applicationContext-print.xml b/web/src/printing/applicationContext-print.xml index 49ad39f..41ac6bd 100644 --- a/web/src/printing/applicationContext-print.xml +++ b/web/src/printing/applicationContext-print.xml @@ -18,6 +18,12 @@ + + + + + + @@ -86,4 +92,10 @@ + + + + + + diff --git a/webpack.config.js b/webpack.config.js index 47a757a..350cd65 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,28 +3,47 @@ const path = require("path"); const themeEntries = require('./MapStore2/build/themes.js').themeEntries; const extractThemesPlugin = require('./MapStore2/build/themes.js').extractThemesPlugin; const ModuleFederationPlugin = require('./MapStore2/build/moduleFederation').plugin; +const { devServer } = require('./MapStore2/build/devServer'); -module.exports = require('./MapStore2/build/buildConfig')( - { +module.exports = require('./MapStore2/build/buildConfig')({ + bundles: { 'MapStoreExtension': path.join(__dirname, "js", "app"), 'MapStoreExtension-embedded': path.join(__dirname, "MapStore2", "web", "client", "product", "embedded"), 'MapStoreExtension-api': path.join(__dirname, "MapStore2", "web", "client", "product", "api") }, themeEntries, - { + paths: { base: __dirname, dist: path.join(__dirname, "dist"), framework: path.join(__dirname, "MapStore2", "web", "client"), code: [path.join(__dirname, "js"), path.join(__dirname, "MapStore2", "web", "client")] }, - [extractThemesPlugin, ModuleFederationPlugin], - false, - "dist/", - '.MapStoreExtension', - [], - { + plugins: [extractThemesPlugin, ModuleFederationPlugin], + prod: false, + publicPath: "dist/", + cssPrefix: '.MapStoreExtension', + prodPlugins: [], + devServer: { + devMiddleware: { publicPath: '/dist/' }, + ...devServer, + // serve the project root as static content, excluding backend build + // and log files whose changes would trigger a full page reload + static: [{ + directory: __dirname, + watch: { + ignored: [ + '**/web/target/**', + '**/logs/**', + '**/*.log', + '**/node_modules/**', + '**/.git/**' + ] + } + }] + }, + alias: { "@mapstore/patcher": path.resolve(__dirname, "node_modules", "@mapstore", "patcher"), "@mapstore": path.resolve(__dirname, "MapStore2", "web", "client"), "@js": path.resolve(__dirname, "js") } -); +});