jasperreport 5.0.1需要添加哪些依赖?

2023-11-26

I 升级jasper报告版本 from 4.5.0 至 5.1.0。当我安装插件时,它会抛出错误,例如缺少某些依赖项。我想使用 Maven 配置 JasperReports 5.1.0。

Execution default of goal org.codehaus.mojo:jasperreports-maven-plugin:1.0-beta-2:compile-reports failed: Plugin org.codehaus.mojo:jasperreports-maven-plugin:1.0-beta-2 or one of its dependencies could not be resolved: Failure to find com.lowagie:itext:jar:2.1.7.js2

我有两个疑问。

1)我想知道所有的依赖是什么我有添加到pom中使用 jasper 报告 5.1.0。

2)我正在使用下面的插件将我的 jrxml 文件编译为 jasper 文件。我在这个插件中看到了这个问题。这个插件可能有什么问题。我应该添加任何镜子吗?

<groupId>org.codehaus.mojo</groupId>
<artifactId>jasperreports-maven-plugin</artifactId>
<version>1.0-beta-2</version>

我的完整 pom 是,除了 jasper 报告之外,可能还有额外的依赖项,我将其用于我的内部目的。

<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.test.plugins</groupId>
  <artifactId>report-test-plugin</artifactId>
  <version>2.2.1.1001-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>report-test-plugin</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>2.0.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-project</artifactId>
            <version>2.0.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>${maven-artifact.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact-manager</artifactId>
            <version>${maven-artifact-manager.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>${maven-model.version}</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>${plexus-utils.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-provider-api</artifactId>
            <version>${wagon-provider-api.version}</version>
        </dependency>

        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>${dom4j.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-plugin-testing-harness</artifactId>
            <version>1.0-beta-1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>jmock</groupId>
            <artifactId>jmock</artifactId>
            <version>${jmock.version}</version>
            <scope>test</scope>
        </dependency>


        <dependency>
            <groupId>commons-configuration</groupId>
            <artifactId>commons-configuration</artifactId>
            <version>${commons-configuration.version}</version>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.1</version>
        </dependency>

        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>${json.version}</version>
        </dependency>

        <!--  itext -->
        <dependency>
            <groupId>com.itextpdf</groupId>
            <artifactId>itextpdf</artifactId>
            <version>5.1.2</version>
        </dependency>

        <dependency>
            <groupId>com.itextpdf</groupId>
            <artifactId>itext-xtra</artifactId>
            <version>5.1.2</version>
        </dependency>

        <dependency>
            <groupId>com.itextpdf.tool</groupId>
            <artifactId>xmlworker</artifactId>
            <version>1.1.0</version>
        </dependency>

        <dependency>
            <groupId>org.xhtmlrenderer</groupId>
            <artifactId>core-renderer</artifactId>
            <version>R8</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml</groupId>
            <artifactId>classmate</artifactId>
            <version>0.5.4</version>
        </dependency>

        <dependency>
            <groupId>net.sourceforge.htmlcleaner</groupId>
            <artifactId>htmlcleaner</artifactId>
            <version>2.2</version>
        </dependency>

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

        <dependency>
            <groupId>com.lowagie</groupId>
            <artifactId>itext</artifactId>
            <version>2.1.7</version>
        </dependency>


        <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jasperreports-maven-plugin</artifactId>
            <version>1.0-beta-2</version>
            <exclusions>
                 <exclusion>
                    <artifactId>plexus-container-default</artifactId>
                    <groupId>org.codehaus.plexus</groupId>
                </exclusion>
                <exclusion>
                    <groupId>jasperreports</groupId>
                    <artifactId>jasperreports</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.9</version>
        </dependency>

  </dependencies>

     <build>
        <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <version>3.1</version>
              <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <source>1.6</source>
                            <target>1.6</target>
                        </configuration>
                    </execution>
                   </executions>
        </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jasperreports-maven-plugin</artifactId>
                <version>1.0-beta-2</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <inherited>false</inherited>
                        <goals>
                            <goal>compile-reports</goal>
                        </goals>
                        <configuration>
<!--                             define where is your jrxml file -->
                            <sourceDirectory>src\\main\\resources</sourceDirectory>
                            <sourceFileExt>.jrxml</sourceFileExt>
                            <compiler>net.sf.jasperreports.engine.design.JRJavacCompiler</compiler>
<!--                             define where is the jasper file will be generated -->
                            <outputDirectory>src\\main\\resources</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
<!--                     Note this must be repeated here to pick up correct xml validation -->

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

                    <dependency>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                        <version>1.2.16</version>
                    </dependency>

                </dependencies>
            </plugin>

        </plugins>
    </build>

</project>

对于在使用 JasperReports 5.x maven 依赖项时遇到类似问题的任何人:

贾斯珀兄弟经营一家公共 Maven 存储库他们发布对其第三方依赖项的错误修复。这些固定版本并不总是出现在公共 Maven 存储库中。因此,当您遇到依赖项问题时,请尝试添加存储库http://jasperreports.sourceforge.net/maven2.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

jasperreport 5.0.1需要添加哪些依赖? 的相关文章

随机推荐

  • Java 中缺少语言环境? [复制]

    这个问题在这里已经有答案了 我在 java 语言环境中发现了许多缺失的国家 地区 如果我打印出可用语言环境的列表 TreeSet lt String gt m new TreeSet lt String gt for Locale l Lo
  • Console.Write 在 Windows 窗体应用程序中不起作用

    我在 Visual Studio 2008 中创建了一个 VB NET Windows 窗体应用程序 当我从命令行运行程序时 我没有得到任何输出 只有下一个提示 我究竟做错了什么 Private Sub Form1 Load ByVal s
  • Asp.Net 身份和多租户上的重复角色名称

    我正在使用 ASP Net MVC 和 Identity 2 0 开发多租户 Web 应用程序 我已经像这样扩展了 IdentityRole public class ApplicationRole IdentityRole public
  • 在本机反应中单击按钮时显示加载程序

    我正在尝试在我的反应本机应用程序中实现加载器动画 但单击按钮时它不会触发加载器 尽管动画已经更改为true 看看我下面的代码 componentWillMount this hideLoader showLoader gt this set
  • where-object $_ 匹配多个条件

    data where object Name eq serverName domain com select object Property Description1 Version where object Description1 ma
  • 概念可以与模板模板参数一起使用吗?

    让我们考虑以下代码 include
  • 找不到参数的方法 jackOptions()

    大家好 我面临着 在 DefaultConfig Decolated name main Dimension null minSdkVersion DefaultApiVersion mApiLevel 16 mCodename null
  • 将动态键:值对传递给对象文字? [复制]

    这个问题在这里已经有答案了 我正在使用这段代码 如下所示 来尝试填充名为的对象文字Parameters在 for 循环内 我需要key value与循环迭代一起分配的对i变量 例如 key 1 chunks 1 key 2 chunks 2
  • 动态添加属性到动态对象?

    我有这个 dynamic d new ExpandoObject d Name attribute QualifiedName Name 所以 我知道 d 将有一个属性名称 现在 如果我在编译时不知道属性的名称 如何将该属性添加到动态中 我
  • 如何通过 Telegram Bot 发送文件

    我需要使用 TelegramBot API 发送 txt 文件 我已经尝试过了 并有问题 ok false error code 400 description 错误请求 错误的远程 指定的文件 ID 字符串长度错误 为了完成唐尼的回答 我
  • 查询中的问号运算符

    在我的 laravel 5 应用程序中 我使用 PostgreSQL 的 jsonb 数据类型 它有 操作员 但我无法让它在我的模型中工作 因为 laravel 使用问号作为绑定 具体来说 在 whereRaw 方法中 query gt w
  • Idea 中不显示字体

    更新 jrk7 openjdk 和 jre7 openjdk 字体后 Idea 中不显示字体 重新安装软件包 openjdk 和 idea 没有帮助 名称 a Linux ftp27host 3 14 6 1 ARCH 1 SMP PREE
  • 使用 pip 安装 uwsgi 时出现“ascii”编解码器无法解码错误

    我正在按照本教程设置 uwsgi https uwsgi readthedocs org en latest tutorials Django and nginx html I run pip install uwsgi在virtualen
  • Visual Studio - 用资源替换硬编码字符串的工具

    我有一个大型 ASP NET 项目 其中充满了硬编码字符串 现在必须将其提取到资源中 此类字符串几乎可以在任何地方找到 cs 文件 aspx 文件 ascx 文件等 并且文件数量巨大 我正在寻找一种工具 或任何方式 来一次找到所有这些硬编码
  • 从内存流读取存储的 PDF

    我正在使用 C 和 SQLServer 2012 开发一个数据库项目 在我的一个表单中 我有一个 PDF 文件 其中包含存储在表中的一些其他信息 这是成功的 但是当我想检索存储的信息时 我在显示 PDF 文件时遇到问题 因为我无法显示它 而
  • 具有多个数据库/DbContext 的 EF Code First 迁移

    我有两个数据库 每个数据库都有自己的 dbcontext 我设置了两个迁移配置 我可以为第一个数据库添加迁移 这很好 Add Migration DB1 InitialCreate ConfigurationTypeName DB1Conf
  • 使用 Jenkins Job-DSL 配置块将自定义步骤放置在特定位置

    我正在尝试使用 job dsl plugin 编写之前手动配置的大量 Jenkins 作业的配置脚本 这些作业的一种风格有多个步骤 其中包括使用 XShell 插件的几个步骤 job dsl 不直接支持这一点 不过 我应该能够通过使用自定义
  • 编写一个识别声音并执行操作的程序

    我想编写一个能够存储声音模式的程序 例如火车汽笛 喇叭 嘟嘟声 通过麦克风收听声音 然后在听到声音时采取一些行动 我懂一点Python 很早以前就用VB 编程过 我主要是一个 Oracle PLSQL 人员 该程序需要一个适度的用户界面 解
  • 消息通道是一个还是多个?

    我需要处理来自大约 30 个地址的电子邮件 我以一种将所有电子邮件发送到一个的方式来实现这一点DirectChannel之后到Receiver In Receiver我可以了解消息来自哪个地址 为此我创建了CustomMessageSour
  • jasperreport 5.0.1需要添加哪些依赖?

    I 升级jasper报告版本 from 4 5 0 至 5 1 0 当我安装插件时 它会抛出错误 例如缺少某些依赖项 我想使用 Maven 配置 JasperReports 5 1 0 Execution default of goal o