340 lines
14 KiB
XML
340 lines
14 KiB
XML
<!-- ============================================= -->
|
|
<!-- Tools -->
|
|
<!-- ============================================= -->
|
|
<!-- $Header: /cvs/adempiere/tools/build.xml,v 1.4 2006/07/03 23:23:31 jjanke Exp $ -->
|
|
|
|
<project name="tools" default="toolsDistribution" basedir=".">
|
|
|
|
<description>
|
|
The resulting CCTools.jar and CSTools.jar
|
|
repackage all third party libraries
|
|
in a single jar for simplified start and version control.
|
|
The resuling Server CSTools.jar is added to EARs
|
|
</description>
|
|
|
|
<!-- set global properties for this build -->
|
|
<property name="src" value="src"/>
|
|
<property name="build.dir" value="build"/>
|
|
<property name="buildClient.dir" value="build/Client"/>
|
|
<property name="buildServer.dir" value="build/Server"/>
|
|
<property name="buildJBoss.dir" value="build/JBoss"/>
|
|
<property name="buildOracle.dir" value="build/Oracle"/>
|
|
<property name="buildDerby.dir" value="build/Derby"/>
|
|
<property name="buildPostgreSQL.dir" value="build/PostgreSQL"/>
|
|
<property name="jboss.dir" value="../jboss"/>
|
|
<property name="dist.dir" value="../lib"/>
|
|
<!--<property environment="env"/>-->
|
|
<import file="../utils_dev/properties.xml"/>
|
|
|
|
<!-- set path to include the necessary jar files for javac -->
|
|
<path id="project.class.path">
|
|
<pathelement path="${classpath}"/>
|
|
<pathelement path="lib/jstl.jar"/>
|
|
<pathelement path="lib/jsp-api.jar"/>
|
|
<pathelement path="lib/servlet-api.jar"/>
|
|
<pathelement path="lib/standard.jar"/>
|
|
</path>
|
|
|
|
|
|
<!-- ============================================= -->
|
|
<!-- Init -->
|
|
<!-- ============================================= -->
|
|
<target name="toolsInit"
|
|
description="initialization target">
|
|
<echo message="=========== Build Tools ${env.ADEMPIERE_VERSION}"/>
|
|
<!-- create the time stamp -->
|
|
<tstamp/>
|
|
<!-- create the build directory structure used by compile -->
|
|
<mkdir dir="${build.dir}"/>
|
|
<mkdir dir="${buildClient.dir}"/>
|
|
<mkdir dir="${buildServer.dir}"/>
|
|
<mkdir dir="${buildJBoss.dir}"/>
|
|
<mkdir dir="${buildOracle.dir}"/>
|
|
<mkdir dir="${buildDerby.dir}"/>
|
|
<mkdir dir="${buildPostgreSQL.dir}"/>
|
|
<!-- check for the distribution directory -->
|
|
<mkdir dir="${dist.dir}"/>
|
|
|
|
<uptodate property="jars.uptodate" targetfile="${dist.dir}/CCTools.jar">
|
|
<srcfiles dir="${src}" includes="**/*.java"/>
|
|
</uptodate>
|
|
</target>
|
|
|
|
|
|
<!-- ============================================= -->
|
|
<!-- Compile ECS -->
|
|
<!-- ============================================= -->
|
|
<target name="toolsCompile" depends="toolsInit" unless="jars.uptodate">
|
|
<!-- compile the java code from ${src} into ${build.dir}S -->
|
|
<javac srcdir="${src}"
|
|
destdir="${build.dir}" deprecation="on" debug="on">
|
|
<classpath refid="project.class.path"/>
|
|
</javac>
|
|
<!-- copy all image & sound files from src to the build directory -->
|
|
<copy todir="${build.dir}">
|
|
<fileset dir="${src}">
|
|
<include name="**/images/*"/>
|
|
<include name="**/*.gif"/>
|
|
<include name="**/*.jpg"/>
|
|
<include name="**/*.wav"/>
|
|
<include name="**/*.htm"/>
|
|
<include name="**/*.html"/>
|
|
<include name="**/*.properties"/>
|
|
<exclude name="**/package.html"/>
|
|
</fileset>
|
|
</copy>
|
|
</target>
|
|
|
|
|
|
<!-- ============================================= -->
|
|
<!-- Buld Apps Server Client Jars -->
|
|
<!-- ============================================= -->
|
|
<target name="toolsAppsServer" depends="toolsCompile"
|
|
unless="jars.uptodate"
|
|
description="Create JBoss Client jar">
|
|
|
|
<!-- JBoss Client -->
|
|
<unjar src="${jboss.dir}/client/jboss-client.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
|
<unjar src="${jboss.dir}/client/jboss-common-client.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
|
<unjar src="${jboss.dir}/client/jboss-j2ee.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
|
<unjar src="${jboss.dir}/client/jbosssx-client.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
|
<unjar src="${jboss.dir}/client/jnp-client.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
|
<unjar src="${jboss.dir}/client/jmx-invoker-adaptor-client.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
|
<unjar src="${jboss.dir}/client/jboss-transaction-client.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
|
<!-- Clean up -->
|
|
<delete>
|
|
<fileset dir="${buildJBoss.dir}" includes="build.xml"/>
|
|
<fileset dir="${buildJBoss.dir}/META-INF" casesensitive="no" includes="*.mf,*.sf,*.rsa,*.dsa"/>
|
|
</delete>
|
|
|
|
<!-- Create jboss.jar file -->
|
|
<jar jarfile="${dist.dir}/jboss.jar">
|
|
<fileset dir="${buildJBoss.dir}"/>
|
|
<manifest>
|
|
<attribute name="Specification-Title" value="Adempiere JBoss Client"/>
|
|
<attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}"/>
|
|
<attribute name="Specification-Vendor" value="Adempiere, Inc."/>
|
|
<attribute name="Implementation-Title" value="jboss ${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"/>
|
|
</manifest>
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
<!-- ============================================= -->
|
|
<!-- Buld Database Jars -->
|
|
<!-- ============================================= -->
|
|
<target name="toolsDatabase" depends="toolsCompile"
|
|
unless="jars.uptodate"
|
|
description="Create db jars">
|
|
|
|
<!-- Oracle Lib -->
|
|
<unjar src="lib/ojdbc14.jar" dest="${buildOracle.dir}"/>
|
|
<unjar src="lib/ocrs12.jar" dest="${buildOracle.dir}"/>
|
|
<!-- Clean up -->
|
|
<delete>
|
|
<fileset dir="${buildOracle.dir}" includes="build.xml"/>
|
|
<fileset dir="${buildOracle.dir}/META-INF" casesensitive="no" includes="*.mf,*.sf,*.rsa,*.dsa"/>
|
|
</delete>
|
|
|
|
<!-- Create oracle.jar file -->
|
|
<jar jarfile="${dist.dir}/oracle.jar">
|
|
<fileset dir="${buildOracle.dir}"/>
|
|
<manifest>
|
|
<attribute name="Specification-Title" value="Oracle JDBC"/>
|
|
<attribute name="Specification-Version" value="10g"/>
|
|
<attribute name="Specification-Vendor" value="Oracle"/>
|
|
<attribute name="Implementation-Title" value="oracle ${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.org"/>
|
|
</manifest>
|
|
</jar>
|
|
|
|
<!-- Derby Lib -->
|
|
<unjar src="../derby/derbyclient.jar" dest="${buildDerby.dir}"/>
|
|
|
|
<!-- Clean up -->
|
|
|
|
<!-- Create derby.jar file -->
|
|
<jar jarfile="${dist.dir}/derby.jar">
|
|
<fileset dir="${buildDerby.dir}"/>
|
|
<manifest>
|
|
<attribute name="Specification-Title" value="Derby DB - IBM"/>
|
|
<attribute name="Specification-Version" value="10.1.2.1"/>
|
|
<attribute name="Specification-Vendor" value="IBM"/>
|
|
<attribute name="Implementation-Title" value="Derby ${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.org"/>
|
|
</manifest>
|
|
</jar>
|
|
|
|
<!-- PostgreSQL Lib -->
|
|
<unjar src="lib/postgresql.jar" dest="${buildPostgreSQL.dir}"/>
|
|
|
|
<!-- Clean up -->
|
|
|
|
<!-- Create postgresql.jar file -->
|
|
<jar jarfile="${dist.dir}/postgresql.jar">
|
|
<fileset dir="${buildPostgreSQL.dir}"/>
|
|
<manifest>
|
|
<attribute name="Specification-Title" value="PostgreSQL JDBC"/>
|
|
<attribute name="Specification-Version" value="postgresql"/>
|
|
<attribute name="Specification-Vendor" value="postgresql"/>
|
|
<attribute name="Implementation-Title" value="postgresql ${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.org"/>
|
|
</manifest>
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
|
<!-- ============================================= -->
|
|
<!-- Buld Server Jar -->
|
|
<!-- ============================================= -->
|
|
<target name="toolsServer" depends="toolsCompile"
|
|
unless="jars.uptodate"
|
|
description="Create CSTools.jar">
|
|
|
|
<!-- Unjar libraries for CSTools ***** -->
|
|
<!-- JSTL -->
|
|
<unjar src="lib/jstl.jar" dest="${buildServer.dir}" />
|
|
<unjar src="lib/standard.jar" dest="${buildServer.dir}" />
|
|
<!-- ECS, etc -->
|
|
<copy todir="${buildServer.dir}/org/apache/ecs">
|
|
<fileset dir="${build.dir}/org/apache/ecs" />
|
|
</copy>
|
|
<!-- Payment Processors -->
|
|
<unjar src="lib/Verisign.jar" dest="${buildServer.dir}" />
|
|
<unjar src="lib/jpayment.jar" dest="${buildServer.dir}" />
|
|
<!-- Log4J, jnlp -->
|
|
<unjar src="lib/log4j.jar" dest="${buildServer.dir}"/>
|
|
<unjar src="lib/jnlp.jar" dest="${buildServer.dir}"/>
|
|
<!-- Barcode, ftp -->
|
|
<unjar src="lib/barbecue-1.0.6d.jar" dest="${buildServer.dir}"/>
|
|
<unjar src="lib/commons-net-1.4.0.jar" dest="${buildServer.dir}"/>
|
|
|
|
<!-- Derby Server -->
|
|
<unjar src="../derby/derby.jar" dest="${buildServer.dir}"/>
|
|
<unjar src="../derby/derbynet.jar" dest="${buildServer.dir}"/>
|
|
<unjar src="../derby/derbytools.jar" dest="${buildServer.dir}"/>
|
|
<!-- Adempiere look and feel -->
|
|
<unjar src="lib/looks-2.0.4.jar" dest="${buildServer.dir}"/>
|
|
<!-- PDF -->
|
|
<unjar src="lib/jpedal.jar" dest="${buildServer.dir}"/>
|
|
<unjar src="lib/itext-1.4.8.jar" dest="${buildServer.dir}"/>
|
|
|
|
|
|
<!-- Clean up -->
|
|
<delete>
|
|
<fileset dir="${buildServer.dir}" includes="build.xml"/>
|
|
<fileset dir="${buildServer.dir}/META-INF" casesensitive="no" includes="*.mf,*.sf,*.rsa,*.dsa"/>
|
|
</delete>
|
|
|
|
<!-- Create CSTools jar -->
|
|
<jar jarfile="${dist.dir}/CSTools.jar">
|
|
<fileset dir="${buildServer.dir}" />
|
|
<manifest>
|
|
<attribute name="Specification-Title" value="Adempiere Server Tools"/>
|
|
<attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}"/>
|
|
<attribute name="Specification-Vendor" value="Adempiere, Inc."/>
|
|
<attribute name="Implementation-Title" value="CSTools ${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.org"/>
|
|
</manifest>
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
<!-- ============================================= -->
|
|
<!-- Buld Client Jar -->
|
|
<!-- ============================================= -->
|
|
<target name="toolsClient" depends="toolsCompile"
|
|
unless="jars.uptodate"
|
|
description="Create CCTools.jar">
|
|
|
|
<!-- Unjar libraries for CCTools ***** -->
|
|
<!-- Mail -->
|
|
<unjar src="lib/activation.jar" dest="${buildClient.dir}" />
|
|
<unjar src="lib/mail.jar" dest="${buildClient.dir}" />
|
|
<!-- Bean Shell -->
|
|
<unjar src="lib/bsh-1.3.0.jar" dest="${buildClient.dir}" />
|
|
<!-- Payment Processors -->
|
|
<unjar src="lib/Verisign.jar" dest="${buildClient.dir}" />
|
|
<unjar src="lib/jpayment.jar" dest="${buildClient.dir}" />
|
|
<!-- Log4J, jnlp -->
|
|
<unjar src="lib/log4j.jar" dest="${buildClient.dir}"/>
|
|
<unjar src="lib/jnlp.jar" dest="${buildClient.dir}"/>
|
|
<!-- Barcode, ftp -->
|
|
<unjar src="lib/barbecue-1.0.6d.jar" dest="${buildClient.dir}"/>
|
|
<unjar src="lib/commons-net-1.4.0.jar" dest="${buildClient.dir}"/>
|
|
<!-- JFreeChart -->
|
|
<unjar src="lib/jfreechart-1.0.2.jar" dest="${buildClient.dir}"/>
|
|
<unjar src="lib/jcommon-1.0.5.jar" dest="${buildClient.dir}"/>
|
|
<!-- Graph -->
|
|
<unjar src="lib/jgraph.jar" dest="${buildClient.dir}"/>
|
|
<!-- Adempeire Look and Feal -->
|
|
<unjar src="lib/looks-2.0.4.jar" dest="${buildClient.dir}"/>
|
|
<!-- jars for 2pack -->
|
|
<unjar src="lib/ant.jar" dest="${buildClient.dir}"/>
|
|
<unjar src="lib/xercesImpl.jar" dest="${buildClient.dir}"/>
|
|
<!-- PDF -->
|
|
<unjar src="lib/jpedal.jar" dest="${buildClient.dir}"/>
|
|
<unjar src="lib/itext-1.4.8.jar" dest="${buildClient.dir}"/>
|
|
|
|
<!-- Clean up -->
|
|
<delete>
|
|
<fileset dir="${buildClient.dir}" includes="build.xml"/>
|
|
<fileset dir="${buildClient.dir}/META-INF" casesensitive="no" includes="*.mf,*.sf,*.rsa,*.dsa"/>
|
|
</delete>
|
|
|
|
<!-- Create CCTools.jar file -->
|
|
<jar jarfile="${dist.dir}/CCTools.jar">
|
|
<fileset dir="${buildServer.dir}" includes="**/ecs/**" />
|
|
<fileset dir="${buildClient.dir}"/>
|
|
<manifest>
|
|
<attribute name="Specification-Title" value="Adempiere Client Tools"/>
|
|
<attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}"/>
|
|
<attribute name="Specification-Vendor" value="Adempiere, Inc."/>
|
|
<attribute name="Implementation-Title" value="CCTools ${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.org"/>
|
|
</manifest>
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
|
<!-- ============================================= -->
|
|
<!-- Buld Jars -->
|
|
<!-- ============================================= -->
|
|
<target name="toolsDistribution"
|
|
depends="toolsServer, toolsClient, toolsAppsServer, toolsDatabase"
|
|
unless="jars.uptodate"
|
|
description="Create jars">
|
|
|
|
</target>
|
|
|
|
|
|
<!-- ============================================= -->
|
|
<!-- Clean up -->
|
|
<!-- ============================================= -->
|
|
<target name="clean">
|
|
<!-- Delete the ${build.dir} directory trees -->
|
|
<delete dir="${build.dir}"/>
|
|
<delete file="${dist.dir}/CCTools.jar" failonerror="false"/>
|
|
<delete file="${dist.dir}/CSTools.jar" failonerror="false"/>
|
|
<delete file="${dist.dir}/jboss.jar" failonerror="false"/>
|
|
<delete file="${dist.dir}/oracle.jar" failonerror="false"/>
|
|
<delete file="${dist.dir}/derby.jar" failonerror="false"/>
|
|
</target>
|
|
|
|
</project>
|