1. ADempiere源码使用ant处理,所以很多子目录下都有一个build.xml文件。
2. 子目录下RUN_build.bat或者RUN_build.sh类似的文件只是ant的快捷调用方式。进过测试:直接使用ant xxx也是OK的。
3. 所有的build.xml共享同一个配置文件utils_dev\build.properties,可以根据自己情况自定修改该文件调整。
env.ADEMPIERE_SOURCE=${adempiere.base} env.ADEMPIERE_ROOT=${env.ADEMPIERE_SOURCE}/adempiere env.ADEMPIERE_HOME=${env.ADEMPIERE_ROOT}/Adempiere env.ADEMPIERE_INSTALL=${env.ADEMPIERE_SOURCE}/adempiere/install env.ADEMPIERE_VERSION=ADempiere env.ADEMPIERE_VERSION_FILE=360LTS env.ADEMPIERE_VENDOR=ADempiere env.ENCODING=UTF-8 env.XDOCLET_HOME=${env.ADEMPIERE_SOURCE}/tools env.ADEMPIERE_ENV=Y
4. ant install完成以后生产的文件在ADEMPIERE_HOME目录,压缩档在ADEMPIERE_INSTALL目录(zip和tar.gz两种格式)。这里的安装只是ADempiere将必要的一些文件复制到ADEMPIERE_HOME目录,要能够使用还需要执行RUN_setup.bat等一系列的动作。实质上就是生成安装文件,同网络上下载回来的一样。
该子项目会生产几个ADempiere共用的jar文件。
服务器jar文件:
/lib/jboss.jar (ADempiere习惯将多个jar文件打包成一个jar文件,下面缩进的内容表示该目的jar文件的内容来源) /jboss/client/jboss-ejb3x.jar /jboss/client/jboss-ejb3-client.jar /jboss/client/jbossall-client.jar /lib/glassfish.jar /glassfishfacet/lib/*.jar /tools/lib/javaee.jar
数据库jar文件:
/lib/oracle.jar /tools/lib/ojdbc6.jar /lib/postgresql.jar /tools/lib/postgresql.jar
CSTools.jar,原文是Build Server Jar,我理解为Compiere Server Tools,因为ADempiere是基于Compiere,所以ADempiere里面包含了很多Compiere的代码:
/lib/CSTools.jar /tools/META-INF/services/** <!-- JSTL --> /tools/lib/jstl.jar /tools/lib/standard.jar <!-- ECS --> /tools/src/**/apache/ecs/** <!-- Installing Script Based in JSR 223 Scripting APIs --> /tools/lib/script-api.jar <!-- BeanShell --> /tools/lib/bsh-2.0b5.jar /tools/lib/bsh-engine.jar <!-- Groovy --> /tools/lib/groovy-all-1.5.1.jar /tools/lib/groovy-engine.jar <!-- Groovy --> /tools/lib/jython.jar /tools/lib/jython-engine.jar <!-- Payment Processors --> /tools/lib/Verisign.jar /tools/lib/payflow.jar /tools/lib/miglayout-3.7.1-swing.jar /tools/lib/jpayment.jar <!-- Log4J, jnlp --> /tools/lib/commons-logging.jar /tools/lib/log4j.jar /tools/lib/jnlp.jar <!-- Barcode, ftp --> /tools/lib/barbecue-1.5-beta1.jar /tools/lib/commons-net-1.4.0.jar <!-- Adempiere look and feel --> /tools/lib/looks-2.0.4.jar <!-- PDF --> /tools/lib/jpedal.jar /tools/lib/iText-2.1.7.jar <!-- JFreeChart --> /tools/lib/jfreechart-1.0.13.jar /tools/lib/jcommon-1.0.16.jar <!-- JMS --> /tools/lib/activemq-core-5.0.0.jar <!-- C3P0 connection pool --> /tools/lib/c3p0-0.9.1.2.jar /tools/lib/c3p0-oracle-thin-extras-0.9.1.2.jar <!-- POI --> /tools/lib/poi-3.0.1-FINAL-20070705.jar <!-- CGLib --> /tools/lib/cglib.jar <!-- Commons --> /tools/lib/commons-collections-3.1.jar /tools/lib/commons-codec.jar <!-- jars for 2pack --> /tools/lib/ant.jar /tools/lib/xercesImpl.jar <!-- cron job --> /tools/lib/cron4j-2.2.1.jar
CCTools.jar,也就是Compiere Client Tools:
/lib/CCTools.jar /lib/META-INF/services/** /lib/src/**/apache/ecs/** <!-- Mail --> /tools/lib/mail.jar <!-- Installing Script Based in JSR 223 Scripting APIs --> /tools/lib/script-api.jar <!-- BeanShell --> /tools/lib/bsh-2.0b5.jar /tools/lib/bsh-engine.jar <!-- Groovy --> /tools/lib/groovy-all-1.5.1.jar /tools/lib/groovy-engine.jar <!-- Groovy --> /tools/lib/jython.jar /tools/lib/jython-engine.jar <!-- Payment Processors --> /tools/lib/Verisign.jar /tools/lib/payflow.jar /tools/lib/miglayout-3.7.1-swing.jar /tools/lib/jpayment.jar <!-- Log4J, jnlp --> /tools/lib/commons-logging.jar /tools/lib/log4j.jar /tools/lib/jnlp.jar <!-- Barcode, ftp --> /tools/lib/barbecue-1.5-beta1.jar /tools/lib/commons-net-1.4.0.jar <!-- JFreeChart --> /tools/lib/jfreechart-1.0.13.jar /tools/lib/jcommon-1.0.16.jar <!-- Graph --> /tools/lib/jgraph.jar <!-- Adempeire Look and Feal --> /tools/lib/looks-2.0.4.jar <!-- jars for 2pack --> /tools/lib/ant.jar /tools/lib/xercesImpl.jar <!-- PDF --> /tools/lib/jpedal.jar /tools/lib/iText-2.1.7.jar /tools/lib/swingx-1.6.jar <!-- JMS --> /tools/lib/activemq-core-5.0.0.jar <!-- C3P0 connection pool --> /tools/lib/c3p0-0.9.1.2.jar /tools/lib/c3p0-oracle-thin-extras-0.9.1.2.jar <!-- POI --> /tools/lib/poi-3.0.1-FINAL-20070705.jar <!-- Commons --> /tools/lib/commons-collections-3.1.jar /tools/lib/commons-codec.jar
该项目生成/base/Base.jar文件:
/base/Base.jar Sources: /base/src /glassfishfacet/src /jbossfacet/src ClassPath: /lib/CCTools.jar /lib/oracle.jar /lib/postgresql.jar /lib/jboss.jar /lib/glassfish.jar /tools/lib/junit.jar /tools/lib/j2ee.jar /tools/lib/jnlp.jar /tools/lib/servlet-api.jar /tools/lib/cron4j-2.2.1.jar
该项目生成/extend/Extend.jar文件:
/extend/Extend.jar Sources: /extend/src ClassPath: /lib/CCTools.jar /lib/jboss.jar /base/Base.jar
/tools/lib/junit.jar
/tools/lib/testing/*.jar
该项目生成/lib/Adempiere.jar文件。需要特别注意:Adempiere.jar文件额外还包含了另外三个项目的文件:base(/base/build),extend(/extend/build)和JasperReports(/JasperReports/CompiereJasper.jar)。
/lib/Adempiere.jar (额外还包含base, extend和JasperReports三个项目的文) Sources: /client/src ClassPath: /lib/CCTools.jar /base/Base.jar /extend/Extend.jar /lib/customization.jar /lib/patches.jar /lib/jcommon-1.0.16.jar /lib/jfreechart-1.0.13.jar /tools/lib/j2ee.jar /tools/lib/swinglabs-0.8.0.jar
该项目生成两个jar文件:/JasperReports/CompiereJasper.jar和/JasperReports/CompiereJasperReqs.jar,同时CompiereJasperReqs.jar被复制一份到/lib。
CompiereJasper.jar:
/JasperReports/CompiereJasper.jar Sources: /JasperReports/src ClassPath: /client/build /base/Base.jar /extend/Extend.jar /lib/CSTools.jar /lib/oracle.jar /JasperReportsTools/lib/jasperreports-3.7.3.jar /JasperReportsTools/lib/commons-digester-1.7.jar /JasperReportsTools/lib/commons-beanutils-1.7.jar /tools/lib/commons-logging.jar /tools/lib/xercesImpl.jar /tools/lib/xml-apis.jar /tools/lib/postgresql.jar /tools/lib/iText-2.1.7.jar /jboss/client/*.jar
CompiereJasperReqs.jar,该文件实质是JasperReports必需文件的一个重新打包:
/JasperReports/CompiereJasperReqs.jar /JasperReportsTools/lib/iReport.jar/it/businesslogic/ireport/barcode/*.class /JasperReportsTools/lib/iReport.jar/it/businesslogic/ireport/chart/*.class /JasperReportsTools/lib/iReport.jar/it/businesslogic/ireport/util/*.class /JasperReportsTools/lib/iReport.jar/it/businesslogic/ireport/*Element.class /JasperReportsTools/lib/iReport.jar/it/businesslogic/dtds/* /JasperReportsTools/lib/jasperreports-3.7.3.jar /JasperReportsTools/lib/commons-digester-1.7.jar /tools/lib/commons-logging.jar /JasperReportsTools/lib/commons-beanutils-1.7.jar /tools/lib/xercesImpl.jar /tools/lib/xml-apis.jar
该项目生成三个文件:/lib/adempiereRootBase.war, /lib/adempiereRoot.jar和/lib/adempiereRoot.xml。
/lib/adempiereRoot.jar /serverRoot/src/main /serverRoot/src/main/ejb/jboss.xml => META-INF/jboss.xml /serverRoot/src/main/ejb/sun-ejb-jar.xml => META-INF/sun-ejb-jar.xml ClassPath: /lib/Adempiere.jar /lib/CSTools.jar /lib/oracle.jar /lib/jboss.jar /lib/postgresql.jar /tools/lib/j2ee.jar /tools/lib/jnlp.jar /tools/lib/servlet-api.jar /tools/lib/mail.jar /tools/lib/bsh-1.3.0.jar /tools/lib/junit.jar /tools/lib/cron4j-2.2.1.jar /lib/adempiereRootBase.war <= /serverRoot/src/web /serverRoot/src/web/WEB-INF/web.xml => WEB-INF/web.xml /serverRoot/src/web/WEB-INF/lib => WEB-INF/lib /lib/adempiereRoot.xml <= /serverRoot/src/ear/application.xml
该项目生成三个文件:lib/adempiereApps.war, /lib/adempiereApps.jar和/lib/adempiereApps.xml。
/lib/adempiereApps.jar /serverApps/src/main ClassPath: /lib/Adempiere.jar /lib/CSTools.jar /tools/lib/servlet-api.jar /tools/lib/jsp-api.jar /lib/adempiereApps.war <= /serverApps/src/web /serverApps/src/web/WEB-INF/web.xml => WEB-INF/web.xml /serverApps/src/web/WEB-INF/lib => WEB-INF/lib /lib/adempiereApps.xml <= /serverApps/src/ear/application.xml
该项目生成两个文件:/lib/adempiereWebStore.war和/lib/adempiereWebStore.xml。
/lib/adempiereWebStore.war <= /webStore/src/web
/lib/adempiereWebStore.xml <= /webStore/src/ear/application.xml
该项目生成两个文件:/lib/adempiereWebCMbase.war和/lib/adempiereWebCM.xml
/lib/adempiereWebCMbase.war <= /webCM/src/web /webCM/src/main ClassPath: /lib/Adempiere.jar /lib/CSTools.jar /tools/lib/javaee.jar /lib/adempiereWebCM.xml <= /webCM/src/ear/application.xml
该项目生成一个文件:/lib/webui.war。
/lib/webui.war <= /zkwebui/** /zkwebui/WEB-INF/src ClassPath: /base/build /client/build /JasperReports/build /lib/*.jar /tools/lib/servlet-api.jar /zkwebui/WEB-INF/lib/*.jar /zkwebui/WEB-INF/lib/classes
这里的安装指的是创建安装文件,不是安装到目标系统。
首先,它会创建/lib/CInstall.jar文件。
/lib/CInstall.jar Sources: /install/src ClassPath: /lib/CCTools.jar /lib/Adempiere.jar /lib/oracle.jar /lib/postgresql.jar /tools/lib/ant.jar /tools/lib/ant-launcher.jar Includes: /tools/lib/ant.jar /tools/lib/ant-launcher.jar /tools/lib/ant-commons-net.jar /tools/lib/commons-net-1.4.0.jar
然后,将安装程序需要的所有文件都放到ADEMPIERE_HOME目录:
ADEMPIERE_HOME <= /install/Adempiere RUN_Adempiere.bat <= /utils/RUN_Adempiere.bat RUN_Adempiere.sh <= /utils/RUN_Adempiere.sh images <= /install/Adempiere/images packages liberoMFG/lib/liberoMFG.jar <= /packages/liberoMFG.jar liberoHR/lib/liberoHR.jar <= /packages/liberoHR.jar zkpackages liberoMFG/lib/liberozkMFG.jar <= /zkpackages/liberozkMFG.jar lib <= /lib CheckConflicts.sh <= /lib/CheckConflicts.sh Adempiere.ico <= /launch/Adempiere.ico Adempiere.ico <= /launch/Adempiere.ico Adempiere.exe <= /launch/Release/Adempiere.exe CInstall.jar <= /install/CInstall.jar sqlj.jar <= /sqlj/sqlj.jar CompiereJasperReqs.jar <= /JasperReports/CompiereJasperReqs.jar index.html utils <= /utils oracle postgresql oracleXE data jboss glassfish
最后,在ADEMPIERE_INSTALL目录创建安装压缩文件。