What are the Maven repositories for Jasper Reports?

grteibo picture grteibo · May 24, 2011 · Viewed 44.1k times · Source

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.

Answer

jpaoletti picture jpaoletti · Nov 9, 2011

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