使用 Apache Ant
<target name="compile" description="Compiles report designs specified using the 'srcdir' in the <jrc> tag." depends="prepare-compile-classpath">
<mkdir dir="./build/reports"/>
<taskdef name="jrc" classname="net.sf.jasperreports.ant.JRAntCompileTask">
<classpath refid="project-classpath"/>
</taskdef>
<jrc
srcdir="./reports"
destdir="./build/reports"
tempdir="./build/reports"
keepjava="true"
xmlvalidation="true">
<classpath refid="sample-classpath"/>
<include name="**/*.jrxml"/>
</jrc>
</target>
需要在系統上正確安裝 Apache Ant 構建工具