* Improve build performance

- remove unnecessary unjar
This commit is contained in:
Heng Sin Low 2007-06-04 16:26:14 +00:00
parent ad72056739
commit d27f8e5790
2 changed files with 83 additions and 57 deletions

View File

@ -13,6 +13,14 @@
<property name="envFile" value="AdempiereEnv.properties" /> <property name="envFile" value="AdempiereEnv.properties" />
<property name="server" value="nas" /> <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 --> <!-- Init -->
<!-- ==================================================== --> <!-- ==================================================== -->
@ -112,15 +120,17 @@
<!-- rebuild Adempiere.jar to include possible customization and patches --> <!-- rebuild Adempiere.jar to include possible customization and patches -->
<target name="setupALib" depends="setupInit"> <target name="setupALib" depends="setupInit">
<mkdir dir="buildALib" /> <jar jarfile="lib/Adempiere1.jar" index="yes" duplicate="preserve">
<!-- pack patches.jar and customization.jar into Adempiere.jar --> <!-- pack patches.jar and customization.jar into Adempiere.jar -->
<unjar src="lib/Adempiere.jar" dest="buildALib" /> <zipfileset src="lib/customization.jar" >
<unjar src="lib/patches.jar" dest="buildALib" /> <patternset refid="manifest.exclude"/>
<unjar src="lib/customization.jar" dest="buildALib" /> </zipfileset>
<zipfileset src="lib/patches.jar" >
<jar jarfile="lib/Adempiere.jar" index="yes"> <patternset refid="manifest.exclude"/>
<fileset dir="buildALib" /> </zipfileset>
<zipfileset src="lib/Adempiere.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<indexjars> <indexjars>
<pathelement path="lib/AdempiereCLib.jar"/> <pathelement path="lib/AdempiereCLib.jar"/>
<pathelement path="lib/CompiereJasperReqs.jar"/> <pathelement path="lib/CompiereJasperReqs.jar"/>
@ -139,24 +149,26 @@
</jar> </jar>
<!-- Sign Adempiere Jar --> <!-- Sign Adempiere Jar -->
<copy file="lib/Adempiere.jar" tofile="buildALib/Adempiere1.jar" overwrite="yes" /> <signjar jar="lib/Adempiere1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
<signjar jar="buildALib/Adempiere1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" /> storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file="buildALib/Adempiere1.jar" tofile="lib/Adempiere.jar" overwrite="yes" /> <copy file="lib/Adempiere1.jar" tofile="lib/Adempiere.jar" overwrite="yes" />
<!-- Sign patches Jar --> <!-- Sign patches Jar -->
<copy file="lib/patches.jar" tofile="buildALib/patches1.jar" overwrite="yes" /> <copy file="lib/patches.jar" tofile="lib/patches1.jar" overwrite="yes" />
<signjar jar="buildALib/patches1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}" <signjar jar="lib/patches1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" /> storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file="buildALib/patches1.jar" tofile="lib/patches.jar" overwrite="yes" /> <copy file="lib/patches1.jar" tofile="lib/patches.jar" overwrite="yes" />
<!-- Sign customization Jar --> <!-- Sign customization Jar -->
<copy file="lib/customization.jar" tofile="buildALib/customization1.jar" overwrite="yes" /> <copy file="lib/customization.jar" tofile="lib/customization1.jar" overwrite="yes" />
<signjar jar="buildALib/customization1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}" <signjar jar="lib/customization1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" /> storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file="buildALib/customization1.jar" tofile="lib/customization.jar" overwrite="yes" /> <copy file="lib/customization1.jar" tofile="lib/customization.jar" overwrite="yes" />
<delete dir="buildALib" /> <!-- clean up -->
<delete file="lib/Adempiere1.jar"/>
<delete file="lib/patches1.jar"/>
<delete file="lib/customization1.jar"/>
</target> </target>
<!-- ==================================================== --> <!-- ==================================================== -->
@ -170,19 +182,21 @@
<delete file="lib/CClient.jar" failonerror="no" /> <delete file="lib/CClient.jar" failonerror="no" />
<delete file="lib/CTools.jar" failonerror="no" /> <delete file="lib/CTools.jar" failonerror="no" />
<mkdir dir="buildCLib" />
<unjar src="lib/CCTools.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" />
<!--end vpj-cd e-evolution-->
<unjar src="lib/${ADEMPIERE_APPS_TYPE}.jar" dest="buildCLib" />
<!-- Create AdempiereCLib.jar file --> <!-- Create AdempiereCLib.jar file -->
<jar jarfile="lib/AdempiereCLib.jar" index="yes"> <jar jarfile="lib/AdempiereCLib.jar" index="yes" duplicate="preserve">
<fileset dir="buildCLib" /> <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> <manifest>
<attribute name="Specification-Title" value="Adempiere Client Library" /> <attribute name="Specification-Title" value="Adempiere Client Library" />
<attribute name="Specification-Version" value="${ADEMPIERE_MAIN_VERSION}" /> <attribute name="Specification-Version" value="${ADEMPIERE_MAIN_VERSION}" />
@ -199,7 +213,6 @@
<signjar jar="lib/AdempiereCLib.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}" <signjar jar="lib/AdempiereCLib.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" /> storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<delete dir="buildCLib" />
</target> </target>
<!-- ==================================================== --> <!-- ==================================================== -->
@ -212,22 +225,20 @@
<delete file="lib/AdempiereSLib.jar" failonerror="no" /> <delete file="lib/AdempiereSLib.jar" failonerror="no" />
<delete file="lib/CServer.jar" failonerror="no" /> <delete file="lib/CServer.jar" failonerror="no" />
<mkdir dir="buildSLib" />
<unjar src="lib/CSTools.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" />
<!--end vpj-cd e-evolution-->
<!-- adding the specific CompiereJasper libs -->
<unjar src="lib/CompiereJasperReqs.jar" dest="buildSLib" />
<!-- Create AdempiereSLib.jar file --> <!-- Create AdempiereSLib.jar file -->
<jar jarfile="lib/AdempiereSLib.jar" index="yes"> <jar jarfile="lib/AdempiereSLib.jar" index="yes" duplicate="preserve">
<fileset dir="buildSLib" /> <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> <manifest>
<attribute name="Specification-Title" value="Adempiere Server Library" /> <attribute name="Specification-Title" value="Adempiere Server Library" />
<attribute name="Specification-Version" value="${ADEMPIERE_MAIN_VERSION}" /> <attribute name="Specification-Version" value="${ADEMPIERE_MAIN_VERSION}" />

View File

@ -38,6 +38,13 @@
<pathelement path="../tools/lib/ant-launcher.jar"/> <pathelement path="../tools/lib/ant-launcher.jar"/>
</path> </path>
<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 --> <!-- Init -->
<!-- ======================================================= --> <!-- ======================================================= -->
@ -71,18 +78,26 @@
</fileset> </fileset>
</copy> </copy>
<!-- extract Ant (with ftp) files -->
<unjar src="../tools/lib/ant.jar" dest="${compile.dir}" />
<unjar src="../tools/lib/ant-launcher.jar" dest="${compile.dir}" />
<unjar src="../tools/lib/ant-commons-net.jar" dest="${compile.dir}" />
<unjar src="../tools/lib/commons-net-1.4.0.jar" dest="${compile.dir}" />
<delete file="${compile.dir}/META-INF/MANIFEST.MF" failonerror="false"/>
<!-- put everything into the $CInstall.jar file --> <!-- put everything into the $CInstall.jar file -->
<jar <jar
jarfile="CInstall.jar" jarfile="CInstall.jar"
basedir="${compile.dir}" index="yes"
index="yes"> duplicate="preserve">
<fileset dir="${compile.dir}"/>
<!-- Ant (with ftp) files -->
<zipfileset src="../tools/lib/ant.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="../tools/lib/ant-launcher.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="../tools/lib/ant-commons-net.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="../tools/lib/commons-net-1.4.0.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<manifest> <manifest>
<attribute name="Specification-Title" value="CInstall"/> <attribute name="Specification-Title" value="CInstall"/>
<attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}"/> <attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}"/>