ADempiere Customization The purpose of this discussion is to teach you how to customize and deploy customization for ADempiere.
Customization Demo
Your browser does not support the video tag. Download the video
Complex Customization including ZK or WebUI Changes
ZK customizations can be more tricky to deploy. Here is a sample build script/project that you can use to incorporate more complex customization.
Most of the magic is demonstrated in the below build.xml file.
<!-- ============================================= -->
<!-- Start -->
<!-- ============================================= -->
<project name="eltherm" default="dist" basedir=".">
<description>
</description>
<property file="build.properties"/>
<!-- set global properties for this build -->
<property name="src" value="."/>
<property name="zksrc" value="zkwebui/src"/>
<property name="zktheme" value="zkwebui/theme"/>
<property name="zkimages" value="zkwebui/images"/>
<property name="build.dir" value="build"/>
<property name="zkbuild.dir" value="zkbuild"/>
<property name="rootbuild.dir" value="rootbuild"/>
<property name="dist.dir" value="deploy"/>
<property name="jar.name" value="customization"/>
<property name="zkjar.name" value="zkcustomization"/>
<property name="rootjar.name" value="rootcustomization"/>
<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>
<!-- set path to include the necessary jar files for javac -->
<path id="project.class.path">
<pathelement path="${build.dir}" />
<pathelement path="./lib/commons-net-2.0.jar" />
<pathelement path="./lib/ftp4che-0.7.1.jar" />
<pathelement path="./lib/jel.jar" />
<pathelement path="./lib/swingx-1.6.jar" />
<pathelement path="./lib/jasperreports-3.7.3.jar" />
<pathelement path="./lib/javaee.jar" />
<pathelement path="./lib/jsch-0.1.41.jar" />
<pathelement path="./lib/commons-httpclient.jar" />
<pathelement path="${jar.path}/Adempiere.jar" />
<pathelement path="${jar.path}/adempiereRoot.jar" />
<pathelement path="${jar.path}/CSTools.jar" />
<pathelement path="${jar.path}/../jboss/client/jbossall-client.jar" />
<pathelement path="${jar.path}/../zkwebui/WEB-INF/lib/zk.jar" />
<pathelement path="${jar.path}/../zkwebui/WEB-INF/lib/zcommon.jar" />
<pathelement path="${jar.path}/../zkwebui/WEB-INF/lib/zul.jar" />
<pathelement path="${jar.path}/../zkwebui/WEB-INF/lib/zhtml.jar" />
<pathelement path="${jar.path}/../zkwebui/WEB-INF/lib/zkex.jar" />
<pathelement path="${jar.path}/../zkwebui/WEB-INF/lib/zweb.jar" />
<pathelement path="${jar.path}/../zkwebui/WEB-INF/classes" />
<pathelement path="${jar.path}/../tools/lib/javaee.jar" />
<pathelement path="${jar.path}/../packages/liberoMFG.jar" />
<pathelement path="${rootbuild.dir}" />
</path>
<target name="init" description="initialization target">
<echo message="=========== Build eltherm"/>
<echo message="jar path =${jar.path}"/>
<!-- create the time stamp -->
<tstamp/>
<!--Delete Build directories if exist -->
<delete dir="${zkbuild.dir}"/>
<delete dir="${build.dir}"/>
<!-- create the build directory structure used by compile -->
<mkdir dir="${build.dir}"/>
<mkdir dir="${zkbuild.dir}"/>
<mkdir dir="${rootbuild.dir}"/>
<mkdir dir="${zkbuild.dir}/WEB-INF/classes"/>
<!-- check for the distribution directory -->
<available file="${dist.dir}" type="dir" property="dist.dir.exists"/>
</target>
<target name="makedir" depends="init" unless="dist.dir.exists">
<!-- create the distribution directory if not available -->
<mkdir dir="${dist}/${dist.dir}"/>
</target>
<target name="compile" depends="makedir">
<!-- compile the java code from ${src} into ${build.dir} -->
<javac srcdir="${src}" destdir="${build.dir}" deprecation="on" debug="on" target="1.6">
<classpath refid="project.class.path"/>
</javac>
<!-- copy all image & sound files from src to the build directory -->
<copy todir="${build.dir}">
<fileset dir="${src}/base/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>
<fileset dir="${src}/extend/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>
<fileset dir="${src}/client/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>
<!--
<fileset dir="${src}/reports">
<include name="**/*.jasper"/>
<include name="**/*.jrxml"/>
</fileset>
-->
</copy>
<!-- compile the java code from ${src} into ${build.dir} -->
<javac srcdir="${src}/serverRoot/src/main/server" destdir="${rootbuild.dir}" deprecation="on" debug="on" target="1.6">
<classpath refid="project.class.path"/>
</javac>
<copy todir="${rootbuild.dir}">
<fileset dir="${src}/serverRoot/src/main/server">
<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>
<!-- compile the zk code from ${zksrc} into ${zkbuild.dir} -->
<javac srcdir="${zksrc}" destdir="${zkbuild.dir}/WEB-INF/classes" deprecation="on" debug="on" target="1.6">
<classpath refid="project.class.path"/>
</javac>
<!-- copy all image & sound files from src to the build directory -->
<copy todir="${zkbuild.dir}">
<fileset dir="${zksrc}">
<include name="**/images/*"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
<include name="**/*.png"/>
<include name="**/*.wav"/>
<include name="**/*.htm"/>
<include name="**/*.html"/>
<include name="**/*.properties"/>
<exclude name="**/package.html"/>
</fileset>
</copy>
<copy todir="${zkbuild.dir}/theme">
<fileset dir="${zktheme}">
<include name="**/default/*"/>
<include name="**/default/css/*"/>
<include name="**/default/images/*"/>
</fileset>
</copy>
<copy todir="${zkbuild.dir}/images">
<fileset dir="${zkimages}">
<include name="**/images/*"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
<include name="**/*.png"/>
<include name="**/*.wav"/>
<include name="**/*.htm"/>
<include name="**/*.html"/>
<include name="**/*.properties"/>
<exclude name="**/package.html"/>
</fileset>
</copy>
</target>
<!-- =========================================== -->
<!-- Distribution -->
<!-- =========================================== -->
<target name="dist" depends="compile">
<!-- put everything from ${build.dir} into the ${jar.name}.jar file -->
<jar jarfile="${dist.dir}/${jar.name}.jar" basedir="${build.dir}">
</jar>
<jar jarfile="${dist.dir}/${zkjar.name}.jar" basedir="${zkbuild.dir}">
</jar>
<jar jarfile="${dist.dir}/${rootjar.name}.jar" basedir="${rootbuild.dir}">
</jar>
</target>
<target name="clean">
<!-- Delete the ${build.dir} directory trees -->
<delete dir="${build.dir}"/>
<delete dir="${zkbuild.dir}"/>
<delete dir="${rootbuild.dir}"/>
<delete file="${dist.dir}/${zkjar.name}.jar" failonerror="false"/>
<delete file="${dist.dir}/${jar.name}.jar" failonerror="false"/>
<delete file="${dist.dir}/${rootjar.name}.jar" failonerror="false"/>
</target>
</project>