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

How add other custom project dependency to this plugin #20

Open
sreekanthsnair opened this issue Jul 8, 2015 · 1 comment
Open

How add other custom project dependency to this plugin #20

sreekanthsnair opened this issue Jul 8, 2015 · 1 comment

Comments

@sreekanthsnair
Copy link

Our Jrxml is depends on couple of my other java project, how to refer those project in this plugin? plugin dependency won't work with process-source phase, if phase is changed to process-class then its working but compiled jasper is not becoming a part of jar

@adrianoneres
Copy link

adrianoneres commented Aug 5, 2016

Hey @sreekanthsnair. I don't know if I understood your question but I had to compile jasper files to a jar too.

To do this, I had to explicit add a resource on my build to path target/classes/jasper, and in the configuration section I set the output directory to this path. That's how I did this:

<build>
    <finalName>taxonomia-reports</finalName>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
        </resource>
        <resource>
            <directory>target/classes/jasper</directory>
            <includes>
                <include>**/*.jasper</include>
            </includes>
        </resource>
    </resources>
    <plugins>
        <plugin>
            <groupId>com.alexnederlof</groupId>
            <artifactId>jasperreports-plugin</artifactId>
            <version>2.0</version>
            <executions>
                <execution>
                    <phase>process-sources</phase>
                    <goals>
                        <goal>jasper</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <compiler>net.sf.jasperreports.engine.design.JRJdtCompiler</compiler>
                <sourceDirectory>src/main/jasperreports</sourceDirectory>
                <outputDirectory>${project.build.directory}/classes/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>
                    <net.sf.jasperreports.awt.ignore.missing.font>true</net.sf.jasperreports.awt.ignore.missing.font>
                </additionalProperties>
            </configuration>
        </plugin>
    </plugins>
</build>

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

2 participants