Skip to content

quarkiverse/quarkus-jasperreports

Repository files navigation

Quarkus JasperReports


Version License Build

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.

Getting started

Read the full JasperReports documentation.

Installation

Create a new JasperReports project (with a base jasperreports starter code):

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>

Docker

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!

🧑‍💻 Contributing

  • 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

If you have any ideas or questions 🤷

Contributors ✨

Thanks go to these wonderful people (emoji key):

Melloware
Melloware

💻 🚧
Martin Panzer
Martin Panzer

💻 🚧
Kauan Mocelin
Kauan Mocelin

🐛
Nathan Erwin
Nathan Erwin

📖 💻
George Gastaldi
George Gastaldi

🤔 🚇
Leonardo Bernardes
Leonardo Bernardes

⚠️ 🐛
David M. Lloyd
David M. Lloyd

💬
joggl71xpt
joggl71xpt

🐛 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!