Jasper Reports 的 Maven 存储库是什么?

发布于 2024-11-09 03:48:48 字数 1539 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

揽月 2024-11-16 03:48:49

在 Maven 中心,最新版本是 4.0.1:
http://repo2.maven.org/maven2/net/sf/jasperreports/ jasperreports/

注意 groupid net.sf.jasperreports

In Maven central the latest version is 4.0.1:
http://repo2.maven.org/maven2/net/sf/jasperreports/jasperreports/

Note the groupid net.sf.jasperreports

彻夜缠绵 2024-11-16 03:48:49

在 v5.1.0 中遇到了同样的问题,并使用以下命令使其正常工作:

    <dependency> <!-- needed by jasperreports to build-->
            <groupId>com.lowagie</groupId>
            <artifactId>itext</artifactId>
            <version>2.1.7</version>
    </dependency>

    <dependency> <!-- refered from http://mojo.codehaus.org/jasperreports-maven-plugin/usage.html -->
        <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports</artifactId>
            <version>5.1.0</version>
        </dependency>


<plugins>
...
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>jasperreports-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>compile-reports</goal>
      </goals>
    </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>
  </dependencies>
</plugin>

Faced same issue with v5.1.0 and got it working using:

    <dependency> <!-- needed by jasperreports to build-->
            <groupId>com.lowagie</groupId>
            <artifactId>itext</artifactId>
            <version>2.1.7</version>
    </dependency>

    <dependency> <!-- refered from http://mojo.codehaus.org/jasperreports-maven-plugin/usage.html -->
        <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports</artifactId>
            <version>5.1.0</version>
        </dependency>


<plugins>
...
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>jasperreports-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>compile-reports</goal>
      </goals>
    </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>
  </dependencies>
</plugin>

小清晰的声音 2024-11-16 03:48:48

这是最新版本:

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

还有一个非常好的插件可以自动将 jrxml 文件编译为 jasper。只需将以下内容放入 src/main/jasperreports

<project>

<properties>
    <jasperReport.version>5.2.0</jasperReport.version>
</properties>

  ...
  <dependencies>
    <dependency>
      <groupId>net.sf.jasperreports</groupId>
      <artifactId>jasperreports</artifactId>
      <version>${jasperReport.version}</version>
    </dependency>
  </dependencies>
  <build>
  ...
  <plugins>
    ...
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>jasperreports-maven-plugin</artifactId>
      <executions>
        <execution>
          <goals>
            <goal>compile-reports</goal>
          </goals>
        </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>${jasperReport.version}</version>
        </dependency>
      </dependencies>
    </plugin>
   </plugins>
 </build>
</project>

源中的 pom 和 jrxml 文件中: http://www.mojohaus.org/jasperreports-maven-plugin/usage.html

This is the latest version:

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

There is also a pretty nice plugin to compile jrxml files to jasper automatically. Just put the following in your pom and your jrxml files in src/main/jasperreports

<project>

<properties>
    <jasperReport.version>5.2.0</jasperReport.version>
</properties>

  ...
  <dependencies>
    <dependency>
      <groupId>net.sf.jasperreports</groupId>
      <artifactId>jasperreports</artifactId>
      <version>${jasperReport.version}</version>
    </dependency>
  </dependencies>
  <build>
  ...
  <plugins>
    ...
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>jasperreports-maven-plugin</artifactId>
      <executions>
        <execution>
          <goals>
            <goal>compile-reports</goal>
          </goals>
        </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>${jasperReport.version}</version>
        </dependency>
      </dependencies>
    </plugin>
   </plugins>
 </build>
</project>

Source: http://www.mojohaus.org/jasperreports-maven-plugin/usage.html

南风起 2024-11-16 03:48:48

您可以在以下存储库中找到这些工件:

http://repository.jboss.org/nexus/content/groups/public-jboss/net/sf/jasperreports/jasperreports/

http://mirrors.ibiblio.org/maven2/net/sf/jasperreports/jasperreports/

http://repo1.maven.org/maven2/net/sf/jasperreports/jasperreports/

当然其他存储库也包含这些工件。

顺便说一句,如果您使用 jasper reports

<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.2.0</version>

并且您在代理后面或在商业环境中使用 Maven Enterprise Repository,它会给您带来一些麻烦,因为它定义了自己的存储库列表,这几乎是不行的。我引用pom的代码:

<repositories>
    <repository>
        <id>jasperreports</id>
        <url>http://jasperreports.sourceforge.net/maven2</url>
    </repository>
    <repository>
        <id>jaspersoft-third-party</id>
        <url>http://jaspersoft.artifactoryonline.com/jaspersoft/third-party-ce-artifacts/</url>
    </repository>
</repositories>

您的maven客户端将尝试直接访问这些存储库。
为了避免这个问题,请查看此票证 如何配置 Maven 来忽略 POM 文件中指定的存储库?

You find the artifacts in the following repositories:

http://repository.jboss.org/nexus/content/groups/public-jboss/net/sf/jasperreports/jasperreports/

http://mirrors.ibiblio.org/maven2/net/sf/jasperreports/jasperreports/

http://repo1.maven.org/maven2/net/sf/jasperreports/jasperreports/

Surely other repositories contain those artifacts too.

By the way, if you use the jasper reports

<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.2.0</version>

and you are behind a proxy or use in a commercial environment a Maven Enterprise Repository it will give you some troubles, as it defines its own list of repositories, which is almost a no-go. I quote the code of the pom:

<repositories>
    <repository>
        <id>jasperreports</id>
        <url>http://jasperreports.sourceforge.net/maven2</url>
    </repository>
    <repository>
        <id>jaspersoft-third-party</id>
        <url>http://jaspersoft.artifactoryonline.com/jaspersoft/third-party-ce-artifacts/</url>
    </repository>
</repositories>

Your maven client will try to access those repositories directly.
To avoid this matter have a look at this ticket How do you configure maven to ignore repositories specified in POM files?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文