OFBiz部署与运行

下载及部署命令:http://ofbiz.apache.org/download.html

OFBiz的安装部署是基于ant的,官网的案例是执行load-demo任务和start任务。以下分析是以12.04版本为案例。

OFBizant任务解读

  • ./build.xml

load-demo<-build<-ofbiz-init】 

ofbiz-init】设置env变量 

build】 

framework/build.xml(框架库的编译和打包,既包括sqlserver等,也包括startwebtools等) 
applications/build.xmlofbiz各模块的编译和打包) 
specialpurpose/build.xml(模块定制和封装) 
hot-deploy下的所有build.xml(目录为空) 

antcall:clean-svninfo 

load-demo】 

jar ofbiz.jar install 

start】启动ofbiz.jar 

其他任务简介(只列出部分比较重要的): 

 

target

description

refresh

Clean all and rebuild

clean-all

Clean all DB, Catalina and caches data, logs, and runtime subdirectories and all specific files like .rej, .orig

docs-all

For committers : Build all javadoc into one tree for easier viewing by the community

start

Start OFBiz

start-batch

Start OFBiz as a separate process

start-debug

Start OFBiz in debugging mode

stop

Stop OFBiz

status

Display status of OFBiz

load-demo

Load all data; meant for generic OFBiz development, testing, demonstration, etc purposes

load-demo-multitenant

Load all data needed for the multi-tenancy demonstration. Caution: this creates three databases, with each one loaded with all demo data.

load-seed

Load ONLY the seed data (not seed-initial, demo, ext* or anything else); meant for use after an update of the code to reload the seed data as it is generally maintained along with the code and needs to be in sync for operation

load-extseed

Load seed, seed-initial and ext data; meant for manual/generic testing, development, or going into production with a derived system based on stock OFBiz where the ext data basically replaces the demo data

load-readers

Load data using the command line argument data-readers that takes a comma separated list of readers (seed, seed-initial, demo, ext, ext-test, ext-demo). On Windows XP (at least) you need top wrap the parameters in double-quotes. For instance: ant load-readers "-Ddata-readers=seed,seed-initial,ext"

load-file

Load data using the command line argument 'data-file' to load data from a given file using the 'default' delegator or a delegator specified in the command line argument 'delegator'

load-tenant

Load data using tenantId, syntax eg: ant load-tenant -DtenantId=DEMO1 (needs multitenant=Y in general.properties)

load-all-tenants

Load data for all tenants, syntax eg: ant load-all-tenants (needs multitenant=Y in general.properties)

run-tests

Run a single test suite, syntax eg: ant run-test-suite -Dtest.component=mycomponent -Dtest.suiteName=mytests

 

  • common.xml

最终命令见macros.xml 

 

  • macros.xml

iterate遍历子目录执行操作 

javac16(依赖default-javac)指定java编译器 

default-javadoc生成javadoc 

main-jar打包成运行用的jar包 

test-jar打包成测试用的jar包 

default-groovyc编译器 

ofbiz-javacc语法编译器 

ofbiz-jjtree语法树 

yuicompressor压缩js等代码资源 

原文地址:https://www.cnblogs.com/syjkfind/p/4857111.html