gradle ofbiz 16 開發環境搭建
阿新 • • 發佈:2018-05-11
box line eas int data- .org ews statistic family 原
[html] view plain copy print?
gradle ofbiz 16 開發環境搭建
2017年02月13日 10:59:19 閱讀數:27021.安裝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.修改數據庫文件默認配置
[html] view plain copy print?- <delegator name="default" entity-model-reader="main" entity-group-reader="main"
- <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
- </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>
- <!-- 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" -->
- <delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
- <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>
[html] view plain copy print?
- <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>
- ofbiz ofbizolap ofbiztenant三個庫
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
gradle ofbiz 16 開發環境搭建