Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Download OFBiz source code (tagged release), this is version 16.11.02 http://www.apache.org/dyn/closer.lua/ofbiz/apache-ofbiz-16.11.02.zip
Unzip to a specific folder, for example: C:\Users\vydn\Downloads\apache-ofbiz-16.11.02

 

Download PostgreSQL 9.6.3 for Windows x64
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads#windows
Section Version of PostgreSQL, choose "PostgreSQL 9.6.3".
Section Operating system, choose "Windows x86-64".

Image Modified

Install PostgreSQL step-by-step by installer.

...

Code Block
languagexml
firstline1
linenumberstrue
<datasource name="localpostgres"
		helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
		schema-name="public"
		field-type-name="postgres"
		check-on-start="true"
		add-missing-on-start="true"
		use-fk-initially-deferred="false"
		alias-view-columns="false"
		join-style="ansi"
		use-binary-type-for-blob="true"
		use-order-by-nulls="true"
		result-fetch-size="50">	
	<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="org.postgresql.Driver"
			jdbc-uri="jdbc:postgresql://127.0.0.1:5433/ofbiz"
			jdbc-username="postgres"
			jdbc-password="postgres"
			isolation-level="ReadCommitted"
			pool-minsize="2"
			pool-maxsize="250"
			time-between-eviction-runs-millis="600000"/>
</datasource>
<datasource name="localpostolap"
		helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
		schema-name="public"
		field-type-name="postgres"
		check-on-start="true"
		add-missing-on-start="true"
		use-fk-initially-deferred="false"
		alias-view-columns="false"
		join-style="ansi"
		result-fetch-size="50"
		use-binary-type-for-blob="true"
		use-order-by-nulls="true">
	<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="org.postgresql.Driver"
			jdbc-uri="jdbc:postgresql://127.0.0.1:5433/ofbizolap"
			jdbc-username="postgres"
			jdbc-password="postgres"
			isolation-level="ReadCommitted"
			pool-minsize="2"
			pool-maxsize="250"
			time-between-eviction-runs-millis="600000"/>
</datasource>
<datasource name="localposttenant"
		helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
		schema-name="public"
		field-type-name="postgres"
		check-on-start="true"
		add-missing-on-start="true"
		use-fk-initially-deferred="false"
		alias-view-columns="false"
		join-style="ansi"
		result-fetch-size="50"
		use-binary-type-for-blob="true"
		use-order-by-nulls="true">
	<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="org.postgresql.Driver"
			jdbc-uri="jdbc:postgresql://127.0.0.1:5433/ofbiztenant"
			jdbc-username="postgres"
			jdbc-password="postgres"
			isolation-level="ReadCommitted"
			pool-minsize="2"
			pool-maxsize="250"
			time-between-eviction-runs-millis="600000"/>
</datasource>

 

Inside file \apache-ofbiz-16.11.02\build.gradle , add this line:

Code Block
firstline1
collapsetrue
compile 'org.postgresql:postgresql:42.1.1'

...

Code Block
languagebash
firstline1
linenumberstrue
cd /d C:\Users\vydn\Downloads\apache-ofbiz-16.11.02

gradlew eclipse
gradlew cleanAll
gradlew loadDefault
gradlew ofbizDebug --info

Explain:

Command gradle gradlew eclipse, generate metadata for Eclipse IDE from existing source code.

Command gradlew cleanAll, clean old artifact, build files.

Command gradlew loadDefault, load sample data into database.

Command gradlew ofbizDebug, run ofbiz in debug mode. You you don't like debug model, use command gradle gradlew ofbiz.

Parameter --info is no required, it help you see what happen under the hood.

(Note: Use command gradlew, not gradle)

 

Open Google Chrome, go to https://localhost:8443/webtools/control/

(not https://localhost:8443), use account:

username: admin

password: ofbiz

You can start working with OFBiz.

...