You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
186 lines
8.2 KiB
186 lines
8.2 KiB
<?xml version="1.0" encoding="UTF-8"?> |
|
<project name="ModuleCreation" default="help" basedir="."> |
|
<!--Aufruf mit |
|
|
|
|
|
--> |
|
<dirname file="${ant.file}" property="moduleCreateBaseDir" /> |
|
<property name="BASE_DIR" value="${moduleCreateBaseDir}/../.." /> |
|
<property name="WEBAPP" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" /> |
|
<path id="classpath"> |
|
<!--WEB-INF/lib--> |
|
<fileset dir="${WEBAPP}/WEB-INF"> |
|
<include name="lib/**/*.jar" /> |
|
<include name="classes" /> |
|
</fileset> |
|
</path> |
|
<condition property="isWindoze"> |
|
<os family="windows" /> |
|
</condition> |
|
|
|
<condition property="isUnix"> |
|
<os family="unix" /> |
|
</condition> |
|
<target name="init"> |
|
<tstamp> |
|
<format property="SX_TIMESTAMP" pattern="dd.MM.yyyy HH:mm:ss" /> |
|
</tstamp> |
|
</target> |
|
<target name="help" description="Bedienung"> |
|
<echo message="Aufruf: " /> |
|
<echo message="ant -DMODULE_PATH=$RPTA_PFAD -DBASE_DIR=. -DWEBAPP=$WEBAPP -DMODULE=rpta all" /> |
|
<echo message="So erzeugen Sie dann ein SuperX-Paket:" /> |
|
<echo message="ant -DMODULE_PATH=$RPTA_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=rpta dist" /> |
|
|
|
</target> |
|
|
|
<target name="all" description="Gruppe: Kopiere Modul Sourcen in den WEB-INF-Verzeichnisbaum"> |
|
<antcall target="module_copy_source" /> |
|
<antcall target="call_module_scripts_create_ant" /> |
|
<antcall target="module_copy_webapp_files" /> |
|
</target> |
|
<target name="module_copy_source" description="Kopiere Modul Sourcen in den WEB-INF-Verzeichnisbaum"> |
|
<echo message="Start module_copy_sources für Modul ${MODULE} in Pfad ${MODULE_PATH}" /> |
|
<copy todir="${MODULE_PATH}" overwrite="true"> |
|
<fileset dir="${BASE_DIR}/src-modules/module/${MODULE}" /> |
|
</copy> |
|
</target> |
|
<target name="module_copy_webapp_files" description="Kopiere webapp-Dateien in den WEBAPP-Verzeichnisbaum"> |
|
<echo message="Start module_copy_webapp_files für Modul ${MODULE} in Pfad ${MODULE_PATH}" /> |
|
<copy todir="${WEBAPP}" overwrite="true"> |
|
<fileset dir="${BASE_DIR}/superx" /> |
|
</copy> |
|
</target> |
|
<target name="call_module_scripts_create_ant" description="Call to module_scripts_create_ant"> |
|
<subant target="all"> |
|
<!--<property name="basedir" value="${MODULE_PATH}/../../conf/" />--> |
|
<property name="MODULE" value="${MODULE}" /> |
|
<property name="DATABASE" value="POSTGRES" /> |
|
<property name="WEBAPP_EXT_MODULE" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" /> |
|
<property name="WEBAPP" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" /> |
|
<property name="SUPERX_BASE" value="${WEBAPP}/WEB-INF" /> |
|
<fileset dir="${MODULE_PATH}/../../conf" includes="module_scripts_create_ant.xml" /> |
|
</subant> |
|
</target> |
|
<target name="dist" description="Create Download package"> |
|
<subant target="erzeuge_paket"> |
|
<!--<property name="basedir" value="${MODULE_PATH}/../../conf/" />--> |
|
<property name="MODULE" value="${MODULE}" /> |
|
<property name="PFAD" value="/home/superx/fertige_module" /> |
|
<property name="DATABASE" value="POSTGRES" /> |
|
<property name="ENCODING" value="utf8" /> |
|
<property name="PLATFORM" value="superx" /> |
|
|
|
<property name="WEBAPP_EXT_MODULE" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" /> |
|
<property name="WEBAPP" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" /> |
|
<property name="SUPERX_BASE" value="${WEBAPP}/WEB-INF" /> |
|
<fileset dir="${MODULE_PATH}/../../conf" includes="build.xml" /> |
|
</subant> |
|
</target> |
|
<target name="xml2jrxml_tabelle_a4_quer" description="Target: aus einer XML-Datei (SuperX-Bericht XML-Export) eine JRXML-Datei" |
|
depends="init"> |
|
<!-- Aufruf: |
|
ant -DXML=stud_zeitreihe.xml -DWEBAPP=$WEBAPP -DTARGET_NAME=tmp xml2jrxml_tabelle_a4_quer |
|
--> |
|
<java classname="net.sf.saxon.Transform" fork="yes" failonerror="true" |
|
dir="./superx/WEB-INF/reports"> |
|
<sysproperty key="DEBUG" value="true" /> |
|
<arg value="-o:${moduleCreateBaseDir}/test/tabelle_a4_quer/${TARGET_NAME}.jrxml" /> |
|
<arg value="-xsl:${moduleCreateBaseDir}/superx/xml/tabelle_jrxml_a4_quer.xsl" /> |
|
<arg value="-s:${moduleCreateBaseDir}/test/tabelle_a4_quer/${XML}" /> |
|
<classpath refid="classpath" /> |
|
</java> |
|
<echo message="Datei erzeugt: ./test/tabelle_a4_quer/${TARGET_NAME}.jrxml (${SX_TIMESTAMP})" /> |
|
|
|
|
|
</target> |
|
<target name="jrxml2pdf_tabelle_a4_quer" description="Target: aus einer XML-Datei (SuperX-Bericht XML-Export) + JRXML-Datei einen PDF Export erzeugen" |
|
depends="init,xml2jrxml_tabelle_a4_quer"> |
|
<!-- Aufruf: |
|
ant -DXML=stud_zeitreihe.xml -DWEBAPP=$WEBAPP -DTARGET_NAME=tmp jrxml2pdf_tabelle_a4_quer |
|
--> |
|
<java classname="de.superx.bin.SxJasper" fork="yes" failonerror="true" |
|
dir="./superx/WEB-INF/reports"> |
|
<arg value="-logger:${WEBAPP}/WEB-INF/conf/edustore/db/conf/logging.properties" /> |
|
<arg value="-db_properties:${WEBAPP}/WEB-INF/db.properties" /> |
|
<arg value="-OUT:${moduleCreateBaseDir}/test/tabelle_a4_quer/${TARGET_NAME}.pdf" /> |
|
<arg value="-JRXML:${moduleCreateBaseDir}/test/tabelle_a4_quer/${TARGET_NAME}.jrxml" /> |
|
<arg value="-XML:${moduleCreateBaseDir}/test/tabelle_a4_quer/${XML}" /> |
|
<classpath refid="classpath" /> |
|
</java> |
|
<delete includeemptydirs="true"> |
|
<fileset dir="./test/tabelle_a4_quer/" includes="**/*.jrprint,**/*.groovy"/> |
|
</delete> |
|
|
|
<echo message="Datei erzeugt: ./test/tabelle_a4_quer/${TARGET_NAME}.pdf (${SX_TIMESTAMP})" /> |
|
|
|
|
|
</target> |
|
<target name="xml2jrxml_booklet_ohne_cover" description="Target: aus einer XML-Datei (SuperX-Bericht XML-Export) eine JRXML-Datei" |
|
depends="init"> |
|
<!-- Aufruf: |
|
ant -DXML=benutzerrahmen.xml -DWEBAPP=$WEBAPP -DTARGET_NAME=tmp xml2jrxml_booklet_ohne_cover |
|
--> |
|
<java classname="net.sf.saxon.Transform" fork="yes" failonerror="true" |
|
dir="./superx/WEB-INF/reports"> |
|
<sysproperty key="DEBUG" value="true" /> |
|
<arg value="-o:${moduleCreateBaseDir}/test/booklet_ohne_cover/${TARGET_NAME}.jrxml" /> |
|
<arg value="-xsl:${moduleCreateBaseDir}/superx/xml/tabelle_jrxml_book_without_cover.xsl" /> |
|
<arg value="-s:${moduleCreateBaseDir}/test/booklet_ohne_cover/${XML}" /> |
|
<classpath refid="classpath" /> |
|
</java> |
|
<echo message="Datei erzeugt: ./test/booklet_ohne_cover/${TARGET_NAME}.jrxml (${SX_TIMESTAMP})" /> |
|
|
|
|
|
</target> |
|
<target name="jrxml2pdf_booklet_ohne_cover" description="Target: aus einer XML-Datei (SuperX-Bericht XML-Export) + JRXML-Datei einen PDF Export erzeugen" |
|
depends="init,xml2jrxml_booklet_ohne_cover"> |
|
<!-- Aufruf: |
|
ant -DXML=benutzerrahmen.xml -DWEBAPP=$WEBAPP -DTARGET_NAME=tmp jrxml2pdf_booklet_ohne_cover |
|
--> |
|
<taskdef name="jrc" classname="net.sf.jasperreports.ant.JRAntCompileTask"> |
|
<classpath refid="classpath"/> |
|
</taskdef> |
|
<jrc |
|
srcdir="${moduleCreateBaseDir}/test/booklet_ohne_cover" |
|
destdir="${moduleCreateBaseDir}/test/booklet_ohne_cover" |
|
tempdir="${moduleCreateBaseDir}/test/booklet_ohne_cover" |
|
keepjava="true" |
|
xmlvalidation="true"> |
|
<classpath refid="classpath"/> |
|
<include name="**/*.jrxml"/> |
|
</jrc> |
|
<java classname="de.superx.bin.SxJasper" fork="yes" failonerror="true" |
|
dir="./superx/WEB-INF/reports"> |
|
<arg value="-logger:${WEBAPP}/WEB-INF/conf/edustore/db/conf/logging.properties" /> |
|
<arg value="-db_properties:${WEBAPP}/WEB-INF/db.properties" /> |
|
<arg value="-OUT:${moduleCreateBaseDir}/test/booklet_ohne_cover/${TARGET_NAME}.pdf" /> |
|
<arg value="-JRXML:${moduleCreateBaseDir}/test/booklet_ohne_cover/${TARGET_NAME}.jrxml" /> |
|
<arg value="-XML:${moduleCreateBaseDir}/test/booklet_ohne_cover/${XML}" /> |
|
<arg value="-IGNORE_PAGINATION:false" /> |
|
|
|
<classpath refid="classpath" /> |
|
</java> |
|
<delete includeemptydirs="true"> |
|
<fileset dir="./test/booklet_ohne_cover/" includes="**/*.jrprint,**/*.groovy"/> |
|
</delete> |
|
<echo message="Datei erzeugt: ./test/booklet_ohne_cover/${TARGET_NAME}.pdf (${SX_TIMESTAMP})" /> |
|
|
|
|
|
</target> |
|
<target name="test" description="Execute test cases"> |
|
<!-- Ausführen mit |
|
ant -DWEBAPP=$WEBAPP test |
|
--> |
|
<antcall target="jrxml2pdf_tabelle_a4_quer"> |
|
<param name="XML" value="stud_zeitreihe.xml" /> |
|
<param name="TARGET_NAME" value="tmp" /> |
|
<param name="WEBAPP" value="${WEBAPP}" /> |
|
</antcall> |
|
<antcall target="jrxml2pdf_booklet_ohne_cover"> |
|
<param name="XML" value="benutzerrahmen.xml" /> |
|
<param name="TARGET_NAME" value="tmp" /> |
|
<param name="WEBAPP" value="${WEBAPP}" /> |
|
</antcall> |
|
</target> |
|
</project>
|
|
|