I haven't used dynamic jasper reporting tool before. I am trying to use dynamic jasper with my springboot maven project. I took the maven dependency from the dynamic jasper official site.

http://dynamicjasper.com/download/

It doesn't work for some reason.

My pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.7.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.ca</groupId>
    <artifactId>mc</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>nic</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>


        <!-- DynamicJasper Dependency -->
        <dependency>
          <groupId>ar.com.fdvs</groupId>
          <artifactId>DynamicJasper</artifactId>
          <version>5.1.2</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

when i add this dependency for dynamicjasper i am getting bellow error.

Failed to read artifact descriptor for com.itextpdf:itext-pdfa:jar:5.5.0

Tried both jasper and dynamicjasper dependencies and both give me an error. even tried downloading somegithub examples and their also i get the same error. How do i use dyanmic jasper in my Springboot project.

1

There are 1 best solutions below

0
Petter Friberg On

Dynamic jasper have a range version dependency to jasper report, to not have maven select what jasper-reports version to use, I would include desired version of jasper-reports in pom.xml (eg. latest versions supported 6.4.1)

<dependency>
    <groupId>net.sf.jasperreports</groupId>
    <artifactId>jasperreports</artifactId>
    <version>6.4.1</version>
</dependency>

In this version there is no dependency to itext-pdfa:jar:5.5.0, that dependency is AFIK only present in version 6.0.x.

There is a back story related to the itext library, licenze issues etc. It was "open source" until version 2.1?, jasper-reports then maintained own version, got permission to use latest version (in version 6.0.x), permission was withdrawn? (I actually don't know exactly what happen, but I can immagine), in versions >6.1 jasper reports is using again it's own modified version 2.1.7.js6