Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup project #1

Closed
Postremus opened this issue Feb 20, 2023 · 8 comments · Fixed by #2
Closed

Setup project #1

Postremus opened this issue Feb 20, 2023 · 8 comments · Fixed by #2

Comments

@Postremus
Copy link
Contributor

Postremus commented Feb 20, 2023

Setup initial project structure and get an initial test running which prints a report (e.g. as pdf).

This is maybe the starting ground for how to set up the dependencies.

Later on also test interaction with quarkus-jaxb.

See also: https://github.com/quarkiverse/quarkiverse/wiki/Checklist#after-the-repository-is-created

 <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>${version.xerces}</version>
            <!-- Runtime so this dependency does not conflict with jaxb-maven-plugin. Dependency is only needed for the jasper print. -->
            <scope>runtime</scope>
            <exclusions>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
            <version>${version.xalan}</version>
            <!-- Runtime so this dependency does not conflict with jaxb-maven-plugin. Dependency is only needed for the jasper print. -->
            <scope>runtime</scope>
            <exclusions>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports</artifactId>
            <version>${version.jasperreports}</version>
        </dependency>
        <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports-functions</artifactId>
            <version>${version.jasperreports.functions}</version>
        </dependency>
        <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports-fonts</artifactId>
            <version>${version.jasperreports.fonts}</version>
        </dependency>
        <!-- Needed when printing barcodes with barbeque-api for e.g. labels -->
        <dependency>
            <groupId>net.sourceforge.barbecue</groupId>
            <scope>runtime</scope>
            <artifactId>barbecue</artifactId>
            <version>${version.barbecue}</version>
        </dependency>
        <!-- Needed when printing barcodes for barcode4j-api e.g. labels (QRCode)-->
        <dependency>
            <groupId>net.sf.barcode4j</groupId>
            <scope>runtime</scope>
            <artifactId>barcode4j</artifactId>
            <version>${version.barcode4j}</version>
            <exclusions>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.ant</groupId>
                    <artifactId>ant</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-cli</groupId>
                    <artifactId>commons-cli</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>avalon-framework</groupId>
                    <artifactId>avalon-framework</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.google.zxing</groupId>
            <scope>runtime</scope>
            <artifactId>core</artifactId>
            <version>${version.zxing}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.xmlgraphics</groupId>
            <scope>runtime</scope>
            <artifactId>batik-bridge</artifactId>
            <version>${version.batik-bridge}</version>
            <exclusions>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xml-apis-ext</groupId>
                    <artifactId>xml-apis-ext</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xalan</groupId>
                    <artifactId>xalan</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
@Postremus
Copy link
Contributor Author

jasperreports 6.20.0 seems way better behaved than 6.12:
image

@Postremus
Copy link
Contributor Author

xerces and xml-apis are removed since 6.10: TIBCOSoftware/jasperreports@6b206fd

xalan is replaced with jaxen since late last year. TIBCOSoftware/jasperreports#288

@azim92
Copy link

azim92 commented Apr 6, 2023

Hi, would like to know if this project targeting

jasperreports v6.20.0 - IText dependent

or

jasperreports v6.20.1 - Dropped IText, OpenPDF dependent

@melloware
Copy link
Contributor

melloware commented Apr 8, 2023

Also a heads up you might want to exclude iText from Jasper and use Quarkus iText: https://github.com/quarkiverse/quarkus-itext

I had to do this for the PrimeFaces extension.

@azim92 that is unfrotunate because the OpenPDF variant of iText is a lot harder to get working in native image. They should be swappable though so using Quarkus iText and excluding Open PDF should work.

@Postremus
Copy link
Contributor Author

@azim92 6.20.1

@Postremus
Copy link
Contributor Author

@melloware Sadly we can not use quarkiverse-itext here.
Jasper 6.20.1 uses an fork of openpdf - TIBCOSoftware/jasperreports#339 (comment).

Regarding barcode4j, yep, that is my plan.

@melloware
Copy link
Contributor

melloware commented Apr 12, 2023

OK ouch OpenPDF has been a huge Pain to get working in Native Image.

See: LibrePDF/OpenPDF#878

See: quarkusio/quarkus#31224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants