2006-11-17 10:09:16 +07:00
<!-- ====================================================== -->
<!-- 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" />
<!-- ==================================================== -->
<!-- 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>
<condition property= "isPostgresql80" >
<equals arg1= "postgresql80" arg2= "${ADEMPIERE_DB_TYPE}" />
</condition>
<condition property= "isPostgresql81" >
<equals arg1= "postgresql81" arg2= "${ADEMPIERE_DB_TYPE}" />
</condition>
<echo message= "Windows=${isWindows} JBoss=${isAppsJBoss} Tomcat=${isAppsTomcat}" />
</target>
<!-- ==================================================== -->
<!-- unpack Postgresql db dump for postgresql 8.0 -->
<!-- Kinamo (pelgrim) -->
<!-- ==================================================== -->
<target name= "InitDBdumppg80" depends= "setupInit" if= "isPostgresql80"
description="Deploy Database dump postgresql 8.0">
<unjar src= "data/adempiere310_pgsql80.jar" dest= "data" />
</target>
<!-- ==================================================== -->
<!-- unpack Postgresql db dump for postgresql 8.1 -->
<!-- Kinamo (pelgrim) -->
<!-- ==================================================== -->
<target name= "InitDBdumppg81" depends= "setupInit" if= "isPostgresql81"
description="Deploy Database dump postgresql 8.1">
<unjar src= "data/adempiere310_pgsql81.jar" dest= "data" />
</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>
<!-- ==================================================== -->
<!-- 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" />
<delete file= "lib/jPDFPrinter.jar" failonerror= "no" />
<mkdir dir= "buildCLib" />
<unjar src= "lib/CCTools.jar" dest= "buildCLib" />
<unjar src= "lib/freepdf.jar" dest= "buildCLib" />
<!-- begin vpj - cd e - evolution -->
<!-- unjar src="lib/${ADEMPIERE_DB_TYPE}.jar" dest="buildCLib" / -->
<unjar src= "lib/oracle.jar" dest= "buildCLib" />
<unjar src= "lib/postgresql.jar" dest= "buildCLib" />
<unjar src= "lib/db2.jar" dest= "buildCLib" />
2006-12-02 00:14:01 +07:00
<!-- end vpj - cd e - evolution -->
<unjar src= "lib/fyracle.jar" dest= "buildCLib" />
2006-11-17 10:09:16 +07:00
<unjar src= "lib/${ADEMPIERE_APPS_TYPE}.jar" dest= "buildCLib" />
<!-- Create AdempiereCLib.jar file -->
<jar jarfile= "lib/AdempiereCLib.jar" index= "yes" >
<fileset dir= "buildCLib" />
<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= "ComPiere, 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}" />
<!-- Sign Adempiere Jar -->
<copy file= "lib/Adempiere.jar" tofile= "buildCLib/Adempiere1.jar" overwrite= "yes" />
<signjar jar= "buildCLib/Adempiere1.jar" alias= "${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file= "buildCLib/Adempiere1.jar" tofile= "lib/Adempiere.jar" overwrite= "yes" />
<delete dir= "buildCLib" />
</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" />
<mkdir dir= "buildSLib" />
<unjar src= "lib/CSTools.jar" dest= "buildSLib" />
<unjar src= "lib/freepdf.jar" dest= "buildSLib" />
<!-- Selected Database -->
<!-- begin vpj - cd e - evolution -->
<!-- unjar src="lib/${ADEMPIERE_DB_TYPE}.jar" dest="buildSLib" / -->
<unjar src= "lib/oracle.jar" dest= "buildSLib" />
<unjar src= "lib/postgresql.jar" dest= "buildSLib" />
<unjar src= "lib/db2.jar" dest= "buildSLib" />
<!-- end vpj - cd e - evolution -->
2006-12-02 00:14:01 +07:00
<unjar src= "lib/fyracle.jar" dest= "buildSLib" />
2006-11-17 10:09:16 +07:00
<!-- Create AdempiereSLib.jar file -->
<jar jarfile= "lib/AdempiereSLib.jar" index= "yes" >
<fileset dir= "buildSLib" />
<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= "ComPiere, 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 AdempiereRoot Jar -->
<signjar jar= "lib/adempiereRoot.jar" alias= "${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<!-- Sign AdempiereApps Jar -->
<signjar jar= "lib/adempiereApps.jar" alias= "${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
</target>
<!-- ==================================================== -->
<!-- Setup Lib -->
<!-- ==================================================== -->
<target name= "setupLib" depends= "setupInit, setupWin, setupNonWin, setupCLib, setupSLib"
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,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>
<!-- ==================================================== -->
<!-- Setup EAR Libraries -->
<!-- ==================================================== -->
<target name= "setupEAR" depends= "setupLib"
description="Setup Adempiere EAR Libraries">
<!-- 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"
prefix="adempiereHome" />
</zip>
<!-- Build adempiereRoot ear -->
<ear destfile= "${basedir}/lib/adempiereRoot.ear" appxml= "${basedir}/lib/adempiereRoot.xml" >
<fileset dir= "${basedir}/lib" includes= "adempiereRoot.jar,adempiereRoot.war,Adempiere.jar,AdempiereSLib.jar" />
<manifest >
<attribute name= "Specification-Title" value= "AdempiereRoot" />
<attribute name= "Specification-Version" value= "${ADEMPIERE_MAIN_VERSION}" />
<attribute name= "Specification-Vendor" value= "Adempiere" />
<attribute name= "Implementation-Title" value= "AdempiereRoot" />
<attribute name= "Implementation-Version" value= "${ADEMPIERE_MAIN_VERSION} ${DSTAMP}-${TSTAMP}" />
<attribute name= "Implementation-URL" value= "http://www.adempiere.org" />
<attribute name= "Class-Path" value= "adempiereRoot.jar Adempiere.jar AdempiereSLib.jar" />
</manifest>
</ear>
<!-- Build adempiereApps ear -->
<ear destfile= "${basedir}/lib/adempiereApps.ear" appxml= "${basedir}/lib/adempiereApps.xml" >
<fileset dir= "${basedir}/lib" includes= "adempiereApps.jar,adempiereApps.war,Adempiere.jar,AdempiereSLib.jar" />
<manifest >
<attribute name= "Specification-Title" value= "AdempiereApps" />
<attribute name= "Specification-Version" value= "${ADEMPIERE_MAIN_VERSION}" />
<attribute name= "Specification-Vendor" value= "Adempiere" />
<attribute name= "Implementation-Title" value= "AdempiereApps" />
<attribute name= "Implementation-Version" value= "${ADEMPIERE_MAIN_VERSION} ${DSTAMP}-${TSTAMP}" />
<attribute name= "Implementation-URL" value= "http://www.adempiere.org" />
<attribute name= "Class-Path" value= "Adempiere.jar AdempiereSLib.jar adempiereApps.jar" />
</manifest>
</ear>
<!-- Build adempiereWebStore ear -->
<ear destfile= "${basedir}/lib/adempiereWebStore.ear" appxml= "${basedir}/lib/adempiereWebStore.xml" >
<fileset dir= "${basedir}/lib" includes= "adempiereWebStore.war,Adempiere.jar,AdempiereSLib.jar,adempiereApps.jar" />
<manifest >
<attribute name= "Specification-Title" value= "AdempiereWebStore" />
<attribute name= "Specification-Version" value= "${ADEMPIERE_MAIN_VERSION}" />
<attribute name= "Specification-Vendor" value= "Adempiere" />
<attribute name= "Implementation-Title" value= "AdempiereWebStore" />
<attribute name= "Implementation-Version" value= "${ADEMPIERE_MAIN_VERSION} ${DSTAMP}-${TSTAMP}" />
<attribute name= "Implementation-URL" value= "http://www.adempiere.org" />
<attribute name= "Class-Path" value= "Adempiere.jar AdempiereSLib.jar adempiereApps.jar" />
</manifest>
</ear>
<!-- Create adempiereWebCM war -->
<zip destfile= "${basedir}/lib/adempiereWebCM.war" >
<!-- copy Base -->
<zipfileset src= "${basedir}/lib/adempiereWebCMbase.war" />
<!-- copy to adempiereHome -->
<zipfileset dir= "${basedir}/lib"
includes="Adempiere.jar,AdempiereSLib.jar"
prefix="WEB-INF/lib" />
</zip>
<!-- Build adempiereWebCM ear -->
<ear destfile= "${basedir}/lib/adempiereWebCM.ear" appxml= "${basedir}/lib/adempiereWebCM.xml" >
<fileset dir= "${basedir}/lib" includes= "adempiereWebCM.war" />
<manifest >
<attribute name= "Specification-Title" value= "AdempiereWebCM" />
<attribute name= "Specification-Version" value= "${ADEMPIERE_MAIN_VERSION}" />
<attribute name= "Specification-Vendor" value= "Adempiere" />
<attribute name= "Implementation-Title" value= "AdempiereWebCM" />
<attribute name= "Implementation-Version" value= "${ADEMPIERE_MAIN_VERSION} ${DSTAMP}-${TSTAMP}" />
<attribute name= "Implementation-URL" value= "http://www.adempiere.org" />
<attribute name= "Class-Path" value= "Adempiere.jar AdempiereSLib.jar" />
</manifest>
</ear>
</target>
<!-- ==================================================== -->
<!-- Setup JBoss Server -->
<!-- ==================================================== -->
<target name= "setupJBoss" depends= "setupLib, 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/jPDFPrinter.jar" failonerror= "no" />
<delete file= "${basedir}/jboss/server/adempiere/lib/oracle.jar" failonerror= "no" />
<!-- Copy -->
<echo message= "AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
<copy file= "${basedir}/lib/adempiereRoot.ear" todir= "${ADEMPIERE_APPS_DEPLOY}" />
<copy file= "${basedir}/lib/adempiereApps.ear" todir= "${ADEMPIERE_APPS_DEPLOY}" />
<copy file= "${basedir}/lib/adempiereWebStore.ear" todir= "${ADEMPIERE_APPS_DEPLOY}" />
<copy file= "${basedir}/lib/adempiereWebCM.ear" todir= "${ADEMPIERE_APPS_DEPLOY}" />
</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>
<!-- ==================================================== -->
<!-- Deploy J2EE Server -->
<!-- ==================================================== -->
<target name= "setupDeploy" depends= "setupJBoss, setupTomcat"
description="Deploy Adempiere Application Server">
<echo message= "AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
</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>