We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this questionWhere 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.
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
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?
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
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>
精彩评论