Hope it is ok to comment here - I have a problem which I think relates to this issue -
On my windows laptop the jasperreports-maven-plugin compiles my report
On a linux server, it does not, and the error message is not very helpful (see end). I am using the same java version, and everything else should be identical as I am using maven.
I have compiled the report in the same environment on the linux server using ant with no problems.
I also can't look at the java file that it complains about as this gets deleted.
Can this issue be resolved and released into an new version, or can you suggest another way to debug the problem?
Thanks,
Tamsin
Error:
[INFO] : org.codehaus.mojo.jasperreports.JasperReportsMojo@2a987d
Error compiling report design : /home/tamsin/officedb/purchasing/src/main/jasperreports/purchasingPO.jrxml
Error compiling report design : /home/tamsin/officedb/purchasing/src/main/jasperreports/purchasingPO.jrxml : Error compiling report java source files : /home/tamsin/officedb/purchasing/target/jasperreports/java/purchasingPO_1264503644426_724294.java
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Error compiling report design : /home/tamsin/officedb/purchasing/src/main/jasperreports/purchasingPO.jrxml
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:580)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:301)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoFailureException: Error compiling report design : /home/tamsin/officedb/purchasing/src/main/jasperreports/purchasingPO.jrxml
at org.codehaus.mojo.jasperreports.JasperReportsMojo.compile(JasperReportsMojo.java:253)
at org.codehaus.mojo.jasperreports.JasperReportsMojo.execute(JasperReportsMojo.java:187)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
... 16 more
The Exception wrapping occurs on line 253 and 258. I think just passing the exception instead of the long message would fix the problem:
throw new MojoFailureException( "Error compiling report design : " + src, e);
I would create a patch, but netbeans is making a mess of it (or I am, which is practically the same).