28

Where can I find the Maven repositories for the latest versions of Jasper Reports? I've tried in the main site but it seems that the repo isn't up to date.

grteibo
  • 607
  • 3
  • 11
  • 20

4 Answers4

26

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

kenorb
  • 155,785
  • 88
  • 678
  • 743
jpaoletti
  • 855
  • 1
  • 13
  • 21
9

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?

Andreas Panagiotidis
  • 2,763
  • 35
  • 32
2

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

dunni
  • 43,386
  • 10
  • 104
  • 99
  • You have to be more specific. Also i recommend to post a new question with your problem. – dunni Jan 02 '13 at 08:02
1

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>

ganesh
  • 220
  • 3
  • 8
  • `net.sf.jasperreports/jasperreports/5.1.0` actually depends on `com.lowagie/itext/2.1.7.js2`. I checked the source code between version [2.1.7](https://search.maven.org/remotecontent?filepath=com/lowagie/itext/2.1.7/itext-2.1.7-sources.jar) and [2.1.7.js2](http://jasperreports.sourceforge.net/maven2/com/lowagie/itext/2.1.7.js2/itext-2.1.7.js2-sources.jar) and actually they are different! – VCD Aug 15 '17 at 01:17