we are currently using the JasperReports library in our inhouse management software (Java / ZK web app) to generate PDF reports. For the next iteration of our project we are considering switching to JasperServer for Docker as the rest of our components are being containerised as well. But so far I do not see how we could use JasperServer while still keeping all of our reporting assets (report definitions, datasource definitions, file resources) under version control and deploying new releases automatically to different environments (DEV, TST, PRD).
Our current approach bundles all report resources into a jar file at build time which is deployed with the web application. With the JasperServer approach I would have to install (manually through the server web interface) new or updated resources in all of our environments which is a nightmare to keep synchronised. I am looking for an approach that would allow me to include my bundled (jar or zip) report resources in the Docker image build (that's the easy part) and update all JasperServer report resources from this bundle on container start-up or deployment. I am sure I am not alone with this requirement, any suggestions?
Senior Software Architect
Ville de Luxembourg
There are 2 options available:
1. Use JasperReports Server REST API to upload resources to the server. You'll need to write a program to upload the files.
2. Use import/export command. This may be easier.
Regarding option 2:
Wouldn't I need to first import my resources by hand into one instance of JasperServer to be able to export it as a repository using the cmd line tools? This export file could then be automatically loaded into TST, PRD, DEV environments. Documentation states that import "Reads a repository catalog from your file system and creates the resources in the JasperReports Server repository. The repository catalog must be one created by the export interface or the js-export command, either as a ZIP archive file or a folder structure." This would add a layer of manual intervention to deployment that would be unacceptable for us (though the export tool might be useful for automatic backups).