Java Reference
In-Depth Information
</target>
<target name="viewDesign"
description="Launches the design viewer to preview the
compiled report design.">
<java classname="net.sf.jasperreports.view.JasperDesignViewer"
fork="true">
<arg value="-F${file.name}.jasper"/>
<classpath refid="classpath"/>
</java>
</target>
<target name="compile"
description="Compiles the XML report design and produces the
.jasper file.">
<taskdef name="jrc"
classname="net.sf.jasperreports.ant.JRAntCompileTask">
<classpath refid="classpath"/>
</taskdef>
<jrc destdir=".">
<src>
<fileset dir=".">
<include name="**/*.jrxml"/>
</fileset>
</src>
<classpath refid="classpath"/>
</jrc>
</target>
</project>
The new target can be invoked from the command line as:
ant compile
The compile target produces the following output:
Buildfile: build.xml
compile:
[jrc] Compiling 1 report design files.
[jrc] log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester.sax).
[jrc] log4j:WARN Please initialize the log4j system properly.
[jrc] File : /home/heffel/personal_workspace/JasperBookExamples/
reports/FirstReport.jrxml ... OK.
BUILD SUCCESSFUL
Total time: 4 seconds
 
Search WWH ::




Custom Search