Jasper-report-maven-plugin icon indicating copy to clipboard operation
Jasper-report-maven-plugin copied to clipboard

Compiling reports that use Java Beans on the same project

Open mmonge opened this issue 5 years ago • 6 comments

Hello, my reports use Java Beans that are on the same project, when I compile them with this plugin it saids that can not find this classes.

For example, one of my reports receives a parameter of type me.monge.virtual.reportes.SvgLogoWrapper (a class created by me) but then trying to compile it with this plugin, it saids:

me.monge.virtual.reportes.SvgLogoWrapper cannot be resolved to a type

Is there any recommended configuration for this to work? Thank you in advance.

mmonge avatar Jan 19 '20 19:01 mmonge

any solution for this?

aLeXcBa1990 avatar Jun 19 '20 22:06 aLeXcBa1990

Interesting. I think, I had the same problem recently. Could not solve it, yet.

Archangel1C avatar Jun 19 '20 22:06 Archangel1C

I just solved this by adding the following

<configuration> <additionalClasspath>${project.baseUri}</additionalClasspath> <additionalClasspath>${project.basedir}</additionalClasspath> </configuration>

aLeXcBa1990 avatar Jun 19 '20 22:06 aLeXcBa1990

Now I have the following problem The constructor BigDecimal(BigDecimal) is undefined any ideas?

aLeXcBa1990 avatar Jun 19 '20 22:06 aLeXcBa1990

Maybe because BigInteger (unlike Integer or Double) is not in package java.lang, so you need to import it within the report?

Archangel1C avatar Jun 19 '20 23:06 Archangel1C

We seem to be encountering the same issue after changing the jasperreports-plugin from version 2.3 to a higher version (2.4 to 2.8 all result in the "cannot be resolved to a type" problem). Has anyone been able to find a solution? The additionalClasspath configuration property as proposed by @aLeXcBa1990 does not solve the problem on our end.

Viserius avatar Aug 08 '22 13:08 Viserius