quarkiverse / quarkus-jasperreports

Print reports created using JasperReports using the Java API
https://community.jaspersoft.com/project/jasperreports-library
Apache License 2.0
8 stars 1 forks source link

Add support loading compiled jasper reports and corresponding resourcefiles from "external" directory #167

Closed joggl71xpt closed 1 week ago

joggl71xpt commented 1 week ago

The current solution of v1.0.2 works fine if you put all your jrxml files + resources (like translation files) inside the generated jar file.

But this means, you need to build always a new version, if you want to make some changes in some templates.

Better solution would be, to have the possibility to define some "external" folder, which can be mapped via docker volumes. jasperreport will than "load" all stuff from this external folder. In my opinion it is even fine, to have in this external folder only pre compiled *.jasper files. (compiling of jrxml files will anyway not work in an native environment because of missing javacompiler).

The problem what I see at the moment, how can the classloader load these external resources? So is there a possibility to solve this ?

melloware commented 1 week ago

I assume this property doesn't work because its Build Time not run time: https://docs.quarkiverse.io/quarkus-jasperreports/dev/index.html#quarkus-jasperreports_quarkus-jasperreports-build-source

you should be able to point that at any folder?

joggl71xpt commented 1 week ago

probably not, because this folder is only visible "inside" of the jar file, or ? we need an folder, which is part of the surrounding "docker container" ?!

melloware commented 1 week ago

Ahhh i see so if you had quarkus.jasperreports.build.source=/home/etc/yourdir it is assuming that is a SubDir of the project.

melloware commented 1 week ago

we might be able to fix that

melloware commented 1 week ago

@all-contributors add @joggl71xpt for bug,test

allcontributors[bot] commented 1 week ago

@melloware

I've put up a pull request to add @joggl71xpt! :tada:

melloware commented 1 week ago

@joggl71xpt 1.0.3 is deployed can you try it? It should fix this issue and adds JasperFunctions to the pom.xml