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.
194 lines
8.6 KiB
194 lines
8.6 KiB
<?xml version="1.0" encoding="UTF-8"?> |
|
<project name="ModuleCreation" default="all" basedir="."> |
|
<!--Aufruf mit |
|
|
|
ant -DMODULE_PATH=$ETL_PFAD -DBASE_DIR=. -DWEBAPP=$WEBAPP -DMODULE=etl all |
|
|
|
So erzeugen Sie dann ein SuperX-Paket: |
|
ant -DMODULE_PATH=$ETL_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=etl dist |
|
|
|
ETL-JAR erzeugen: |
|
|
|
ant -DWEBAPP=$WEBAPP distEtl |
|
ant -DWEBAPP=$WEBAPP cleanBuildPath |
|
--> |
|
<dirname file="${ant.file.superx}" property="superxBuildBaseDir" /> |
|
<property name="distDir" location="${superxBuildBaseDir}/superx/WEB-INF/lib" /> |
|
|
|
<property environment="env" /> |
|
<!-- set global properties for this build --> |
|
<property name="BASE_DIR" value="." /> |
|
<property name="SUPERX_DIR" value="${WEBAPP}"/> |
|
<property name="BUILD_PATH" value="${WEBAPP}/WEB-INF/classes"/> |
|
<property name="SRC_DIR" value="${BASE_DIR}/src" /> |
|
<property name="SRC_DIR_TEST" value="${BASE_DIR}/test-src"/> |
|
<property name="LIB_SUPERX_DIR" value="${WEBAPP}/WEB-INF/lib"/> |
|
<property name="LIB_WEBAPP_DIR" value="${WEBAPP}"/> |
|
<property name="LIB_EXT_SUPERX_DIR" value="${WEBAPP}/WEB-INF/lib_ext"/> |
|
|
|
<property name="superx-classes" value="${WEBAPP}/WEB-INF/classes" /> |
|
<property name="build_cobertura" value="${superxBuildBaseDir}/cobertura_build_classes" /> |
|
<property name="test-target" value="${superxBuildBaseDir}/cobertura_build_tests"/> |
|
<property name="superx-lib" value="${WEBAPP}/WEB-INF/lib" /> |
|
<property name="build-results" value="${superxBuildBaseDir}/results" /> |
|
<property name="build_cobertura_report" value="${superxBuildBaseDir}/coveragereport" /> |
|
<property name="src-java" value="${SRC_DIR}"/> |
|
<property name="test-resource" location="resource"/> |
|
|
|
|
|
<property name="version" value="0.1" /> |
|
<property name="docm_version" value="1.0" /> |
|
<property name="etl_version" value="0.4b" /> |
|
|
|
|
|
|
|
|
|
<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> |
|
<fileset dir="${LIB_EXT_SUPERX_DIR}"> |
|
<include name="**/*.jar" /> |
|
</fileset> |
|
|
|
</path> |
|
<condition property="isWindoze"> |
|
<os family="windows" /> |
|
</condition> |
|
|
|
<condition property="isUnix"> |
|
<os family="unix" /> |
|
</condition> |
|
<taskdef name="groovy" |
|
classname="org.codehaus.groovy.ant.Groovy" |
|
classpathref="classpath"/> |
|
<target name="initTimestamp"> |
|
<tstamp> |
|
<format property="SX_TIMESTAMP" pattern="dd.MM.yyyy HH:mm" /> |
|
</tstamp> |
|
</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" /> |
|
<antcall target="generate_etl_jobs" /> |
|
|
|
</target> |
|
<target name="module_copy_source" description="Gruppe: 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> |
|
<copy todir="${WEBAPP}/edit/${MODULE}" overwrite="true"> |
|
<fileset dir="${BASE_DIR}/superx/edit/${MODULE}" /> |
|
</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="${WEBAPP}" /> |
|
<property name="WEBAPP" value="${WEBAPP}" /> |
|
<property name="SUPERX_BASE" value="${WEBAPP}/WEB-INF" /> |
|
<fileset dir="${MODULE_PATH}/../../conf" includes="module_scripts_create_ant.xml" /> |
|
</subant> |
|
<chmod dir="${MODULE_PATH}/rohdaten" perm="ugo+x" includes="**/*.x" /> |
|
|
|
</target> |
|
<target name="generate_etl_jobs" description="generiert die ETL Scripte für Sonderladeroutinen" > |
|
<echo message="Start etl-job users_and_groups für Modul ${MODULE} in Pfad ${MODULE_PATH}" /> |
|
<xslt in="${MODULE_PATH}/conf/${MODULE}.xml" style="${MODULE_PATH}/schluesseltabellen/etl_transfer.xsl" |
|
out="${MODULE_PATH}/schluesseltabellen/etl_step_users_and_groups.sql" force="true"> |
|
<outputproperty name="method" value="text" /> |
|
<param name="job" expression="users_and_groups" /> |
|
</xslt> |
|
<echo message="Datei erzeugt: ${MODULE_PATH}/schluesseltabellen/etl_step_users_and_groups.sql" /> |
|
|
|
<xslt in="${MODULE_PATH}/conf/${MODULE}.xml" style="${MODULE_PATH}/schluesseltabellen/etl_transfer.xsl" |
|
out="${MODULE_PATH}/schluesseltabellen/etl_step_sichten.sql" force="true"> |
|
<outputproperty name="method" value="text" /> |
|
<param name="job" expression="sichten" /> |
|
</xslt> |
|
<echo message="Datei erzeugt: ${MODULE_PATH}/schluesseltabellen/etl_step_sichten.sql" /> |
|
|
|
<xslt in="${MODULE_PATH}/conf/${MODULE}.xml" style="${MODULE_PATH}/schluesseltabellen/etl_transfer.xsl" |
|
out="${MODULE_PATH}/schluesseltabellen/etl_step_sx_captions.sql" force="true"> |
|
<outputproperty name="method" value="text" /> |
|
<param name="job" expression="sx_captions" /> |
|
</xslt> |
|
<echo message="Datei erzeugt: ${MODULE_PATH}/schluesseltabellen/etl_step_sx_captions.sql" /> |
|
</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="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="distEtl" depends="compileSuperx" description="Erzeugt die superx-etl.jar. "> |
|
<delete> |
|
<fileset dir="${distDir}" includes="superx-etl*.jar" /> |
|
</delete> |
|
<jar destfile="${distDir}/superx-etl.jar" basedir="${BUILD_PATH}" includes="de/superx/elt/** de/superx/sxrest/**" excludes="freemarker/**/* com/**/* javax/**/* **/*.java"> |
|
<manifest> |
|
<!-- Who is building this jar? --> |
|
<attribute name="Built-By" value="superx"/> |
|
<!-- Information about the program itself --> |
|
<attribute name="Implementation-Date" value="${SX_TIMESTAMP}"/> |
|
<attribute name="Implementation-Title" value="SuperX"/> |
|
<attribute name="Implementation-Version" value="${version}"/> |
|
</manifest> |
|
</jar> |
|
</target> |
|
<target name="compileSuperx" depends="cleanBuildPath" description="Compile all classes for superx."> |
|
<filter token="sxtimestamp" value="${SX_TIMESTAMP}" /> |
|
<filter token="version" value="${etl_version}" /> |
|
<!-- MB 13.8.2009 auch mitkompilieren <echo message="de/memtext/db/Servlet* weggelassen"/>--> |
|
<copy todir="${BUILD_PATH}" filtering="true"> |
|
<fileset dir="${SRC_DIR}"> |
|
<include name="**/*.java" /> |
|
<include name="**/*.properties" /> |
|
<include name="**/*.gif" /> |
|
<include name="**/*.xml" /> |
|
<include name="edustore/*" /> |
|
<include name="saiku-datasources/*" /> |
|
<include name="saiku-repository/*" /> |
|
<exclude name="de/superx/docmanagement/*"/> |
|
</fileset> |
|
</copy> |
|
<!--<echo message="cp:${FULL_CLASSPATH}"/>--> |
|
|
|
<javac source="1.8" target="1.8" |
|
srcdir="${BUILD_PATH}" excludes="**/*Test*.java,test/**/*" |
|
destdir="${BUILD_PATH}" |
|
listfiles="false" encoding="UTF-8" debug="yes"> |
|
<classpath refid="classpath" /> |
|
</javac> |
|
</target> |
|
<target name="cleanBuildPath" depends="initTimestamp" description="Löscht alle *.class-Dateien in WEB-INF/classes"> |
|
<delete failonerror="false" includeemptydirs="true"> |
|
<fileset dir="${BUILD_PATH}" includes="**/*.class,**/*.java" excludes="*.properties" /> |
|
</delete> |
|
</target> |
|
|
|
</project>
|
|
|