【发布时间】:2016-08-31 01:33:03
【问题描述】:
我希望提高我的应用程序的性能,它有两种类型的报告,然后在执行时像这样编译:
final JasperDesign design = JRXmlLoader.load(input);
final JasperReport compiledReport = JasperCompileManager.compileReport(design);
每当用户想要在应用程序上查看报告时,都会执行此代码。 为了避免这种情况,我试图通过 maven jasperreports 插件执行 .jrxml 的编译,但它不起作用,并且控制台上没有错误。 .jasper 文件没有出现在我的目录“outputDirectory”中。
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jasperreports-maven-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<inherited>false</inherited>
<goals>
<goal>compile-reports</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceDirectory>src/main/resources/reports</sourceDirectory>
<outputDirectory>src/main/resources/reports/jasper</outputDirectory>
<compiler>net.sf.jasperreports.engine.design.JRJdtCompiler</compiler>
</configuration>
</plugin>
【问题讨论】:
-
感谢 Deendayal。我关注此页面,添加依赖项和排除项。我的应用程序启动了,但文件夹“jasper”仍然是空的......我没有找到问题......
-
您在构建日志中没有收到任何错误?
-
不,任何错误..启动是正确的。
-
考虑迁移到
jasperreports-plugin:stackoverflow.com/q/18495377/1743880
标签: java maven jasper-reports maven-plugin