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>
<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>
2007-01-12 16:16:28 +07:00
<!-- rebuild Adempiere.jar to include possible customization and patches -->
<target name= "setupALib" depends= "setupInit" >
<mkdir dir= "buildALib" />
2007-01-12 20:53:44 +07:00
<!-- pack patches.jar and customization.jar into Adempiere.jar -->
2007-01-12 16:16:28 +07:00
<unjar src= "lib/Adempiere.jar" dest= "buildALib" />
<unjar src= "lib/patches.jar" dest= "buildALib" />
<unjar src= "lib/customization.jar" dest= "buildALib" />
2007-03-12 15:09:30 +07:00
2007-01-12 16:16:28 +07:00
<jar jarfile= "lib/Adempiere.jar" index= "yes" >
<fileset dir= "buildALib" />
2007-03-12 15:09:30 +07:00
<indexjars >
<pathelement path= "lib/AdempiereCLib.jar" />
<pathelement path= "lib/CompiereJasperReqs.jar" />
</indexjars>
2007-01-12 16:16:28 +07:00
<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>
2007-01-12 20:53:44 +07:00
<!-- Sign Adempiere Jar -->
<copy file= "lib/Adempiere.jar" tofile= "buildALib/Adempiere1.jar" overwrite= "yes" />
<signjar jar= "buildALib/Adempiere1.jar" alias= "${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file= "buildALib/Adempiere1.jar" tofile= "lib/Adempiere.jar" overwrite= "yes" />
2007-02-19 13:24:43 +07:00
2007-04-11 20:37:33 +07:00
<!-- Sign patches Jar -->
<copy file= "lib/patches.jar" tofile= "buildALib/patches1.jar" overwrite= "yes" />
<signjar jar= "buildALib/patches1.jar" alias= "${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file= "buildALib/patches1.jar" tofile= "lib/patches.jar" overwrite= "yes" />
<!-- Sign customization Jar -->
<copy file= "lib/customization.jar" tofile= "buildALib/customization1.jar" overwrite= "yes" />
<signjar jar= "buildALib/customization1.jar" alias= "${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file= "buildALib/customization1.jar" tofile= "lib/customization.jar" overwrite= "yes" />
2007-01-12 16:16:28 +07:00
<delete dir= "buildALib" />
</target>
2006-11-17 10:09:16 +07:00
<!-- ==================================================== -->
<!-- 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" />
2007-02-15 15:06:46 +07:00
2006-11-17 10:09:16 +07:00
<mkdir dir= "buildCLib" />
<unjar src= "lib/CCTools.jar" dest= "buildCLib" />
2007-02-15 15:06:46 +07:00
<!-- begin vpj - cd e - evolution -->
2006-11-17 10:09:16 +07:00
<!-- unjar src="lib/${ADEMPIERE_DB_TYPE}.jar" dest="buildCLib" / -->
2007-02-15 15:06:46 +07:00
<unjar src= "lib/oracle.jar" dest= "buildCLib" />
<unjar src= "lib/postgresql.jar" dest= "buildCLib" />
2006-12-02 00:14:01 +07:00
<!-- end vpj - cd e - evolution -->
2007-04-09 21:10:18 +07:00
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}" />
2006-12-19 11:50:12 +07:00
<attribute name= "Implementation-Vendor" value= "Adempiere, Inc." />
2006-11-17 10:09:16 +07:00
<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}" />
<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" />
<!-- Selected Database -->
2006-12-28 01:30:36 +07:00
<!-- begin vpj - cd e - evolution -->
2006-11-17 10:09:16 +07:00
<!-- unjar src="lib/${ADEMPIERE_DB_TYPE}.jar" dest="buildSLib" / -->
2006-12-28 01:30:36 +07:00
<unjar src= "lib/oracle.jar" dest= "buildSLib" />
<unjar src= "lib/postgresql.jar" dest= "buildSLib" />
<!-- end vpj - cd e - evolution -->
2007-04-09 21:10:18 +07:00
2007-01-20 02:32:07 +07:00
<!-- adding the specific CompiereJasper libs -->
<unjar src= "lib/CompiereJasperReqs.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}" />
2006-12-19 11:50:12 +07:00
<attribute name= "Implementation-Vendor" value= "Adempiere, Inc." />
2006-11-17 10:09:16 +07:00
<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" />
2007-01-20 02:32:07 +07:00
<!-- Sign CompiereJasperReqs.jar for Java Web Start -->
<signjar jar= "lib/CompiereJasperReqs.jar" alias= "${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
2007-01-12 20:53:44 +07:00
</target>
<!-- Sign other application jars -->
<target name= "signOtherJars" depends= "setupInit" >
2006-11-17 10:09:16 +07:00
<!-- Sign AdempiereRoot Jar -->
2007-01-12 20:53:44 +07:00
<copy file= "lib/adempiereRoot.jar" tofile= "lib/adempiereRoot1.jar" overwrite= "yes" />
<signjar jar= "lib/adempiereRoot1.jar" alias= "${ADEMPIERE_KEYSTORECODEALIAS}"
2006-11-17 10:09:16 +07:00
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
2007-01-12 20:53:44 +07:00
<copy file= "lib/adempiereRoot1.jar" tofile= "lib/adempiereRoot.jar" overwrite= "yes" />
<delete file= "lib/adempiereRoot1.jar" />
2006-11-17 10:09:16 +07:00
<!-- Sign AdempiereApps Jar -->
2007-01-12 20:53:44 +07:00
<copy file= "lib/adempiereApps.jar" tofile= "lib/adempiereApps1.jar" overwrite= "yes" />
<signjar jar= "lib/adempiereApps1.jar" alias= "${ADEMPIERE_KEYSTORECODEALIAS}"
2006-11-17 10:09:16 +07:00
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
2007-01-12 20:53:44 +07:00
<copy file= "lib/adempiereApps1.jar" tofile= "lib/adempiereApps.jar" overwrite= "yes" />
<delete file= "lib/adempiereApps1.jar" />
2006-11-17 10:09:16 +07:00
</target>
<!-- ==================================================== -->
<!-- Setup Lib -->
<!-- ==================================================== -->
2007-03-12 15:09:30 +07:00
<target name= "setupLib" depends= "setupInit, setupWin, setupNonWin, setupCLib, setupSLib, setupALib, signOtherJars"
2006-11-17 10:09:16 +07:00
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"
2007-04-11 20:37:33 +07:00
includes="Adempiere.exe,*.ico,customization.jar,patches.jar,CompiereJasperReqs.jar,Adempiere.jar,AdempiereCLib.jar,adempiereDirect.jnlp,index.html,*.0" />
2006-11-17 10:09:16 +07:00
</zip>
<!-- Save properties -->
<copy file= "AdempiereEnv.properties"
tofile="AdempiereEnv.properties.save" />
<copy file= "Adempiere.properties"
tofile="Adempiere.properties.save" />
</target>
2007-01-12 20:53:44 +07:00
<!-- 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"
2007-04-11 20:37:33 +07:00
includes="Adempiere.exe,*.ico,customization.jar,patches.jar,CompiereJasperReqs.jar,Adempiere.jar,AdempiereCLib.jar,adempiereDirect.jnlp,index.html,*.0" />
2007-01-12 20:53:44 +07:00
</zip>
</target>
2006-11-17 10:09:16 +07:00
2007-01-12 20:53:44 +07:00
<target name= "createEAR" >
2006-11-17 10:09:16 +07:00
<!-- Create adempiereRoot war -->
<zip destfile= "${basedir}/lib/adempiereRoot.war" >
<!-- copy Base -->
<zipfileset src= "${basedir}/lib/adempiereRootBase.war" />
<!-- copy to adempiereHome -->
<zipfileset dir= "${basedir}/lib"
2007-01-20 02:32:07 +07:00
includes="AdempiereClient.zip,Adempiere.jar,AdempiereCLib.jar,*.jnlp,*.0,*.html,CompiereJasperReqs.jar,CompiereJasper.jar"
2006-11-17 10:09:16 +07:00
prefix="adempiereHome" />
</zip>
<!-- Create adempiereWebCM war -->
<zip destfile= "${basedir}/lib/adempiereWebCM.war" >
<!-- copy Base -->
<zipfileset src= "${basedir}/lib/adempiereWebCMbase.war" />
</zip>
2007-01-12 16:16:28 +07:00
<!-- 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" />
2006-11-17 10:09:16 +07:00
</ear>
</target>
2007-01-12 20:53:44 +07:00
<!-- ==================================================== -->
<!-- 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>
2006-11-17 10:09:16 +07:00
2007-01-12 20:53:44 +07:00
<!-- 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>
2006-11-17 10:09:16 +07:00
<!-- ==================================================== -->
<!-- Setup JBoss Server -->
<!-- ==================================================== -->
2007-01-12 20:53:44 +07:00
<target name= "setupJBoss" depends= "setupEAR" if= "isAppsJBoss"
2006-11-17 10:09:16 +07:00
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}" />
2007-01-12 16:16:28 +07:00
<!-- Deploy in exploded format for faster startup time -->
<unjar dest= "${ADEMPIERE_APPS_DEPLOY}/adempiere.ear" src= "${basedir}/lib/adempiere.ear" overwrite= "true" >
</unjar>
2006-11-17 10:09:16 +07:00
</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>
2007-01-12 20:53:44 +07:00
<!-- ==================================================== -->
<!-- Update J2EE Server -->
<!-- ==================================================== -->
<target name= "updateDeploy" depends= "updateJBoss"
description="Update Adempiere Application Server">
<echo message= "AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
</target>
2006-11-17 10:09:16 +07:00
<!-- ==================================================== -->
<!-- Deploy J2EE Server -->
<!-- ==================================================== -->
<target name= "setupDeploy" depends= "setupJBoss, setupTomcat"
description="Deploy Adempiere Application Server">
<echo message= "AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
</target>
2007-01-12 20:53:44 +07:00
<!-- ==================================================== -->
<!-- Update (Main) -->
<!-- ==================================================== -->
<target name= "update" depends= "updateDeploy"
description="Update Adempiere Deployment">
</target>
2006-11-17 10:09:16 +07:00
<!-- ==================================================== -->
<!-- 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>
2006-12-28 01:30:36 +07:00
</project>