Browse Source

Build-Script verbessert

xcube0.1
Daniel Quathamer 2 years ago
parent
commit
1e86611916
  1. 32
      build.xml

32
build.xml

@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project name="ModuleCreation" default="all" basedir="."> <project name="ModuleCreation" default="help" basedir=".">
<!--Aufruf mit
ant -DMODULE_PATH=$MEINMODUL_PFAD -DBASE_DIR=. -DWEBAPP=$WEBAPP -DMODULE=meinmodul all
So erzeugen Sie dann ein SuperX-Paket:
ant -DMODULE_PATH=$MEINMODUL_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=meinmodul dist
-->
<dirname file="${ant.file}" property="moduleCreateBaseDir" /> <dirname file="${ant.file}" property="moduleCreateBaseDir" />
<property name="BASE_DIR" value="${moduleCreateBaseDir}/../.." /> <property name="BASE_DIR" value="${moduleCreateBaseDir}/../.." />
<property name="WEBAPP" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" /> <property name="WEBAPP" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" />
@ -26,16 +17,32 @@ ant -DMODULE_PATH=$MEINMODUL_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=meinmodul dist
<condition property="isUnix"> <condition property="isUnix">
<os family="unix" /> <os family="unix" />
</condition> </condition>
<target name="help" description="Bedienung">
<echo message="Setzen Sie im Shell-Environment (SQL_ENV) den Parameter XCUBE_PFAD=$SUPERX_MODULE/xcube; export XCUBE_PFAD" />
<echo message="Dann der Aufruf: " />
<echo message="ant -DMODULE_PATH=$XCUBE_PFAD -DBASE_DIR=. -DWEBAPP=$WEBAPP -DMODULE=xcube all" />
<echo message="So erzeugen Sie dann ein SuperX-Paket:" />
<echo message="ant -DMODULE_PATH=$XCUBE_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=xcube dist" />
</target>
<target name="all" description="Gruppe: Kopiere Modul Sourcen in den WEB-INF-Verzeichnisbaum"> <target name="all" description="Gruppe: Kopiere Modul Sourcen in den WEB-INF-Verzeichnisbaum">
<antcall target="module_copy_source" /> <antcall target="module_copy_source" />
<antcall target="call_module_scripts_create_ant" /> <antcall target="call_module_scripts_create_ant" />
<antcall target="module_copy_webapp_files" />
</target> </target>
<target name="module_copy_source" description="Gruppe: Kopiere Modul Sourcen in den WEB-INF-Verzeichnisbaum"> <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}" /> <echo message="Start module_copy_sources für Modul ${MODULE} in Pfad ${MODULE_PATH}" />
<copy todir="${MODULE_PATH}" overwrite="true"> <copy todir="${MODULE_PATH}" overwrite="true">
<fileset dir="${BASE_DIR}/src-modules/module/${MODULE}" /> <fileset dir="${BASE_DIR}/src-modules/module/${MODULE}" />
</copy> </copy>
</target> </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"> <target name="call_module_scripts_create_ant" description="Call to module_scripts_create_ant">
<subant target="all"> <subant target="all">
<!--<property name="basedir" value="${MODULE_PATH}/../../conf/" />--> <!--<property name="basedir" value="${MODULE_PATH}/../../conf/" />-->
@ -47,7 +54,7 @@ ant -DMODULE_PATH=$MEINMODUL_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=meinmodul dist
<fileset dir="${MODULE_PATH}/../../conf" includes="module_scripts_create_ant.xml" /> <fileset dir="${MODULE_PATH}/../../conf" includes="module_scripts_create_ant.xml" />
</subant> </subant>
</target> </target>
<target name="dist" description="Create Download package"> <target name="dist" description="Create Download package">
<subant target="erzeuge_paket"> <subant target="erzeuge_paket">
<!--<property name="basedir" value="${MODULE_PATH}/../../conf/" />--> <!--<property name="basedir" value="${MODULE_PATH}/../../conf/" />-->
<property name="MODULE" value="${MODULE}" /> <property name="MODULE" value="${MODULE}" />
@ -62,4 +69,5 @@ ant -DMODULE_PATH=$MEINMODUL_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=meinmodul dist
<fileset dir="${MODULE_PATH}/../../conf" includes="build.xml" /> <fileset dir="${MODULE_PATH}/../../conf" includes="build.xml" />
</subant> </subant>
</target> </target>
</project> </project>

Loading…
Cancel
Save