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" />
|
|
|
|
|
2007-06-04 23:26:14 +07:00
|
|
|
<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>
|
|
|
|
|
2006-11-17 10:09:16 +07:00
|
|
|
<!-- ==================================================== -->
|
|
|
|
<!-- 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" />
|
2008-01-31 06:46:23 +07:00
|
|
|
<available file="lib/AdempiereOriginal.jar" type="file" property="adempiereOriginal.exists"/>
|
2006-11-17 10:09:16 +07:00
|
|
|
<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>
|
2008-10-24 16:15:53 +07:00
|
|
|
<condition property="isAppsGlassfish">
|
2008-11-11 06:54:09 +07:00
|
|
|
<equals arg1="glassfish" arg2="${ADEMPIERE_APPS_TYPE}" />
|
2008-10-24 16:15:53 +07:00
|
|
|
</condition>
|
2008-11-11 06:54:09 +07:00
|
|
|
<echo message="Windows=${isWindows} JBoss=${isAppsJBoss} Glassfish=${isAppsGlassfish}" />
|
2006-11-17 10:09:16 +07:00
|
|
|
|
|
|
|
</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>
|
|
|
|
|
2008-01-31 06:46:23 +07:00
|
|
|
<target name="backupAdempiereOriginal" unless="adempiereOriginal.exists">
|
|
|
|
<copy file="lib/Adempiere.jar" tofile="lib/AdempiereOriginal.jar" overwrite="yes" />
|
|
|
|
</target>
|
2007-01-12 16:16:28 +07:00
|
|
|
<!-- rebuild Adempiere.jar to include possible customization and patches -->
|
2008-01-31 06:46:23 +07:00
|
|
|
<target name="setupALib" depends="setupInit, backupAdempiereOriginal">
|
2008-11-11 06:54:09 +07:00
|
|
|
<delete file="lib/packages.jar" failonerror="false"/>
|
|
|
|
<jar jarfile="lib/packages.jar" duplicate="preserve">
|
|
|
|
<!-- 2pack packages -->
|
|
|
|
<zipgroupfileset dir="packages" includes="**/lib/*.jar">
|
|
|
|
<patternset refid="manifest.exclude"/>
|
|
|
|
</zipgroupfileset>
|
|
|
|
</jar>
|
2007-10-02 23:17:51 +07:00
|
|
|
<jar jarfile="lib/Adempiere1.jar" index="yes" duplicate="preserve">
|
2007-06-04 23:26:14 +07:00
|
|
|
<!-- 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"/>
|
2008-01-31 06:46:23 +07:00
|
|
|
</zipfileset>
|
|
|
|
<!-- posterita packages -->
|
2008-10-21 22:25:07 +07:00
|
|
|
<zipfileset src="lib/posterita.jar" >
|
2008-01-31 06:46:23 +07:00
|
|
|
<patternset refid="manifest.exclude"/>
|
2008-10-21 22:25:07 +07:00
|
|
|
</zipfileset>
|
2007-08-24 09:19:02 +07:00
|
|
|
<!-- 2pack packages -->
|
2008-11-11 06:54:09 +07:00
|
|
|
<zipfileset src="lib/packages.jar" >
|
2007-08-24 09:19:02 +07:00
|
|
|
<patternset refid="manifest.exclude"/>
|
2008-11-11 06:54:09 +07:00
|
|
|
</zipfileset>
|
2008-01-31 06:46:23 +07:00
|
|
|
<zipfileset src="lib/AdempiereOriginal.jar" >
|
2007-06-04 23:26:14 +07:00
|
|
|
<patternset refid="manifest.exclude"/>
|
|
|
|
</zipfileset>
|
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 -->
|
2007-06-04 23:26:14 +07:00
|
|
|
<signjar jar="lib/Adempiere1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
|
2007-01-12 20:53:44 +07:00
|
|
|
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
|
2007-06-04 23:26:14 +07:00
|
|
|
<copy file="lib/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 -->
|
2007-06-04 23:26:14 +07:00
|
|
|
<copy file="lib/patches.jar" tofile="lib/patches1.jar" overwrite="yes" />
|
|
|
|
<signjar jar="lib/patches1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
|
2007-04-11 20:37:33 +07:00
|
|
|
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
|
2007-06-04 23:26:14 +07:00
|
|
|
<copy file="lib/patches1.jar" tofile="lib/patches.jar" overwrite="yes" />
|
2007-04-11 20:37:33 +07:00
|
|
|
|
|
|
|
<!-- Sign customization Jar -->
|
2007-06-04 23:26:14 +07:00
|
|
|
<copy file="lib/customization.jar" tofile="lib/customization1.jar" overwrite="yes" />
|
|
|
|
<signjar jar="lib/customization1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
|
2007-04-11 20:37:33 +07:00
|
|
|
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
|
2007-06-04 23:26:14 +07:00
|
|
|
<copy file="lib/customization1.jar" tofile="lib/customization.jar" overwrite="yes" />
|
2007-04-11 20:37:33 +07:00
|
|
|
|
2007-06-04 23:26:14 +07:00
|
|
|
<!-- clean up -->
|
|
|
|
<delete file="lib/Adempiere1.jar"/>
|
|
|
|
<delete file="lib/patches1.jar"/>
|
|
|
|
<delete file="lib/customization1.jar"/>
|
2007-01-12 16:16:28 +07:00
|
|
|
</target>
|
|
|
|
|
2006-11-17 10:09:16 +07:00
|
|
|
<!-- ==================================================== -->
|
|
|
|
<!-- Adempiere Client Lib -->
|
|
|
|
<!-- ==================================================== -->
|
2008-11-11 06:54:09 +07:00
|
|
|
<target name="setupCLib" depends="setupInit"
|
2006-11-17 10:09:16 +07:00
|
|
|
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
|
|
|
<!-- Create AdempiereCLib.jar file -->
|
2007-06-04 23:26:14 +07:00
|
|
|
<jar jarfile="lib/AdempiereCLib.jar" index="yes" duplicate="preserve">
|
2008-11-11 06:54:09 +07:00
|
|
|
<zipfileset src="lib/${ADEMPIERE_APPS_TYPE}.jar" >
|
|
|
|
<patternset refid="manifest.exclude"/>
|
|
|
|
</zipfileset>
|
2007-06-04 23:26:14 +07:00
|
|
|
<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"/>
|
2008-11-11 06:54:09 +07:00
|
|
|
</zipfileset>
|
2007-06-04 23:26:14 +07:00
|
|
|
|
2006-11-17 10:09:16 +07:00
|
|
|
<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}" />
|
|
|
|
|
|
|
|
</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 -->
|
2007-06-04 23:26:14 +07:00
|
|
|
<jar jarfile="lib/AdempiereSLib.jar" index="yes" duplicate="preserve">
|
2008-11-11 06:54:09 +07:00
|
|
|
<zipfileset src="lib/CSTools.jar">
|
2007-06-04 23:26:14 +07:00
|
|
|
<patternset refid="manifest.exclude"/>
|
2008-11-11 06:54:09 +07:00
|
|
|
<exclude name="**/*.bsh"/>
|
2007-06-04 23:26:14 +07:00
|
|
|
</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>
|
2006-11-17 10:09:16 +07:00
|
|
|
<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>
|
|
|
|
|
2008-11-11 06:54:09 +07:00
|
|
|
<antcall target="jbossEAR" inheritall="true"/>
|
|
|
|
<antcall target="glassfishEAR" inheritall="true"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="jbossEAR" if="isAppsJBoss">
|
2007-01-12 16:16:28 +07:00
|
|
|
<!-- bundle everything in one ear file for simpler deployment -->
|
2008-11-11 06:54:09 +07:00
|
|
|
<ear destfile="${basedir}/lib/adempiere.ear" appxml="${basedir}/lib/adempiereAll.xml" >
|
2007-01-12 16:16:28 +07:00
|
|
|
<fileset dir="${basedir}/lib"
|
2008-10-24 16:15:53 +07:00
|
|
|
includes="Adempiere.jar,AdempiereSLib.jar,adempiereRoot.jar,adempiereApps.jar,adempiereApps.war,adempiereRoot.war,adempiereWebStore.war,adempiereWebCM.war,posterita.war,posterita.jar,webui.war" />
|
|
|
|
</ear>
|
2008-11-11 06:54:09 +07:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="glassfishEAR" if="isAppsGlassfish">
|
|
|
|
|
|
|
|
<unzip src="${basedir}/lib/webui.war" dest="${basedir}/lib/webui"/>
|
|
|
|
<copy file="${basedir}/lib/webui/WEB-INF/web-2.5.xml" tofile="${basedir}/lib/webui/WEB-INF/web.xml" overwrite="true" />
|
|
|
|
<delete file="${basedir}/lib/webui.war"/>
|
|
|
|
<zip destfile="${basedir}/lib/webui.war" basedir="${basedir}/lib/webui" />
|
|
|
|
<deltree dir="${basedir}/lib/webui"/>
|
|
|
|
|
|
|
|
<!-- bundle everything in one ear file for simpler deployment -->
|
|
|
|
<ear destfile="${basedir}/lib/adempiere.ear" appxml="${basedir}/lib/adempiereAll.xml" >
|
2008-10-24 16:15:53 +07:00
|
|
|
<fileset dir="${basedir}/lib"
|
2008-11-11 06:54:09 +07:00
|
|
|
includes="adempiereRoot.jar,adempiereApps.jar,adempiereApps.war,adempiereRoot.war,adempiereWebStore.war,adempiereWebCM.war,posterita.war,posterita.jar,webui.war" />
|
|
|
|
<metainf dir="${basedir}/glassfish" includes="sun-application.xml"/>
|
2006-11-17 10:09:16 +07:00
|
|
|
</ear>
|
|
|
|
</target>
|
2008-11-11 06:54:09 +07:00
|
|
|
|
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>
|
|
|
|
|
2008-10-24 16:15:53 +07:00
|
|
|
<!-- ==================================================== -->
|
|
|
|
<!-- Setup Glassfish (Sun Application Server) -->
|
|
|
|
<!-- ==================================================== -->
|
|
|
|
<target name="setupGlassfish" depends="setupLib, setupEAR" if="isAppsGlassfish"
|
|
|
|
description="Setup Glassfish Application Server">
|
2008-11-11 06:54:09 +07:00
|
|
|
<copy file="${basedir}/lib/adempiere.ear" tofile="${basedir}/glassfish/adempiere.ear"/>
|
|
|
|
<copy file="${basedir}/lib/Adempiere.jar" tofile="${basedir}/glassfish/Adempiere.jar"/>
|
|
|
|
<copy file="${basedir}/lib/AdempiereSLib.jar" tofile="${basedir}/glassfish/AdempiereSLib.jar"/>
|
2008-10-24 16:15:53 +07:00
|
|
|
</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" />
|
|
|
|
|
2008-11-11 06:54:09 +07:00
|
|
|
<!-- Filter Tomcat 6.0 -->
|
|
|
|
<copy file="${basedir}/jboss/server/adempiere/deploy/jboss-web.deployer/serverTemplate.xml" tofile="${basedir}/jboss/server/adempiere/deploy/jboss-web.deployer/server.xml" filtering="yes" overwrite="yes" />
|
2006-11-17 10:09:16 +07:00
|
|
|
|
|
|
|
<!-- 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>
|
|
|
|
|
|
|
|
|
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 -->
|
|
|
|
<!-- ==================================================== -->
|
2008-11-11 06:54:09 +07:00
|
|
|
<target name="setupDeploy" depends="setupJBoss, setupGlassfish"
|
2006-11-17 10:09:16 +07:00
|
|
|
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>
|