Jasper-report-maven-plugin
Jasper-report-maven-plugin copied to clipboard
How add other custom project dependency to this plugin
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
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>