changeset 57:f7f21e9d2296

CM-127: add jasper-ant script for compiling Jasper report definitions
author smith@nwoca.org
date Thu, 14 Jul 2011 15:39:58 -0400
parents 885cf9e76820
children 426d160e1e4a 6d4f61230dfb
files jasper-ant.xml
diffstat 1 files changed, 38 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jasper-ant.xml	Thu Jul 14 15:39:58 2011 -0400
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="jasper-ant" basedir="." xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
+       
+    <target name="-jasper-init" depends="init">
+        <property name="reports.src.dir" value="${basedir}/reports" />
+        <property name="reports.dest.dir" value="${build.web.dir}/WEB-INF/reports" />
+                
+        <ivy:settings id="jasper.ivy.id"/>
+        <ivy:resolve id="jasper.ivy.id" conf="jasper-ant" log="quiet"/>
+        <ivy:cachepath
+            resolveId="jasper.ivy.id"
+            pathid="jasper.classpath"
+            conf="jasper-ant" 
+            type="jar"
+            log="quiet"/>
+                 
+        <taskdef name="jrc" classname="net.sf.jasperreports.ant.JRAntCompileTask" classpathref="jasper.classpath"/> 
+        <property name="jasper.initialized" value="true"/>
+        
+    </target>
+
+    <target name="jasper-compile-reports" depends="-jasper-init" 
+            description="Compiles Jasper report designs."> 
+        <mkdir dir="${reports.dest.dir}"/> 
+        <jrc 
+            destdir="${reports.dest.dir}"
+            tempdir="${reports.dest.dir}"
+            keepjava="false"
+            xmlvalidation="true">
+            <src>
+                <fileset dir="${reports.src.dir}">
+                    <include name="**/*.jrxml"/>
+                </fileset>
+            </src>
+            <classpath refid="jasper.classpath"/>
+        </jrc> 
+    </target> 
+</project>