############################################################################### | |
# 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 | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# 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. | |
############################################################################### | |
This directory contains templates for Glassfish Server v2.1 deployment | |
====================================================================== | |
README - this file. | |
run.sh - loads seed and demo data into JavaDB that comes with | |
Glassfish server and then deploys OFBiz. | |
deploy.sh - automatic deployment script. Builds WARs and the | |
ofbiz.ear and deploys onto glassfish. | |
domain.xml_patch - updated to record the ofbiz home. | |
entityengine.xml_patch - updated to use bundled JavaDB datasources. | |
url.properties - updated to set the HTTPS port to 8181 (default port). | |
application.xml - EAR metadata. | |
HOW-TO (this needs to be posted on the OFBiz documentation site) | |
====== | |
1. Setup | |
a. Create a folder somewhere on the disk with ~800MB free memory. | |
This becomes the work area. Referred as <work-folder> hence forth. | |
b. Download Glassfish Server v2.1 and install. (Download it from [1]) | |
c. Download OFBiz source (if you have not done already). (Either | |
download the build from http://build.ofbiz.org or checkout from SVN. | |
Refer [2]) | |
d. Build OFBiz sources (in case of svn checkout) using 'ant' command. | |
This will create 'ofbiz.jar' file. | |
e. Generate container templates for Glassfish v2.1 server. | |
i. Goto the OFBiz source folder (referred as OFBIZ_HOME). | |
ii. Use the command 'java -jar ofbiz.jar -setup glassfish21' to | |
generate the templates. For more information refer [3]. | |
This will create a new folder called 'setup' inside OFBIZ_HOME | |
and copy the generated templates under the folder | |
'setup/glassfish21'. | |
if (you are using JavaDB && want seed and demo data loaded) { | |
Copy OFBIZ_HOME/setup/glassfish21/run.sh to <work-folder>; | |
run run.sh script now!; | |
// (without quotes) './run.sh <glassfish_home> <glassfish-domain-path>' | |
} else { | |
read ahead; | |
} | |
2. Install and start the database server if its not done already. | |
3. Create / update entityengine.xml to include your database server details. | |
Refer [4]. If you want to use JavaDB with default settings, you can use entityengine.xml_patch | |
readily available under 'OFBIZ_HOME/setup/glassfish21'. | |
4. Load seed and demo data (optional, but highly recommended) by using | |
'./ant run-install' command under OFBIZ_HOME. Refer [5]. | |
5. Copy OFBIZ_HOME/setup/glassfish21/deploy.sh to <work-folder>. | |
6. Run deploy.sh. | |
(without quotes) './deploy.sh <glassfish-home> <glassfish-domain-path>'. | |
7. Check domain.xml for XML validation errors. This is to make sure the patching of domain.xml in previous step was done neatly. | |
8. Start/restart glassfish server if its not already running. | |
9. If you have opted for loading demo data, goto | |
http://localhost:8080/ecommerce and http://localhost:8080/webtools to | |
verify the installation. | |
References : | |
[1] : https://glassfish.dev.java.net/downloads/v2.1-b60e.html | |
[2] : http://cwiki.apache.org/confluence/confluence/display/OFBADMIN/Demo+and+Test+Setup+Guide (Building from SVN) | |
[3] : OFBIZ_HOME/framework/appserver/README | |
[4] : http://cwiki.apache.org/confluence/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide (2.c. Database Setup) | |
[5] : http://cwiki.apache.org/confluence/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide (2.d. Seed Data Loading) | |