|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project name="ModuleCreation" default="all" basedir=".">
|
|
|
|
<!--Aufruf mit
|
|
|
|
|
|
|
|
ant -DMODULE_PATH=$QA_PFAD -DBASE_DIR=. -DWEBAPP=$WEBAPP -DMODULE=qa all
|
|
|
|
|
|
|
|
So erzeugen Sie dann ein SuperX-Paket:
|
|
|
|
ant -DMODULE_PATH=$QA_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=qa dist
|
|
|
|
|
|
|
|
QA-JAR erzeugen:
|
|
|
|
|
|
|
|
ant -DWEBAPP=$WEBAPP distQA
|
|
|
|
ant -DWEBAPP=$WEBAPP cleanBuildPath
|
|
|
|
|
|
|
|
-->
|
|
|
|
<dirname file="${ant.file}" property="moduleCreateBaseDir" />
|
|
|
|
<dirname file="${ant.file.superx}" property="superxBuildBaseDir" />
|
|
|
|
<property name="distDir" location="${superxBuildBaseDir}/superx/WEB-INF/lib" />
|
|
|
|
|
|
|
|
<property name="BASE_DIR" value="." />
|
|
|
|
<property name="SUPERX_DIR" value="${WEBAPP}"/>
|
|
|
|
<property name="BUILD_PATH" value="${BASE_DIR}/superx/WEB-INF/classes"/>
|
|
|
|
<property name="SRC_DIR" value="${BASE_DIR}/src" />
|
|
|
|
<property name="WEBAPP" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" />
|
|
|
|
|
|
|
|
|
|
|
|
<property name="qa_version" value="0.2b" />
|
|
|
|
|
|
|
|
|
|
|
|
<path id="classpath">
|
|
|
|
<!--WEB-INF/lib-->
|
|
|
|
<fileset dir="${WEBAPP}/WEB-INF">
|
|
|
|
<include name="lib/**/*.jar" />
|
|
|
|
<include name="lib_ext/*.jar" />
|
|
|
|
<include name="classes" />
|
|
|
|
</fileset>
|
|
|
|
|
|
|
|
</path>
|
|
|
|
<condition property="isWindoze">
|
|
|
|
<os family="windows" />
|
|
|
|
</condition>
|
|
|
|
|
|
|
|
<condition property="isUnix">
|
|
|
|
<os family="unix" />
|
|
|
|
</condition>
|
|
|
|
<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" />
|
|
|
|
</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/qa" 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}" /><!--${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="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="distQA" depends="compileSuperx" description="Erzeugt die superx-qa.jar. ">
|
|
|
|
<delete>
|
|
|
|
<fileset dir="${distDir}" includes="superx-qa*.jar" />
|
|
|
|
</delete>
|
|
|
|
<jar destfile="${distDir}/superx-qa.jar" basedir="${BUILD_PATH}" includes="de/superx/qa/** 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="${qa_version}" />
|
|
|
|
<!-- MB 13.8.2009 auch mitkompilieren <echo message="de/memtext/db/Servlet* weggelassen"/>-->
|
|
|
|
<copy todir="${BUILD_PATH}" filtering="false">
|
|
|
|
<fileset dir="${SRC_DIR}">
|
|
|
|
<include name="**/*.java" />
|
|
|
|
<include name="**/*.properties" />
|
|
|
|
<include name="**/*.gif" />
|
|
|
|
<include name="**/*.xml" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
<echo message="bp:${BUILD_PATH}"/>
|
|
|
|
|
|
|
|
<javac source="1.8" target="1.8"
|
|
|
|
srcdir="${BUILD_PATH}"
|
|
|
|
destdir="${BUILD_PATH}"
|
|
|
|
listfiles="yes" encoding="UTF-8" debug="no" verbose="no">
|
|
|
|
<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>
|