原
gradle ofbiz 16 开发环境搭建

2017年02月13日 10:59:19

阅读数:2702

1.安装jdk

2.配置jdk环境变量

3.eclipse 安装svn 插件

4.svn下载Apache OFBiz 16.11.01 源码

5.下载gradle3.3 插件 存放目录C:\Users\Administrator\.gradle\wrapper\dists

6.配置mysql 数据库所需jar包 修改build.gradle 加入compile 'mysql:mysql-connector-java:5.1.24'

7.修改数据库文件默认配置

  1. <delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
  2. <group-map group-name="org.apache.ofbiz" datasource-name="localmysql"/>
  3. <group-map group-name="org.apache.ofbiz.olap" datasource-name="localmysqlolap"/>
  4. <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localmysqltenant"/>
  5. </delegator>
  6. <delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">
  7. <group-map group-name="org.apache.ofbiz" datasource-name="localmysql"/>
  8. <group-map group-name="org.apache.ofbiz.olap" datasource-name="localmysqlolap"/>
  9. <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localmysqltenant"/>
  10. </delegator>
  11. <!-- be sure that your default delegator (or the one you use) uses the same datasource for test. You must run "gradlew loadDefault" before running "gradlew testIntegration" -->
  12. <delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
  13. <group-map group-name="org.apache.ofbiz" datasource-name="localmysql"/>
  14. <group-map group-name="org.apache.ofbiz.olap" datasource-name="localmysqlolap"/>
  15. <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localmysqltenant"/>
  16. </delegator>
    <delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
<group-map group-name="org.apache.ofbiz" datasource-name="localmysql"/>
<group-map group-name="org.apache.ofbiz.olap" datasource-name="localmysqlolap"/>
<group-map group-name="org.apache.ofbiz.tenant" datasource-name="localmysqltenant"/>
</delegator>
<delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">
<group-map group-name="org.apache.ofbiz" datasource-name="localmysql"/>
<group-map group-name="org.apache.ofbiz.olap" datasource-name="localmysqlolap"/>
<group-map group-name="org.apache.ofbiz.tenant" datasource-name="localmysqltenant"/>
</delegator>
&lt;!-- be sure that your default delegator (or the one you use) uses the same datasource for test. You must run "gradlew loadDefault" before running "gradlew testIntegration" --&gt;
&lt;delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main"&gt;
&lt;group-map group-name="org.apache.ofbiz" datasource-name="localmysql"/&gt;
&lt;group-map group-name="org.apache.ofbiz.olap" datasource-name="localmysqlolap"/&gt;
&lt;group-map group-name="org.apache.ofbiz.tenant" datasource-name="localmysqltenant"/&gt;
&lt;/delegator&gt;

   

  1. <datasource name="localmysql"  
  2.             helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"  
  3.             field-type-name="mysql"  
  4.             check-on-start="true"  
  5.             add-missing-on-start="true"  
  6.             check-pks-on-start="false"  
  7.             use-foreign-keys="true"  
  8.             join-style="ansi-no-parenthesis"  
  9.             alias-view-columns="false"  
  10.             drop-fk-use-foreign-key-keyword="true"  
  11.             table-type="InnoDB"  
  12.             character-set="utf8"  
  13.             collate="utf8_general_ci">  
  14.         <read-data reader-name="tenant"/>  
  15.         <read-data reader-name="seed"/>  
  16.         <read-data reader-name="seed-initial"/>  
  17.         <read-data reader-name="demo"/>  
  18.         <read-data reader-name="ext"/>  
  19.         <read-data reader-name="ext-test"/>  
  20.         <read-data reader-name="ext-demo"/>  
  21.         <inline-jdbc  
  22.                 jdbc-driver="com.mysql.jdbc.Driver"  
  23.                 jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?characterEncoding=utf-8&autoReconnect=true"  
  24.                 jdbc-username="root"  
  25.                 jdbc-password="root"  
  26.                 isolation-level="ReadCommitted"  
  27.                 pool-minsize="2"  
  28.                 pool-maxsize="250"  
  29.                 time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL  
  30.                 and had to set it to -1 in order to avoid this issue.  
  31.                 For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->  
  32.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->  
  33.     </datasource>  
  34.     <datasource name="localmysqlolap"  
  35.             helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"  
  36.             field-type-name="mysql"  
  37.             check-on-start="true"  
  38.             add-missing-on-start="true"  
  39.             check-pks-on-start="false"  
  40.             use-foreign-keys="true"  
  41.             join-style="ansi-no-parenthesis"  
  42.             alias-view-columns="false"  
  43.             drop-fk-use-foreign-key-keyword="true"  
  44.             table-type="InnoDB"  
  45.             character-set="utf8"  
  46.             collate="utf8_general_ci">  
  47.         <read-data reader-name="tenant"/>  
  48.         <read-data reader-name="seed"/>  
  49.         <read-data reader-name="seed-initial"/>  
  50.         <read-data reader-name="demo"/>  
  51.         <read-data reader-name="ext"/>  
  52.         <read-data reader-name="ext-test"/>  
  53.         <read-data reader-name="ext-demo"/>  
  54.         <inline-jdbc  
  55.                 jdbc-driver="com.mysql.jdbc.Driver"  
  56.                 jdbc-uri="jdbc:mysql://127.0.0.1/ofbizolap?characterEncoding=utf-8&autoReconnect=true"  
  57.                 jdbc-username="root"  
  58.                 jdbc-password="root"  
  59.                 isolation-level="ReadCommitted"  
  60.                 pool-minsize="2"  
  61.                 pool-maxsize="250"  
  62.                 time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL  
  63.                 and had to set it to -1 in order to avoid this issue.  
  64.                 For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->  
  65.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->  
  66.     </datasource>  
  67.     <datasource name="localmysqltenant"  
  68.             helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"  
  69.             field-type-name="mysql"  
  70.             check-on-start="true"  
  71.             add-missing-on-start="true"  
  72.             check-pks-on-start="false"  
  73.             use-foreign-keys="true"  
  74.             join-style="ansi-no-parenthesis"  
  75.             alias-view-columns="false"  
  76.             drop-fk-use-foreign-key-keyword="true"  
  77.             table-type="InnoDB"  
  78.             character-set="utf8"  
  79.             collate="utf8_general_ci">  
  80.         <read-data reader-name="tenant"/>  
  81.         <read-data reader-name="seed"/>  
  82.         <read-data reader-name="seed-initial"/>  
  83.         <read-data reader-name="demo"/>  
  84.         <read-data reader-name="ext"/>  
  85.         <read-data reader-name="ext-test"/>  
  86.         <read-data reader-name="ext-demo"/>  
  87.         <inline-jdbc  
  88.                 jdbc-driver="com.mysql.jdbc.Driver"  
  89.                 jdbc-uri="jdbc:mysql://127.0.0.1/ofbiztenant?characterEncoding=utf-8&autoReconnect=true"  
  90.                 jdbc-username="root"  
  91.                 jdbc-password="root"  
  92.                 isolation-level="ReadCommitted"  
  93.                 pool-minsize="2"  
  94.                 pool-maxsize="250"  
  95.                 time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL  
  96.                 and had to set it to -1 in order to avoid this issue.  
  97.                 For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->  
  98.         <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->  
  99.     </datasource>  
<datasource name="localmysql"

helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"

field-type-name="mysql"

check-on-start="true"

add-missing-on-start="true"

check-pks-on-start="false"

use-foreign-keys="true"

join-style="ansi-no-parenthesis"

alias-view-columns="false"

drop-fk-use-foreign-key-keyword="true"

table-type="InnoDB"

character-set="utf8"

collate="utf8_general_ci">

<read-data reader-name="tenant"/>

<read-data reader-name="seed"/>

<read-data reader-name="seed-initial"/>

<read-data reader-name="demo"/>

<read-data reader-name="ext"/>

<read-data reader-name="ext-test"/>

<read-data reader-name="ext-demo"/>

<inline-jdbc

jdbc-driver="com.mysql.jdbc.Driver"

jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?characterEncoding=utf-8&autoReconnect=true"

jdbc-username="root"

jdbc-password="root"

isolation-level="ReadCommitted"

pool-minsize="2"

pool-maxsize="250"

time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL

and had to set it to -1 in order to avoid this issue.

For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->

<!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->

</datasource>

<datasource name="localmysqlolap"

helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"

field-type-name="mysql"

check-on-start="true"

add-missing-on-start="true"

check-pks-on-start="false"

use-foreign-keys="true"

join-style="ansi-no-parenthesis"

alias-view-columns="false"

drop-fk-use-foreign-key-keyword="true"

table-type="InnoDB"

character-set="utf8"

collate="utf8_general_ci">

<read-data reader-name="tenant"/>

<read-data reader-name="seed"/>

<read-data reader-name="seed-initial"/>

<read-data reader-name="demo"/>

<read-data reader-name="ext"/>

<read-data reader-name="ext-test"/>

<read-data reader-name="ext-demo"/>

<inline-jdbc

jdbc-driver="com.mysql.jdbc.Driver"

jdbc-uri="jdbc:mysql://127.0.0.1/ofbizolap?characterEncoding=utf-8&autoReconnect=true"

jdbc-username="root"

jdbc-password="root"

isolation-level="ReadCommitted"

pool-minsize="2"

pool-maxsize="250"

time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL

and had to set it to -1 in order to avoid this issue.

For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->

<!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->

</datasource>

<datasource name="localmysqltenant"

helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"

field-type-name="mysql"

check-on-start="true"

add-missing-on-start="true"

check-pks-on-start="false"

use-foreign-keys="true"

join-style="ansi-no-parenthesis"

alias-view-columns="false"

drop-fk-use-foreign-key-keyword="true"

table-type="InnoDB"

character-set="utf8"

collate="utf8_general_ci">

<read-data reader-name="tenant"/>

<read-data reader-name="seed"/>

<read-data reader-name="seed-initial"/>

<read-data reader-name="demo"/>

<read-data reader-name="ext"/>

<read-data reader-name="ext-test"/>

<read-data reader-name="ext-demo"/>

<inline-jdbc

jdbc-driver="com.mysql.jdbc.Driver"

jdbc-uri="jdbc:mysql://127.0.0.1/ofbiztenant?characterEncoding=utf-8&autoReconnect=true"

jdbc-username="root"

jdbc-password="root"

isolation-level="ReadCommitted"

pool-minsize="2"

pool-maxsize="250"

time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL

and had to set it to -1 in order to avoid this issue.

For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->

<!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->

</datasource>

8.本地数据库创建MySQL数据库

  1. ofbiz ofbizolap ofbiztenant三个库
ofbiz ofbizolap ofbiztenant三个库

设置编码格式字符集utf8 -- UTF-8 排序规则Unicode utf8_general_ci

9.命令行gradlew loadDefault 加载默认数据

10.命令行  gradlew
 ofbiz启动

https://127.0.0.1:8443/ecommerce/control/main 前台访问

https://127.0.0.1:8443/accounting/control/setUserPreference 后台  账号admin密码ofbiz

    	</article>

	<div class="article-bar-bottom">
<div class="tags-box artic-tag-box">
<span class="label">文章标签:</span>
<a class="tag-link" href="http://so.csdn.net/so/search/s.do?q=apache&amp;t=blog" target="_blank">apache </a><a class="tag-link" href="http://so.csdn.net/so/search/s.do?q=ofbiz16&amp;t=blog" target="_blank">ofbiz16 </a><a class="tag-link" href="http://so.csdn.net/so/search/s.do?q=数据库&amp;t=blog" target="_blank">数据库 </a><a class="tag-link" href="http://so.csdn.net/so/search/s.do?q=mysql&amp;t=blog" target="_blank">mysql </a><a class="tag-link" href="http://so.csdn.net/so/search/s.do?q=jdk&amp;t=blog" target="_blank">jdk </a>
</div>
</div> <!-- !empty($pre_next_article[0]) -->
</div>

gradle ofbiz 16 开发环境搭建的更多相关文章

  1. visual studio 2015 + Cordova 开发环境搭建

    简单的写一些,备忘,太折腾了,特别是通过代理上网的我们国内的开发者 1.当然是安装Visual Studio 2015,别忘了选择Tools For Apache Cordova. 对于通过Proxy ...

  2. Struts2开发环境搭建,及一个简单登录功能实例

    首先是搭建Struts2环境. 第一步 下载Struts2去Struts官网 http://struts.apache.org/ 下载Struts2组件.截至目前,struts2最新版本为2.3.1. ...

  3. mac10.9下eclipse的storm开发环境搭建

    --------------------------------------- 博文作者:迦壹 博客地址:http://idoall.org/home.php?mod=space&uid=1& ...

  4. Spark Idea Maven 开发环境搭建

    一.安装jdk jdk版本最好是1.7以上,设置好环境变量,安装过程,略. 二.安装Maven 我选择的Maven版本是3.3.3,安装过程,略. 编辑Maven安装目录conf/settings.x ...

  5. Android开发环境搭建相关文章列表(转载)

    Android开发虽然有所了解,但是一直没有搭建开发环境去学习,Android的更新速度比较快了,Android1.0是2008年发布的,截止到目前为止Android已经更新Android5.0.1, ...

  6. nginx 与 lua 开发环境搭建

    首先下载最新版的 相关软件 的安装文件. nginx: http://nginx.org/en/download.html LuaJIT: http://luajit.org/download.htm ...

  7. Unix/Linux环境C编程新手教程(12) openSUSECCPP以及Linux内核驱动开发环境搭建

    1. openSUSE是一款优秀的linux. watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaXRjYXN0Y3Bw/font/5a6L5L2T/font ...

  8. Unix/Linux环境C编程入门教程(17) Gentoo LinuxCCPP开发环境搭建

    1. Gentoo Linux是一套通用的.快捷的.完全免费的Linux发行,它面向开发人员和网络职业人员.与其他发行不同的是,Gentoo Linux拥有一套先进的包管理系统叫作Portage.在B ...

  9. Unix/Linux环境C编程入门教程(12) openSUSECCPP以及Linux内核驱动开发环境搭建

    1. openSUSE是一款优秀的linux. 2.选择默认虚拟机 3.选择稍后安装操作系统 4.选择linux  opensuse 5. 选择默认虚拟机名称 6.设置处理器为双核. 7.内存设置为2 ...

随机推荐

  1. Angular 2 树节点的上下移动问题

    最近在做一个树节点的上下移动然后实现排序的问题.直接看图: 实现已选查询条件的上下移动.结合了primeng 的picklist 组件. 下面是html代码 <p-tabPanel header ...

  2. react的ant design的UI组件库

    PC官网:https://ant.design/ 移动端网址:https://mobile.ant.design/docs/react/introduce-cn antd-mobile :是 Ant ...

  3. hibernate系列之一

    通过自己不断的学习框架以及相关知识的学习,自己学会总结了学习路上遇到的一些问题以及疑惑,自己现在跟着相关的学习资料又进行了一些总结和实践,希望通过自己走过的学习之路能够帮助小伙伴们解决一些学习上问题或 ...

  4. centos下修改docker连接docker_host默认方式为tls方式

    1.安装docker,请参考官网文档 centos下安装docker 2.安装完成应该可以使用docker的各种命令连接docker host.docker host运行在本机上,但与localhos ...

  5. 37.VUE学习之-表单的综合运用

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http ...

  6. 力扣题目汇总(丑数,重复N的元素,求众数)

    丑数 1.题目描述 编写一个程序判断给定的数是否为丑数. 丑数就是只包含质因数 2, 3, 5 的正整数. 示例 1: 输入: 6 输出: true 解释: 6 = 2 × 3 示例 2: 输入: 8 ...

  7. 时间转换,django的时间设置,re模块简单校验密码和手机号

    时间转换和密码,手机的re模块简单校验 import re,time def check_userinfo(request): pwd = request.POST.get("pwd&quo ...

  8. java.util.ArrayList与java.util.Arrays$ArrayList区别

    本博客转载自:https://blog.csdn.net/maywehe/article/details/52553954 写demo的时候,为了避免用list.add方法,特意写了个数组然后转换成l ...

  9. Android TV 开发(4)

    本文来自网易云社区 作者:孙有军 最后我们再来看看好友界面,改界面本地是没有xml的,因此我们直接来看看代码: 这里将使用到数据bean,与数据源的代码也贴出来如下: public class Con ...

  10. 【网易严选】iOS持续集成打包(Jenkins+fastlane+nginx)

    本文来自网易云社区 作者:孙娇 严选iOS客户端的现有打包方式是通过远程连接打包机执行脚本去打包,打完包会输出相应的ipa的二维码,扫一扫二维码可以安装,但是随着测试队伍的壮大,外包同学越来越多,在打 ...