Error Compiling JasperReports Report with Maven

Was configuring a new server for our application. Checked out sources from SVN and started compiling them with Maven. One of the pom.xml files contains instructions which precompile report JRXML files into JASPER files by the means of jasperreports-maven-plugin plugin.

Error Compiling JasperReports Report with Maven

I was greatly confused when saw something like this:

Error compiling report design : /home/andy/Sources/trunk/service/src/main/resources/com/softteco/jasperreports/data.jrxml : Error compiling report java source files : /home/andy/Sources/trunk/service/target/jasperreports/java/TableOfContentsReport_1296471173962_463866.java

Hm, lets try running maven with “-X -e” options to see more details.

org.apache.maven.BuildFailureException: Error compiling report design : //home/andy/Sources/trunk/service/src/main/resources/com/softteco/jasperreports/data.jrxml
…..
Caused by: org.apache.maven.plugin.MojoFailureException: Error compiling report design : /home/andy/Sources/trunk/service/src/main/resources/com/softteco/jasperreports/data.jrxml
at org.codehaus.mojo.jasperreports.JasperReportsMojo.compile(JasperReportsMojo.java:253)

No more additional information. Thanks God it’s open source. Debugging plugin has shown that the problem occurs because javac executable is not found. So the problem has been solved quite trivially: just add path for JAVA_HOME into PATH variable.

Want to stay updated on the latest tech news?

Sign up for our monthly blog newsletter in the form below.

Softteco Logo Footer