Closed alexnederlof closed 8 years ago
This workaround that involves changing the JDT version seems to solve this problem: http://community.jaspersoft.com/jasperreports-server/issues/3498 (comments 7 & 8).
This workaround didn't work for me
I worked this around by adding this dependency to the plugin execution:
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.1.0</version>
</dependency>
and thus replacing the 5.2.0
version specified in plugin's pom.xml
.
So now my plugin configuration looks like this:
<plugin>
<groupId>com.alexnederlof</groupId>
<artifactId>jasperreports-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>jasper</goal>
</goals>
</execution>
</executions>
<configuration>
<compiler>net.sf.jasperreports.engine.design.JRJdtCompiler</compiler>
<sourceDirectory>src/main/resources/reports</sourceDirectory>
<outputDirectory>${project.build.directory}/classes/reports</outputDirectory>
<outputFileExt>.jasper</outputFileExt>
<xmlValidation>true</xmlValidation>
<verbose>true</verbose>
<numberOfThreads>2</numberOfThreads>
</configuration>
<dependencies>
<!--
- Workaround for Java 8 incompatibility bug:
- https://github.com/alexnederlof/Jasper-report-maven-plugin/issues/12
-->
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.1.0</version>
</dependency>
<!-- other project dependencies ->
</dependencies>
</plugin>
I guess the solution would be then to upgrade net.sf.jasperreports:jasperreports
dependency to something from the 6.x.x
tree.
Works for me too with the workaround by mkielar
2.0 works for me to in java-8
Hi I solved that by this config : jasper
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>5.5.1</version>
<exclusions>
<exclusion>
<groupId>eclipse</groupId>
<artifactId>jdtcore</artifactId>
</exclusion>
</exclusions>
</dependency>
Cannot compile on Java 8 because of
ClassFormatException