Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Replaces Ant by Gradle

Table of contents

Table of Contents

...

Introduction

This document describes an initial setup process and basic configuration options for the Open For Business Project. For more detail see related documents such as the Framework Configuration Guide, the Entity Engine Configuration Guide, the Service Engine Configuration Guide, and other related documents you may found at OFBiz Documentation Index

...

  1. Download and install Java 1.7 8 or higher JDK/J2SDK (not the JRE, you need the full SDK) from Sun's Java (J2SE) site. You can use OpenJdk 7 8 (or higher) from R12.04.
    Make sure your JAVA_HOME environment variable is set to this JDK after installation (NOTE that for Mac OS X no JVM setup is needed, just make sure Java is up to date with the OS X Software Update facility).
    There are still people using older versionversions, even it it's of course not recommened, notably for security reasons.
    If you intent to use a release prior to R11.04 then use Java 1.5. If you intent to use R11. 04 then use Java 1.6. Note that versions before R13.07 are not recommended, notably for security reasons. By and large see this page on system requirements.
  2. "Download" OFBiz in the directory of your choice (see comments below about that). This should create one sub-directory: ofbiz. This will be the OFBIZ_HOME location.
  3. (not for snapshots) Load OFBiz demo data in the embedded Apache Derby data base running "ant load-demogradlew loadDefault" on Windows or "./ant load-demogradlew loadDefault" on Linux/Unix/OSX ("ant run-install" or "./ant run-install" for versions prior to R12.04).
  4. Start OFBiz with embedded Tomcat by going into the ofbiz directory and then running
    • Windows: "ant gradlew start" ("ant run" for version prior to R12.04) or "startofbiz.bat" (or even "%JAVA_HOME%\bin\java -jar build\libs\ofbiz.jar")
    • Linux/Unix/OSX: "./ant gradlew start" ("./ant run" for version prior to R12.04) or "./startofbiz.sh" (or even "$JAVA_HOME/bin/java -jar build/libs/ofbiz.jar").
  5. Open a browser and go to
    http://127.0.0.1:8080/ecommerce/control/main
    for the ecommerce application or
    https://127.0.0.1:8443/webtools/control/main
    for the WebTools application or
    https://127.0.0.1:8443/catalog/control/main for the Catalog Manager application.
  6. The default administrative account is username: "admin", password: "ofbiz".
  7. Have fun with it! You are running on a Java database. For more discussion of databases, read the section below on that topic.
  8. For more detailed options and configuration information, read on!

...

When building, a release or a svn checkout, you will use AntGradle, and sufficient Ant libraries sufficient Gradle libraries (notably the gradlew wrapper) and scripts are embedded with OFBiz.

In the directory where you want OFBiz to be, do a SVN checkout of, for instance, the ofbiz trunk (releases branches are also availble). For example:

...

Now go into the "ofbiz" directory and run "antgradlew" (Windows), or "./antgradlew" (Linux/Unix/OSX). It will compile all modules and leave you an executable jar (ofbiz.jar) in the "ofbiz/build/libs" directory.

Tip
titleAbout Ant
  • On *nix platforms, You need to add "./" ahead of "antgradlew" to get the embedded ant Gradlew wrapper running. On Windows it's normally not needed, but in case, the same can be achieved using "ant.bat". If on a *nix plaftorm you have Ant installed separately just make sure you have version 1.9 or later.Then you can run the "ant" command as normal intead of always adding "./" ahead of it.
  • Note that when running an ant command a Java command line is generated on the following line. You can copy and use/modify it suiting your needs...

To load the seed and demo data, from run

  • prior to R12.04: ant run-install
  • trunk and from R12.04: "ant load-demo"
    As an alternative to the previous step: to load the seed data only: "ant load-seed"

To start the server run

  • prior to R12.04: "ant run"
  • trunk and from R12.04: "ant start"
  • You migh use your own Gradle installation but that's out of the scope of this page.

To start the server run "gradlew ofbiz"

Another build option that is useful is "gradlew Another build option in the Ant build script that is useful is "ant clean" (Windows) or "./ant gradlew clean" (Linux/Unix/OSX). That will clean out all built classes allowing you to run "antgradlew" again to get a clean build. If you are running into funny errors after updating from SVN in the future, give this clean build process a try first.

You can get more information about available ant Gradle possiblities using "ant -pgradlew taks" (Windows) or "./ant -pgradlew taks" (Linux/Unix/OSX)

Database Setup

...

Default data can be loaded through the "load-demoloadDefault" Ant Gradle target as mentioned in the Building from SVN section.

...

OFBiz comes and runs by default with Tomcat for a Servlet/JSP container, the Apache Geronimo Transaction Manager for a transaction (JTA) manager, and Apache DBCP for a transaction aware connection pool.

OFBiz can also be configured to run in different containers, but there may be issues with certain quirks that other containers have, especially with servlet containers. We have always been able to find work-arounds for these, but they also seem to keep on appearing, so that is just something to watch for.

Because of the difficulty of deploying in an external application server we have created a configuration and script template tool that takes the classpath and webapp settings from the various OFBiz files to more easily generate the files you need. For more information, see the README file in the ofbiz/framework/appservers directory. If you are looking for a good commercial J2EE app server, Orion is a good place to start, but we recommend trying out Tomcat and Geronimo TM and see if they meet your needs.