Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Problem compiling Jasper with Lambda #62

Open
andyrozman opened this issue Feb 22, 2020 · 1 comment
Open

Problem compiling Jasper with Lambda #62

andyrozman opened this issue Feb 22, 2020 · 1 comment

Comments

@andyrozman
Copy link

Hi !
I have problem compiling jasper files that contain lambda... I use 2.6 version of plugin, I excluded your jasperreports dependencies, I added dependency to latest 6.11.0.

I also added this as additional properties:

1.8 1.8 1.8

But it seems to be ignored... I was able to compile the same files in my Java class without any problems...

@andyrozman
Copy link
Author

andyrozman commented Feb 22, 2020

OK found solution:

     <plugin>
            <groupId>com.alexnederlof</groupId>
            <artifactId>jasperreports-plugin</artifactId>
            <version>2.3</version>
            <executions>
                <execution>
                    <phase>process-sources</phase>
                    <goals>
                        <goal>jasper</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <!-- These are the default configurations: -->
                <compiler>net.sf.jasperreports.engine.design.JRJdtCompiler</compiler>
                <sourceDirectory>src/main/resources/invoice/</sourceDirectory>
                <outputDirectory>${project.build.directory}/jasper</outputDirectory>
                <outputFileExt>.jasper</outputFileExt>
                <xmlValidation>true</xmlValidation>
                <verbose>false</verbose>
                <numberOfThreads>4</numberOfThreads>
                <failOnMissingSourceDirectory>true</failOnMissingSourceDirectory>
               <sourceScanner>org.codehaus.plexus.compiler.util.scan.StaleSourceScanner</sourceScanner>

                <additionalProperties>
                    <org.eclipse.jdt.core.compiler.codegen.targetPlatform>1.8</org.eclipse.jdt.core.compiler.codegen.targetPlatform>
                    <org.eclipse.jdt.core.compiler.compliance>1.8</org.eclipse.jdt.core.compiler.compliance>
                    <org.eclipse.jdt.core.compiler.source>1.8</org.eclipse.jdt.core.compiler.source>
                </additionalProperties>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>com.alexnederlof</groupId>
                    <artifactId>jasperreports-plugin</artifactId>
                    <version>2.6</version>
                    <exclusions>
                        <exclusion>
                            <groupId>net.sf.jasperreports</groupId>
                            <artifactId>jasperreports</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.eclipse.jdt.core.compiler</groupId>
                            <artifactId>ecj</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>org.eclipse.jdt</groupId>
                            <artifactId>ecj</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jdt.core.compiler</groupId>
                    <artifactId>ecj</artifactId>
                    <version>4.4.2</version>
                </dependency>
            </dependencies>

        </plugin>

You need to exclude all other broken compilers, and add dependency to your own (4.4.2 is used for current versions), and 3.3.1 is stricly java 7, and 4.3.1 was broken.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant