core-jgi/install/Adempiere/build.xml

578 lines
25 KiB
XML

<!-- ====================================================== -->
<!-- Adempiere Distribution Setup -->
<!-- ====================================================== -->
<!-- $Header: /cvs/adempiere/install/Adempiere/build.xml,v 1.4 2006/07/03 16:51:31 jjanke Exp $-->
<project name="setup" default="setup" basedir=".">
<description>
This buildfile is used to setup the Adempiere Environment.
</description>
<property environment="env" />
<property name="envFile" value="AdempiereEnv.properties" />
<property name="server" value="nas" />
<patternset id="manifest.exclude">
<exclude name="META-INF/*.DSA"/>
<exclude name="META-INF/*.RSA"/>
<exclude name="META-INF/*.SF"/>
<exclude name="META-INF/MANIFEST.MF"/>
<exclude name="META-INF/INDEX.LIST"/>
</patternset>
<!-- ==================================================== -->
<!-- Init -->
<!-- ==================================================== -->
<target name="setupInit"
description="initialization target">
<echo message="Adempiere Server Setup ===================" />
<echo message="ADEMPIERE_HOME = ${env.ADEMPIERE_HOME}" />
<!-- create the time stamp and environment -->
<tstamp />
<available file="${envFile}" property="envFileExists" />
<fail message="**** RUN_setup was not successful - please re-run ****" unless="envFileExists" />
<property file="${envFile}" />
<filter filtersfile="${envFile}" />
<echo message="Environment = ${envFile}" />
<echo message="Java VM = ${ADEMPIERE_JAVA_TYPE}" />
<echo message="Database = ${ADEMPIERE_DB_TYPE}" />
<echo message="Apps Server = ${ADEMPIERE_APPS_TYPE}" />
<echo message="AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
<!-- Environment variables -->
<condition property="isWindows">
<os family="windows" />
</condition>
<condition property="isAppsJBoss">
<equals arg1="jboss" arg2="${ADEMPIERE_APPS_TYPE}" />
</condition>
<condition property="isAppsTomcat">
<equals arg1="tomcatOnly" arg2="${ADEMPIERE_APPS_TYPE}" />
</condition>
<echo message="Windows=${isWindows} JBoss=${isAppsJBoss} Tomcat=${isAppsTomcat}" />
</target>
<!-- ==================================================== -->
<!-- Windows Setup -->
<!-- ==================================================== -->
<target name="setupWin" depends="setupInit" if="isWindows"
description="Windows Setup">
<!-- Filter files No Overwrite -->
<copy file="utils/myDBcopyTemplate.bat"
tofile="utils/myDBcopy.bat" filtering="yes" overwrite="no" />
<!-- Filter files Overwrite -->
<copy file="utils/myEnvironmentTemplate.bat"
tofile="utils/myEnvironment.bat" filtering="yes" overwrite="yes" />
<copy file="utils/RUN_GetAdempiereTemplate.bat"
tofile="utils/RUN_GetAdempiere.bat" filtering="yes" overwrite="yes" />
<copy file="utils/RUN_PutExportTemplate.bat"
tofile="utils/RUN_PutExport.bat" filtering="yes" overwrite="yes" />
<copy file="utils/RUN_WinEnvTemplate.bat"
tofile="utils/RUN_WinEnv.bat" filtering="yes" overwrite="yes" />
<delete>
<fileset dir="." includes="**/*.sh" excludes="RUN_Adempiere.sh" />
</delete>
</target>
<!-- ==================================================== -->
<!-- Non Windows Setup -->
<!-- ==================================================== -->
<target name="setupNonWin" depends="setupInit" unless="isWindows"
description="Non Windows Setup">
<!-- Filter files No Overwrite -->
<copy file="utils/myDBcopyTemplate.sh"
tofile="utils/myDBcopy.sh" filtering="yes" overwrite="no" />
<!-- Filter files Overwrite -->
<copy file="utils/myEnvironmentTemplate.sh"
tofile="utils/myEnvironment.sh" filtering="yes" overwrite="yes" />
<copy file="utils/RUN_GetAdempiereTemplate.sh"
tofile="utils/RUN_GetAdempiere.sh" filtering="yes" overwrite="yes" />
<copy file="utils/RUN_PutExportTemplate.sh"
tofile="utils/RUN_PutExport.sh" filtering="yes" overwrite="yes" />
<copy file="utils/RUN_UnixEnvTemplate.sh"
tofile="utils/RUN_UnixEnv.sh" filtering="yes" overwrite="yes" />
<!-- Fix OS stuff -->
<fixcrlf srcdir="." eol="lf" eof="remove" includes="**/*.sh" />
<chmod dir="." perm="ugo+x" includes="**/*.sh" />
<delete>
<fileset dir="." includes="*.bat" excludes="RUN_Adempiere.bat" />
<fileset dir="utils" includes="**/*.bat" />
</delete>
</target>
<!-- rebuild Adempiere.jar to include possible customization and patches -->
<target name="setupALib" depends="setupInit">
<jar jarfile="lib/Adempiere1.jar" index="yes" duplicate="preserve">
<!-- pack patches.jar and customization.jar into Adempiere.jar -->
<zipfileset src="lib/customization.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/patches.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<!-- posterita packages -->
<zipfileset src="lib/posterita.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<!-- 2pack packages -->
<zipgroupfileset dir="packages" includes="**/lib/*.jar">
<patternset refid="manifest.exclude"/>
</zipgroupfileset>
<zipfileset src="lib/Adempiere.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<indexjars>
<pathelement path="lib/AdempiereCLib.jar"/>
<pathelement path="lib/CompiereJasperReqs.jar"/>
</indexjars>
<manifest>
<attribute name="Specification-Title" value="Adempiere"/>
<attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}"/>
<attribute name="Specification-Vendor" value="ADempiere"/>
<attribute name="Implementation-Title" value="Adempiere ${env.ADEMPIERE_VERSION}"/>
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
<attribute name="Implementation-URL" value="http://www.adempiere.com"/>
<attribute name="Main-Class" value="org.compiere.Adempiere"/>
<attribute name="Class-Path" value="AdempiereSLib.jar"/>
</manifest>
</jar>
<!-- Sign Adempiere Jar -->
<signjar jar="lib/Adempiere1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file="lib/Adempiere1.jar" tofile="lib/Adempiere.jar" overwrite="yes" />
<!-- Sign patches Jar -->
<copy file="lib/patches.jar" tofile="lib/patches1.jar" overwrite="yes" />
<signjar jar="lib/patches1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file="lib/patches1.jar" tofile="lib/patches.jar" overwrite="yes" />
<!-- Sign customization Jar -->
<copy file="lib/customization.jar" tofile="lib/customization1.jar" overwrite="yes" />
<signjar jar="lib/customization1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file="lib/customization1.jar" tofile="lib/customization.jar" overwrite="yes" />
<!-- clean up -->
<delete file="lib/Adempiere1.jar"/>
<delete file="lib/patches1.jar"/>
<delete file="lib/customization1.jar"/>
</target>
<!-- ==================================================== -->
<!-- Adempiere Client Lib -->
<!-- ==================================================== -->
<target name="setupCLib" depends="setupInit" unless="isAppsTomcat"
description="Setup Adempiere Client Lib">
<!-- Delete Old -->
<delete file="lib/AdempiereCLib.jar" failonerror="no" />
<delete file="lib/CClient.jar" failonerror="no" />
<delete file="lib/CTools.jar" failonerror="no" />
<!-- Create AdempiereCLib.jar file -->
<jar jarfile="lib/AdempiereCLib.jar" index="yes" duplicate="preserve">
<zipfileset src="lib/CCTools.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/oracle.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/postgresql.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/${ADEMPIERE_APPS_TYPE}.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<manifest>
<attribute name="Specification-Title" value="Adempiere Client Library" />
<attribute name="Specification-Version" value="${ADEMPIERE_MAIN_VERSION}" />
<attribute name="Specification-Vendor" value="Adempiere" />
<attribute name="Implementation-Title" value="AdempiereCLib ${ADEMPIERE_MAIN_VERSION}" />
<attribute name="Implementation-Version" value="${ADEMPIERE_MAIN_VERSION} ${DSTAMP}-${TSTAMP}" />
<attribute name="Implementation-Vendor" value="Adempiere, Inc." />
<attribute name="Implementation-URL" value="http://www.adempiere.com" />
</manifest>
</jar>
<echo message="KeyStore=${ADEMPIERE_KEYSTORE} - Alias=${ADEMPIERE_KEYSTORECODEALIAS}" />
<!-- Sign AdempiereCLib Jar -->
<signjar jar="lib/AdempiereCLib.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
</target>
<!-- ==================================================== -->
<!-- Adempiere Server Lib -->
<!-- ==================================================== -->
<target name="setupSLib" depends="setupInit"
description="Setup Adempiere Server Lib">
<!-- Delete Old -->
<delete file="lib/AdempiereSLib.jar" failonerror="no" />
<delete file="lib/CServer.jar" failonerror="no" />
<!-- Create AdempiereSLib.jar file -->
<jar jarfile="lib/AdempiereSLib.jar" index="yes" duplicate="preserve">
<zipfileset src="lib/CSTools.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/oracle.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/postgresql.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/CompiereJasperReqs.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<manifest>
<attribute name="Specification-Title" value="Adempiere Server Library" />
<attribute name="Specification-Version" value="${ADEMPIERE_MAIN_VERSION}" />
<attribute name="Specification-Vendor" value="Adempiere" />
<attribute name="Implementation-Title" value="AdempiereSLib ${ADEMPIERE_MAIN_VERSION}" />
<attribute name="Implementation-Version" value="${ADEMPIERE_MAIN_VERSION} ${DSTAMP}-${TSTAMP}" />
<attribute name="Implementation-Vendor" value="Adempiere, Inc." />
<attribute name="Implementation-URL" value="http://www.adempiere.com" />
</manifest>
</jar>
<!-- Sign AdempiereSLib Jar -->
<signjar jar="lib/AdempiereSLib.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<delete dir="buildSLib" />
<!-- Sign CompiereJasperReqs.jar for Java Web Start -->
<signjar jar="lib/CompiereJasperReqs.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
</target>
<!-- Sign other application jars -->
<target name="signOtherJars" depends="setupInit" >
<!-- Sign AdempiereRoot Jar -->
<copy file="lib/adempiereRoot.jar" tofile="lib/adempiereRoot1.jar" overwrite="yes" />
<signjar jar="lib/adempiereRoot1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file="lib/adempiereRoot1.jar" tofile="lib/adempiereRoot.jar" overwrite="yes" />
<delete file="lib/adempiereRoot1.jar"/>
<!-- Sign AdempiereApps Jar -->
<copy file="lib/adempiereApps.jar" tofile="lib/adempiereApps1.jar" overwrite="yes" />
<signjar jar="lib/adempiereApps1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file="lib/adempiereApps1.jar" tofile="lib/adempiereApps.jar" overwrite="yes" />
<delete file="lib/adempiereApps1.jar"/>
</target>
<!-- ==================================================== -->
<!-- Setup Lib -->
<!-- ==================================================== -->
<target name="setupLib" depends="setupInit, setupWin, setupNonWin, setupCLib, setupSLib, setupALib, signOtherJars"
description="Setup Adempiere Lib directory">
<!-- Filter files Overwrite -->
<copy file="${basedir}/utils/ftpPutExportTemplate.txt"
tofile="${basedir}/utils/ftpPutExport.txt" filtering="yes" overwrite="yes" />
<copy file="${basedir}/utils/ftpGetAdempiereTemplate.txt"
tofile="${basedir}/utils/ftpGetAdempiere.txt" filtering="yes" overwrite="yes" />
<copy file="${basedir}/utils/adempiereDirectTemplate.jnlp"
tofile="${basedir}/lib/adempiereDirect.jnlp" filtering="yes" overwrite="yes" />
<!-- Create Client Zip -->
<zip zipfile="${basedir}/lib/AdempiereClient.zip">
<zipfileset dir="." prefix="Adempiere"
includes="*.html" />
<zipfileset dir="." prefix="Adempiere"
includes="RUN_Adempiere.*" />
<zipfileset dir="utils" prefix="Adempiere"
includes="WinEnv.js" />
<zipfileset dir="lib" prefix="Adempiere/lib"
includes="Adempiere.exe,*.ico,customization.jar,patches.jar,CompiereJasperReqs.jar,Adempiere.jar,AdempiereCLib.jar,adempiereDirect.jnlp,index.html,*.0" />
</zip>
<!-- Save properties -->
<copy file="AdempiereEnv.properties"
tofile="AdempiereEnv.properties.save" />
<copy file="Adempiere.properties"
tofile="Adempiere.properties.save" />
</target>
<!-- Update application library -->
<target name="updateLib" depends="setupInit, setupWin, setupNonWin, setupALib, signOtherJars">
<!-- Create Client Zip -->
<zip zipfile="${basedir}/lib/AdempiereClient.zip">
<zipfileset dir="." prefix="Adempiere"
includes="*.html" />
<zipfileset dir="." prefix="Adempiere"
includes="RUN_Adempiere.*" />
<zipfileset dir="utils" prefix="Adempiere"
includes="WinEnv.js" />
<zipfileset dir="lib" prefix="Adempiere/lib"
includes="Adempiere.exe,*.ico,customization.jar,patches.jar,CompiereJasperReqs.jar,Adempiere.jar,AdempiereCLib.jar,adempiereDirect.jnlp,index.html,*.0" />
</zip>
</target>
<target name="createEAR">
<!-- Create adempiereRoot war -->
<zip destfile="${basedir}/lib/adempiereRoot.war">
<!-- copy Base -->
<zipfileset src="${basedir}/lib/adempiereRootBase.war" />
<!-- copy to adempiereHome -->
<zipfileset dir="${basedir}/lib"
includes="AdempiereClient.zip,Adempiere.jar,AdempiereCLib.jar,*.jnlp,*.0,*.html,CompiereJasperReqs.jar,CompiereJasper.jar"
prefix="adempiereHome" />
</zip>
<!-- Create adempiereWebCM war -->
<zip destfile="${basedir}/lib/adempiereWebCM.war">
<!-- copy Base -->
<zipfileset src="${basedir}/lib/adempiereWebCMbase.war" />
</zip>
<!-- bundle everything in one ear file for simpler deployment -->
<ear destfile="${basedir}/lib/adempiere.ear" appxml="${basedir}/lib/adempiereAll.xml">
<fileset dir="${basedir}/lib"
includes="Adempiere.jar,AdempiereSLib.jar,adempiereRoot.jar,adempiereApps.jar,adempiereApps.war,adempiereRoot.war,adempiereWebStore.war,adempiereWebCM.war,posterita.war" />
</ear>
</target>
<!-- ==================================================== -->
<!-- Setup EAR Libraries -->
<!-- ==================================================== -->
<target name="setupEAR" depends="setupLib"
description="Setup Adempiere EAR Libraries">
<antcall target="createEAR" inheritall="true"/>
</target>
<target name="updateEAR" depends="updateLib">
<antcall target="createEAR" inheritall="true"/>
</target>
<!-- Update JBoss Server -->
<target name="updateJBoss" depends="updateEAR" if="isAppsJBoss"
description="Update JBoss Application Server">
<!-- Copy -->
<echo message="AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
<!-- Deploy in exploded format for faster startup time -->
<unjar dest="${ADEMPIERE_APPS_DEPLOY}/adempiere.ear" src="${basedir}/lib/adempiere.ear" overwrite="true">
</unjar>
</target>
<!-- ==================================================== -->
<!-- Setup JBoss Server -->
<!-- ==================================================== -->
<target name="setupJBoss" depends="setupEAR" if="isAppsJBoss"
description="Setup JBoss Application Server">
<!-- Filter JBoss Templates Conf -->
<copy file="${basedir}/jboss/server/adempiere/conf/jboss-serviceTemplate.xml" tofile="${basedir}/jboss/server/adempiere/conf/jboss-service.xml" filtering="yes" overwrite="yes" />
<copy file="${basedir}/jboss/server/adempiere/conf/login-configTemplate.xml" tofile="${basedir}/jboss/server/adempiere/conf/login-config.xml" filtering="yes" overwrite="yes" />
<!-- Filter JBoss Templates HTTP Invoker -->
<copy file="${basedir}/jboss/server/adempiere/deploy/http-invoker.sar/META-INF/jboss-serviceTemplate.xml" tofile="${basedir}/jboss/server/adempiere/deploy/http-invoker.sar/META-INF/jboss-service.xml" filtering="yes" overwrite="yes" />
<!-- Filter Tomcat 5.5 -->
<copy file="${basedir}/jboss/server/adempiere/deploy/jbossweb-tomcat55.sar/serverTemplate.xml" tofile="${basedir}/jboss/server/adempiere/deploy/jbossweb-tomcat55.sar/server.xml" filtering="yes" overwrite="yes" />
<!-- Delete Old -->
<delete file="${basedir}/jboss/server/adempiere/lib/CClient.jar" failonerror="no" />
<delete file="${basedir}/jboss/server/adempiere/lib/CSTools.jar" failonerror="no" />
<delete file="${basedir}/jboss/server/adempiere/lib/CServer.jar" failonerror="no" />
<delete file="${basedir}/jboss/server/adempiere/lib/oracle.jar" failonerror="no" />
<!-- Copy -->
<echo message="AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
<!-- Deploy in exploded format for faster startup time -->
<unjar dest="${ADEMPIERE_APPS_DEPLOY}/adempiere.ear" src="${basedir}/lib/adempiere.ear" overwrite="true">
</unjar>
</target>
<!-- ==================================================== -->
<!-- Setup Tomcat Server -->
<!-- ==================================================== -->
<target name="setupTomcat" depends="setupLib, setupEAR" if="isAppsTomcat"
description="Setup Tomcat Web Container">
<!-- Should delete but needed if you change your mind
<delete file="lib/RUN_Adempiere.bat" failonerror="false" />
<delete file="lib/RUN_Adempiere.sh" failonerror="false" />
<delete dir="utils" failonerror="false" />
-->
<echo message="AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
<!-- Filter conf/server.xml -->
<copy file="lib/tomcatServerTemplate.xml"
tofile="${ADEMPIERE_APPS_DEPLOY}/conf/server.xml" filtering="yes" overwrite="yes" />
<!-- Copy to /shared/lib -->
<copy file="${basedir}/lib/Adempiere.jar"
todir="${ADEMPIERE_APPS_DEPLOY}/shared/lib" />
<copy file="${basedir}/lib/AdempiereSLib.jar"
todir="${ADEMPIERE_APPS_DEPLOY}/shared/lib" />
<copy file="${basedir}/lib/adempiereApps.jar"
todir="${ADEMPIERE_APPS_DEPLOY}/shared/lib" />
<copy file="${basedir}/lib/j2ee.jar"
todir="${ADEMPIERE_APPS_DEPLOY}/shared/lib" />
<!-- Copy to /webapps and rename for context -->
<delete file="${ADEMPIERE_APPS_DEPLOY}/webapps/adempiere.war" failonerror="no" />
<delete dir="${ADEMPIERE_APPS_DEPLOY}/webapps/adempiere" failonerror="no" />
<copy file="${basedir}/lib/adempiereApps.war"
tofile="${ADEMPIERE_APPS_DEPLOY}/webapps/adempiere.war" overwrite="yes" />
<delete file="${ADEMPIERE_APPS_DEPLOY}/webapps/wstore.war" failonerror="no" />
<delete dir="${ADEMPIERE_APPS_DEPLOY}/webapps/wstore" failonerror="no" />
<copy file="${basedir}/lib/adempiereWebStore.war"
tofile="${ADEMPIERE_APPS_DEPLOY}/webapps/wstore.war" overwrite="yes" />
<echo message="----------------------------------------------------------" />
<echo message="This is a dedicated Web Container Configuration - You canNOT run the Application (RUN_Adempiere) locally! - Use WebStart from your primary Application Server!" />
<echo message="----------------------------------------------------------" />
</target>
<!-- ==================================================== -->
<!-- Update J2EE Server -->
<!-- ==================================================== -->
<target name="updateDeploy" depends="updateJBoss"
description="Update Adempiere Application Server">
<echo message="AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
</target>
<!-- ==================================================== -->
<!-- Deploy J2EE Server -->
<!-- ==================================================== -->
<target name="setupDeploy" depends="setupJBoss, setupTomcat"
description="Deploy Adempiere Application Server">
<echo message="AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
</target>
<!-- ==================================================== -->
<!-- Update (Main) -->
<!-- ==================================================== -->
<target name="update" depends="updateDeploy"
description="Update Adempiere Deployment">
</target>
<!-- ==================================================== -->
<!-- Setup (Main) -->
<!-- ==================================================== -->
<target name="setup" depends="setupDeploy"
description="Setup Adempiere">
</target>
<!-- ==================================================== -->
<!-- Test - Copy -->
<!-- ==================================================== -->
<target name="testsystemCopy"
description="Copy Adempiere to Test System">
<delete dir="lib" />
<delete dir="jboss" />
<delete dir="log" />
<unzip src="\\\\Dev1\\Adempiere\\Install\\Adempiere_253d.zip"
overwrite="true" />
</target>
<!-- ==================================================== -->
<!-- Test - Import DB -->
<!-- ==================================================== -->
<target name="testsystemImport" depends="setup"
description="Import Adempiere DB">
<exec command="${basedir}/lib/RUN_AdempiereImport" />
</target>
<!-- ==================================================== -->
<!-- Test - Setup -->
<!-- ==================================================== -->
<target name="testsystemSetup" depends="testsystemCopy, testsystemImport"
description="Set up Test System">
</target>
<!-- ==================================================== -->
<!-- Shutting down server, setting up adempiere and importing database -->
<!-- ==================================================== -->
<target name="cleanall" description="shutdown,settingup and importing database">
<echo message="================Adempiere Server Shutdown ===================" />
<echo message="OS = ${os.name}" />
<!-- Shutting down server by calling the RUN_Stop.bat or RUN_Stop.sh script in Adempiere dir -->
<exec dir="${env.ADEMPIERE_HOME}\utils" executable="cmd" os="Windows XP, Windows 2000, Windows NT" >
<arg line="/c RUN_Stop.bat"/>
</exec>
<exec dir="${env.ADEMPIERE_HOME}\utils" executable="/bin/sh" os="SunOS,unix">
<arg value="-c" />
<arg value="RUN_Stop.sh" />
</exec>
<echo message="================Adempiere Server Shutdown Complete===================" />
<sleep seconds="2"/>
<!-- Deleting all the log files, jboss dir and log dir in ${env.ADEMPIERE_HOME} directory -->
<delete>
<fileset dir="${env.ADEMPIERE_HOME}" includes="*.log" />
</delete>
<delete dir="${env.ADEMPIERE_HOME}\jboss" />
<delete dir="${env.ADEMPIERE_HOME}\log" />
<echo message="=========== ftp to nas and download the current build==============="/>
<ftp action= "get"
server="${server}"
userid="guest"
password="">
<fileset dir="${env.ADEMPIERE_HOME}">
<include name="**/Adempiere_253d.zip"/>
</fileset>
</ftp>
<!-- unzip and overwrite them and delete the downloaded directory -->
<unzip src="${env.ADEMPIERE_HOME}/Disk 1/Adempiere_253a.zip" dest="${env.ADEMPIERE_HOME}\..\" overwrite="yes" />
<delete dir="${env.ADEMPIERE_HOME}/Disk 1"/>
<echo message="======================Setup adempiere==============================" />
<ant inheritAll="false" dir="${env.ADEMPIERE_HOME}" target="setup"/>
<!-- Importing the database -->
<exec dir="${env.ADEMPIERE_HOME}\utils" executable="cmd" os="Windows XP, Windows 2000, Windows NT" >
<arg line="/c RUN_ImportAdempiere.bat"/>
</exec>
<exec dir="${env.ADEMPIERE_HOME}\utils" executable="/bin/sh" os="SunOS,unix">
<arg value="-c" />
<arg value="RUN_ImportAdempiere.sh" />
</exec>
</target>
</project>