[ 
https://jira.codehaus.org/browse/MOJO-809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294597#comment-294597
 ] 

De Moor Yves commented on MOJO-809:
-----------------------------------

Thanks David.

I am running against another problem introduced by compiler-toolchains.patch

This modification is now the source of my problems :

@@ -130,7 +146,7 @@
      * Uses the Javac compiler by default. This is different from the original 
JasperReports ant
      * task, which uses the JDT compiler by default.
      * 
-     * @parameter 
default-value="net.sf.jasperreports.engine.design.JRJavacCompiler"
+     * @parameter 
default-value="org.codehaus.mojo.jasperreports.MavenJavacCompiler"
      */
     private String compiler;

It seems that the compiler is stored in the compiled .jasper file. 
(http://jasperreports.sourceforge.net/api/index.html?net/sf/jasperreports/engine/util/JRProperties.html)
When trying to use the .jasper file, to generate a report it produced a 
ClassNotFoundException: org.codehaus.mojo.jasperreports.MavenJavacCompiler

at 
net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:462)
at 
net.sf.jasperreports.engine.JasperCompileManager.loadEvaluator(JasperCompileManager.java:235)
at 
net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:428)
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:363)
at 
net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77)
at 
net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:87)
at 
net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:57)
at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:142)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:78)
...
Caused by: java.lang.ClassNotFoundException: 
org.codehaus.mojo.jasperreports.MavenJavacCompiler
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at 
net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:457)
... 39 more

I could add in project dependency the plugin, but is for me a strange concept 
to package a maven plugin in my application to call some classes at runtime ... 
What do you think about this ?

Another point is I found some code in MavenJavacCompiler.java which I don't 
think is 100% safe, like splitting the classpath on "," instead of 
File.pathSeparator 
https://fisheye.codehaus.org/browse/mojo/trunk/mojo/jasperreports-maven-plugin/src/main/java/org/codehaus/mojo/jasperreports/MavenJavacCompiler.java?r=16122#to94
                
> Added support for selecting target version of the generated class files to 
> jasperreports-maven-plugin
> -----------------------------------------------------------------------------------------------------
>
>                 Key: MOJO-809
>                 URL: https://jira.codehaus.org/browse/MOJO-809
>             Project: Mojo
>          Issue Type: Improvement
>          Components: jasperreports
>            Reporter: Roland Klein
>            Assignee: David J. M. Karlsen
>            Priority: Minor
>         Attachments: compiler-toolchains.patch, MOJO-809-patch.txt, 
> patch.dif, patch.diff, patch.diff, patch.diff
>
>
> Attached patch for rev.4230
> + JRPluginCompiler.java
> * pom.xml
> * JasperReportsMojo.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to