You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot customize print configuration in a Mapstore project #11612
I created a Mapstore project with the project generator script (using Mapstore as a submodule). When I try to customize the path to the print configuration using the option -Dmapfish-print-config=/path/to/config.yaml
npm run be:start -- -Dmapfish-print-config="path/to/print/config.yaml"
The option is ignored and the default path is used instead.
How to reproduce
Create a Mapstore project with the generator
Create a custom config.yaml file
Pass the path to this custom config file to the npm run be:start command:
npm run be:start -- -Dmapfish-print-config="path/to/print/config.yaml"
Expected Result
The custom configuration file is used by the print module.
Current Result
The default configuration file is used by the print module.
The command referred is intended to be lunched in production envrionment, not in development mode. So it can not be used in npm run:be -- -D... (and the documentation do not mention this command in fact). In dev mode the finding of @Binabh is correct, but most of the times, you don't need to configure this. This is the case you have to load the config at runtime.
The documentation mentions that MapStore by default gets it from the /printing folder in the root of the generated project.
If you have a custom project, most of the time you want simply to configure one printing config for the project, that is used all of the times, and deployed with the application itself.
One way to do that is to change your web/pom.xml this way:
and include your customizations in a /printing directory in your project.
We can so improve the doc to include this solution, that has not been explicitely mentioned in the doc, I see it is too implicit.
We can also find alternative strategies for making this easier in the future.
Activity
tdipisa commentedon Jul 20, 2026
@Binabh Can you please double check? Are you able to reproduce this?
Binabh commentedon Jul 24, 2026
This issue exists and I was able to reproduce this.
The docs here mentions about
but it does not work like that. I confirmed with
Here layouts mentioned in my custom configs are not showing. Default is being used instead.
But when passed like
npm run be:start -- \ -Dbackend.debug.args="-Dmapfish-print-config=/etc/mapstore/datadir/printing/config.yaml"It works. Again confirmed with
Here layouts mentioned in custom configs showed up.
So, the problem seems like the args are not correctly forwarded by cargo.
I see two ways to solve this:
-Dbackend.debug.args=Which path should we go @tdipisa @offtherailz ?
offtherailz commentedon Jul 24, 2026
The command referred is intended to be lunched in production envrionment, not in development mode. So it can not be used in
npm run:be -- -D...(and the documentation do not mention this command in fact). In dev mode the finding of @Binabh is correct, but most of the times, you don't need to configure this. This is the case you have to load the config at runtime.The documentation mentions that MapStore by default gets it from the
/printingfolder in the root of the generated project.If you have a custom project, most of the time you want simply to configure one printing config for the project, that is used all of the times, and deployed with the application itself.
One way to do that is to change your
web/pom.xmlthis way:<resources> <resource> - <directory>${basedir}/../MapStore2/java/printing/resources/geoserver/print</directory> + <directory>${basedir}/printing</directory> <includes><include>*</include></includes> </resource> </resources>and include your customizations in a
/printingdirectory in your project.We can so improve the doc to include this solution, that has not been explicitely mentioned in the doc, I see it is too implicit.
We can also find alternative strategies for making this easier in the future.