关于ofbiz加载数据模块的文件参数配置
2013-08-06 12:56
489 查看
1,在applications文件夹下新建一个数据模块meetingroom
2, 要让ofbiz加载这个数据模块就需要在applications下的配置文件里修改参数
(1)在applications下有一个component-load.xml模块加载配置文件,加入新建的模块
<load-component component-location="meetingroom"/>
如上图所示:<load-component component-location="meetingroom"/>里定义了要加载的模块。
(2)在applications文件夹下还有一个build.xml配置文件,在这个文件的<filelist />将新建的模块下的build.xml文件加进来
<filelist id="application-builds" dir="." files="content/build.xml,party/build.xml, workeffort/build.xml,product/build.xml,marketing/build.xml, order/build.xml,manufacturing/build.xml, accounting/build.xml, securityext/build.xml, humanres/build.xml meetingroom/build.xml "/> 总结:这样做只是让ofbiz运行时加载meetingroom模块,但是ofbiz并不知道接下来要做什么。
3,接下来配置meetingroom里的文件
(1)配置meetingroom模块下的ofbiz-componet.xml配置文件
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
//先定义模块名
<ofbiz-component name="meetingroom"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
//
<resource-loader name="main" type="component"/>
// 将配置文件放在指定的路径下
<classpath type="jar" location="build/lib/*"/>
<classpath type="dir" location="config"/>
//entity resource
<entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
<entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_old.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/PartyTypeData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/PartySecurityData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/PartyGeoPointData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/PartyPortletData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/PartyDemoData.xml"/>
<entity-resource type="data" reader-name="seed-initial" loader="main" location="data/ScheduledJobs.xml"/>
//service resource
<service-resource type="model" loader="main" location="servicedef/services.xml"/>
<service-resource type="model" loader="main" location="servicedef/services_view.xml"/>
<service-resource type="eca" loader="main" location="servicedef/secas.xml"/>
<service-resource type="mca" loader="main" location="servicedef/mcas.xml"/>
<test-suite loader="main" location="testdef/PartyTests.xml"/>
<test-suite loader="main" location="testdef/PartyContactMechTests.xml"/>
//在导航中显示meetingroom
<webapp name="meetingroom"
title="meetingroom"
server="default-server"
location="webapp/partymgr"
base-permission="OFBTOOLS,PARTYMGR"
mount-point="/partymgr"/>
</ofbiz-component>
(2)配置meetingroom里的build.xml文件
2, 要让ofbiz加载这个数据模块就需要在applications下的配置文件里修改参数
(1)在applications下有一个component-load.xml模块加载配置文件,加入新建的模块
<load-component component-location="meetingroom"/>
如上图所示:<load-component component-location="meetingroom"/>里定义了要加载的模块。
(2)在applications文件夹下还有一个build.xml配置文件,在这个文件的<filelist />将新建的模块下的build.xml文件加进来
<filelist id="application-builds" dir="." files="content/build.xml,party/build.xml, workeffort/build.xml,product/build.xml,marketing/build.xml, order/build.xml,manufacturing/build.xml, accounting/build.xml, securityext/build.xml, humanres/build.xml meetingroom/build.xml "/> 总结:这样做只是让ofbiz运行时加载meetingroom模块,但是ofbiz并不知道接下来要做什么。
3,接下来配置meetingroom里的文件
(1)配置meetingroom模块下的ofbiz-componet.xml配置文件
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
//先定义模块名
<ofbiz-component name="meetingroom"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
//
<resource-loader name="main" type="component"/>
// 将配置文件放在指定的路径下
<classpath type="jar" location="build/lib/*"/>
<classpath type="dir" location="config"/>
//entity resource
<entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
<entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_old.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/PartyTypeData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/PartySecurityData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/PartyGeoPointData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/PartyPortletData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/PartyDemoData.xml"/>
<entity-resource type="data" reader-name="seed-initial" loader="main" location="data/ScheduledJobs.xml"/>
//service resource
<service-resource type="model" loader="main" location="servicedef/services.xml"/>
<service-resource type="model" loader="main" location="servicedef/services_view.xml"/>
<service-resource type="eca" loader="main" location="servicedef/secas.xml"/>
<service-resource type="mca" loader="main" location="servicedef/mcas.xml"/>
<test-suite loader="main" location="testdef/PartyTests.xml"/>
<test-suite loader="main" location="testdef/PartyContactMechTests.xml"/>
//在导航中显示meetingroom
<webapp name="meetingroom"
title="meetingroom"
server="default-server"
location="webapp/partymgr"
base-permission="OFBTOOLS,PARTYMGR"
mount-point="/partymgr"/>
</ofbiz-component>
(2)配置meetingroom里的build.xml文件
相关文章推荐
- 关于ssh 配置文件的参数说明
- 关于session在PHP5的配置文件中的详细设置参数说明
- 关于Spring的配置文件的参数、属性的说明
- 关于resource加载配置文件问题
- Redis配置文件中关于bind参数
- 关于ubuntu12.04.1上修改MySQL的my.cnf参数配置文件问题
- smarty加载配置文件和读取其中的参数
- 关于struts2中自动加载模块的struts2的配置文件解决方案
- 关于Erlang/OTP的application参数配置 erlang app 文件
- 关于加载Spring配置文件的问题
- 关于Hibernate的配置文件参数详解
- springMVC系列之参数、多方法、配置文件加载——02
- 关于VS2008单元测试中加载配置文件的问题
- 关于设置SQLPLUS提示符样式的方法----登陆配置文件,动态加载提示符
- php.ini中两大加载配置文件的参数
- 关于ssh 配置文件的参数说明
- [logback] 关于logback.xml加载外部配置文件问题
- 关于SpringMVC*.xml配置文件加载问题
- 关于Log4j不重启重新加载配置文件
- 关于Nginx里面的配置文件里面的location参数的意思