i have a question, maybe you guys can help me with that.
How it is: for our customers we deploy updates via the .war, which we just copy into the tomcat. (We created a little c# service which does that automaticly when we release a update)
If we have new reports or report-updates (jasper & velocity) we replace them in c:\servoy-programm\reports\ for example.
Now my idea, cant we deliver the reports IN/THROUGH the .war? Because in the servoy-admin under plugin-setting we can set the jasper-path like /lib/reports…
If yes, how do we put the reports in the .war? Just open the .war with winRar and place them there?
There must be a better/right way to do this.
Maybe place the reports in some specific .metadata folder of the workspace, or create the .war over the commandline but with a extra parameter “take these files XXX in the .war too”.
I hope my question is understandable and u guys have ideas for it
Yes you can do this, but this won’t really work in a cluster of application servers.
In that case you will probably also need some shared storage.
A solution that is more solid is this:
store reports in a reports folder in the media library.
use a post-import solution to trigger a function that will write out the reports folder to the default servoy upload location (which can be set to any shared storage location)
point the jasper/velocity folder to the correct location (being reports folder inside the default servoy upload location
problem solved.
BTW, for smaller projects I take the approach of customising the WAR file through a shell script, this has been working fine for a long time but has its limitations on larger deployments.
thanks for the info!
I didnt even think about the media → post import hook methode. I´ll look into it.
For the part with smaller projects and customizing the war through shell. That sounds exactly what i am looking for.
Can you share your shell-script with me? So i have a approach on how to do it?
Input/output is based on the name, so ‘build_vik_test.sh’ will result in customizing the exported vik.war file with the content of the ‘test’ folder and an output file named ROOT_vik_test.war
The folder structure looks like this (where ‘custom’ is basically pointing to the ROOT of the war file):
[attachment=0]build.png[/attachment]