A Quarkus extension that lets you utilize JasperReports. JasperReports is an open source Java reporting tool that can write to a variety of targets, such as: screen, a printer, into PDF, HTML, Microsoft Office (XSLX, PPTX, DOCX), RTF, ODT, CSV, or XML files.
Note
The main purpose of this extension is to make JasperReports work in a native executable built with GraalVM/Mandrel.
Read the full JasperReports documentation.
Create a new JasperReports project (with a base jasperreports starter code):
- With code.quarkus.io
- With the Quarkus CLI:
quarkus create app jasperreports-app -x=io.quarkiverse.jasperreports:quarkus-jasperreports
Or add to your pom.xml directly:
<dependency>
<groupId>io.quarkiverse.jasperreports</groupId>
<artifactId>quarkus-jasperreports</artifactId>
<version>{project-version}</version>
</dependency>
When building native images in Docker using the standard Quarkus Docker configuration files some additional features need to be installed to support fonts. Specifically font information is not included in Red Hat's ubi-minimal images. To install it
simply add these lines to your DockerFile.native
file:
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10
######################### Set up environment for POI #############################
RUN microdnf update && microdnf install freetype fontconfig && microdnf clean all
######################### Set up environment for POI #############################
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
# Shared objects to be dynamically loaded at runtime as needed,
COPY --chown=1001:root target/*.properties target/*.so /work/
COPY --chown=1001:root target/*-runner /work/application
# Permissions fix for Windows
RUN chmod "ugo+x" /work/application
EXPOSE 8080
USER 1001
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
Caution
Make sure .dockerignore
does not exclude .so
files!
- Contribution is the best way to support and get involved in the community!
- Please, consult our Code of Conduct policies for interacting in our community.
- Contributions to
quarkus-jasperreports
- please check our CONTRIBUTING.md
Thanks go to these wonderful people (emoji key):
Melloware 💻 🚧 |
Martin Panzer 💻 🚧 |
Kauan Mocelin 🐛 |
Nathan Erwin 📖 💻 |
George Gastaldi 🤔 🚇 |
Leonardo Bernardes |
David M. Lloyd 💬 |
This project follows the all-contributors specification. Contributions of any kind welcome!