### Start OFBiz Application Source: https://github.com/apache/ofbiz-framework/blob/trunk/applications/commonext/src/docs/asciidoc/ofbiz-setup.adoc Starts the OFBiz application after data loading and user creation. Access the OFBiz Setup application via your browser. ```bash gradlew ofbiz ``` -------------------------------- ### Install a Plugin Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Installs a local plugin by placing its extracted directory into the /plugins folder and running the install task. This executes the 'install' task in the plugin's build.gradle if it exists. ```bash gradlew installPlugin -PpluginId=myplugin ``` -------------------------------- ### Start OFBiz Server Gracefully Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Initiates a graceful startup of the OFBiz server. The --start argument is default for the 'ofbiz' task. ```gradle gradlew "ofbiz --start" ``` -------------------------------- ### Start OFBiz Server in Background (Default) Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Starts the OFBiz server in a background forked process. Output is redirected to runtime/logs/console.log. ```gradle gradlew "ofbizBackground --start" ``` ```gradle gradlew ofbizBackground ``` -------------------------------- ### Pull and Install a Plugin with Dependencies Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Downloads a specified plugin and all its dependencies, installing them in order. Use this to automatically manage plugin installations. ```bash gradlew pullPlugin -PdependencyId="org.apache.ofbiz.plugin:myplugin:0.1.0" ``` -------------------------------- ### Start OFBiz Server in Background Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Starts the OFBiz server in a background forked process. Output is redirected to runtime/logs/console.log. Requires quoting. ```gradle gradlew "ofbizBackground --start --portoffset 10000" ``` -------------------------------- ### Properties File Example Source: https://github.com/apache/ofbiz-framework/blob/trunk/docs/asciidoc/documentation_guidelines.adoc Basic syntax for a properties file. ```properties foo = bar ``` -------------------------------- ### Start OFBiz Application on Unix-like OS Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Run this command on Unix-like systems to start the Apache OFBiz application. The progress indicator will not end as long as OFBiz is running. ```bash ./gradlew ofbiz ``` -------------------------------- ### Start OFBiz Server on Offset Port Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Starts the OFBiz server with a network port offset by the specified range. Requires quoting. ```gradle gradlew "ofbiz --start --portoffset 10000" ``` -------------------------------- ### Setup Eclipse Project for OFBiz Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Generates necessary .classpath and .project files for Eclipse and makes external library sources available for viewing. This may take a long time on the first run. ```bash gradlew eclipse ``` -------------------------------- ### CSS Styling Example Source: https://github.com/apache/ofbiz-framework/blob/trunk/docs/asciidoc/documentation_guidelines.adoc Demonstrates Cascading Stylesheet (CSS) formatting for web page styling. ```css body { background: transparent url(/images/ofbiz_logo.png) no-repeat scroll left top; color: #000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: .75em; line-height: 1.5em; padding: 50px 0 0; bgcolor: #ffffcc; } ``` -------------------------------- ### Load All OFBiz Data Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Loads all data sets for initial setup. Use with caution in production environments as it can overwrite existing data. ```bash gradlew loadAll ``` ```bash gradlew "ofbiz --load-data" ``` -------------------------------- ### Run the OFBiz Docker Container with Demo Data Source: https://github.com/apache/ofbiz-framework/blob/trunk/DOCKER.adoc Starts an OFBiz container, publishes port 8443, loads demo data, and runs the OFBiz server. Access OFBiz at https://localhost:8443/partymgr after startup. ```shell script docker run -it -e OFBIZ_DATA_LOAD=demo --name ofbiz-docker -p 8443:8443 ofbiz-docker ``` -------------------------------- ### Document Configuration for Standalone Guides Source: https://github.com/apache/ofbiz-framework/blob/trunk/docs/asciidoc/documentation_guidelines.adoc This configuration should be included in standalone documents to ensure consistent output generation. It sets global definitions, image directory, and PDF-specific rendering options. ```asciidoc The Apache OFBiz Project :imagesdir: ./images ifdef::backend-pdf[] :title-logo-image: image::OFBiz-Logo.svg[Apache OFBiz Logo, pdfwidth=4.25in, align=center] :source-highlighter: rouge endif::[] ``` -------------------------------- ### Build the OFBiz Runtime Container Image (Explicit Target) Source: https://github.com/apache/ofbiz-framework/blob/trunk/DOCKER.adoc Explicitly builds the OFBiz runtime container image using the 'runtime' target. This image contains an uninitialized OFBiz installation. ```shell script docker build --target runtime --tag ofbiz-docker . ``` -------------------------------- ### Initialize Gradle Wrapper on Unix-like OS Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Use this command on Unix-like systems to download and set up the Gradle wrapper. ```bash ./gradle/init-gradle-wrapper.sh ``` -------------------------------- ### Initialize Gradle Wrapper on Windows Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Use this command on Windows to download and set up the Gradle wrapper. Ensure PowerShell is configured correctly if you encounter errors. ```bash init-gradle-wrapper ``` -------------------------------- ### Display OFBiz Server Help Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Shows all available commands to control the OFBiz server. OFBiz server commands require quoting. ```gradle gradlew "ofbiz --help" ``` -------------------------------- ### JSON Data Example Source: https://github.com/apache/ofbiz-framework/blob/trunk/docs/asciidoc/documentation_guidelines.adoc An example of JSON data structure for representing an item. ```json { "id": 1, "name": "A green door", "price": 12.50, "tags": ["home", "green"] } ``` -------------------------------- ### Start OFBiz Server in Remote Debug Mode Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Starts OFBiz in remote debug mode, waiting for a debugger to connect on port 5005. ```gradle gradlew ofbiz --debug-jvm ``` -------------------------------- ### Build the OFBiz Demo Container Image Source: https://github.com/apache/ofbiz-framework/blob/trunk/DOCKER.adoc Builds a container image pre-loaded with demonstration data using the 'demo' target. Useful for frequent container restarts where demo data loading time is noticeable. ```shell script docker build --target demo --tag ofbiz-docker . ``` -------------------------------- ### HTML Document Example Source: https://github.com/apache/ofbiz-framework/blob/trunk/docs/asciidoc/documentation_guidelines.adoc Basic structure of an HTML document. ```html

Headline

``` -------------------------------- ### SQL Query Example Source: https://github.com/apache/ofbiz-framework/blob/trunk/docs/asciidoc/documentation_guidelines.adoc A simple SQL SELECT statement. ```sql SELECT * FROM FOO; ``` -------------------------------- ### Include Java Source File Source: https://github.com/apache/ofbiz-framework/blob/trunk/docs/asciidoc/documentation_guidelines.adoc Demonstrates how to include a Java source file using the include macro. ```java include::docs/asciidoc/resource/source.java[] ``` -------------------------------- ### XML Document Example Source: https://github.com/apache/ofbiz-framework/blob/trunk/docs/asciidoc/documentation_guidelines.adoc Shows the formatting for an XML document structure. ```xml Lazarus het Draeke ``` -------------------------------- ### Javascript Function Example Source: https://github.com/apache/ofbiz-framework/blob/trunk/docs/asciidoc/documentation_guidelines.adoc A simple Javascript function to display an alert message. ```javascript function msg(){ alert("Hello OFBiz"); } ``` -------------------------------- ### Display Gradle Build System Help Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Provides usage information and options for the Gradle build system. ```gradle gradlew --help ``` -------------------------------- ### Groovy Code Snippet Source: https://github.com/apache/ofbiz-framework/blob/trunk/docs/asciidoc/documentation_guidelines.adoc An example of Groovy code used for processing payment data. ```groovy selected = UtilHttp.parseMultiFormData(parameters) selected.each { row -> payment = from("Payment").where("paymentId", row.paymentId).queryOne() if (payment) { payments.add(payment) } } context.payments = payments ``` -------------------------------- ### Run OFBiz Container with Demo Data Source: https://github.com/apache/ofbiz-framework/blob/trunk/DOCKER.adoc Launches the OFBiz container, loads demo data (including the default 'admin' user with password 'ofbiz'), and listens on port 8443. ```shell script docker run -it -e OFBIZ_DATA_LOAD=demo -p 8443:8443 ofbiz-docker ``` -------------------------------- ### Get OFBiz Server Status Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Checks the current status of the OFBiz server. Requires quoting. ```gradle gradlew "ofbiz --status" ``` -------------------------------- ### Package OFBiz for Distribution on Windows Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Use this command on Windows to package OFBiz into a distribution zip file for deployment. ```bash gradlew distZip ``` -------------------------------- ### FAQ/Glossary Entry with Hyperlink ID Source: https://github.com/apache/ofbiz-framework/blob/trunk/docs/asciidoc/documentation_guidelines.adoc Provides an example of creating FAQ or Glossary entries with unique IDs for hyperlinking. ```asciidoc <> <> [#faq_entry_1] FAQ entry 1:: This is entry #1 in our example FAQ. [#faq_entry_2] FAQ entry 2:: This is entry #2 in our example FAQ. ``` -------------------------------- ### Clean and Load OFBiz Data on Windows Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Execute this command on Windows to clean the existing system data and load the complete OFBiz demo data. This may take a long time on the first run. ```bash gradlew cleanAll loadAll ``` -------------------------------- ### Fetch API Credentials Option Source: https://github.com/apache/ofbiz-framework/blob/trunk/framework/security/src/docs/asciidoc/_include/sy-password-and-JWT.adoc Example of using the 'include' option for credentials with the Fetch API to enable CORS. ```javascript credentials: "include" ``` -------------------------------- ### VisualTheme Entity Entry Source: https://github.com/apache/ofbiz-framework/blob/trunk/themes/docs/themes.adoc An example of an entry in the VisualTheme entity for a specific theme ID. This entry provides metadata for the theme. ```xml ``` -------------------------------- ### Get Current Timestamp Source: https://github.com/apache/ofbiz-framework/blob/trunk/framework/minilang/src/docs/asciidoc/minilang-to-groovy-manual.adoc Translates MiniLang's now-timestamp and now-date-to-env to Groovy's UtilDateTime.nowTimestamp() for obtaining the current time. ```xml ``` ```groovy Timestamp nowTimestamp = UtilDateTime.nowTimestamp() ``` ```xml ``` ```groovy Timestamp nowDate = UtilDateTime.nowTimestamp() ``` -------------------------------- ### Create a New Plugin with Default Parameters Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Creates a new OFBiz plugin with a mandatory pluginId. Optional parameters like resource name, web application name, and base permission will use default values. ```bash gradlew createPlugin -PpluginId=myplugin ``` -------------------------------- ### Run Gradle Task on Windows Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md General syntax for running Gradle tasks on Windows. Replace '' with the desired Gradle task. ```bash gradlew ``` -------------------------------- ### Load Seed Data for OFBiz Source: https://github.com/apache/ofbiz-framework/blob/trunk/applications/commonext/src/docs/asciidoc/ofbiz-setup.adoc Loads initial seed data required for OFBiz setup. Ensure you are in the OFBiz directory before running. ```bash gradlew "ofbiz --load-data readers=seed,seed-initial" ``` -------------------------------- ### Create a New Tenant Source: https://github.com/apache/ofbiz-framework/blob/trunk/README.md Creates a new tenant in the OFBiz environment. Requires multitenant=Y in general.properties. Optional parameters include tenantName, domainName, tenantReaders, dbPlatform, dbIp, dbUser, and dbPassword. ```bash gradlew createTenant -PtenantId=mytenant ``` ```bash gradlew createTenant -PtenantId=mytenant -PtenantName="My Name" -PdomainName=com.example -PtenantReaders=seed,seed-initial,ext -PdbPlatform=M -PdbIp=127.0.0.1 -PdbUser=mydbuser -PdbPassword=mydbpass ``` -------------------------------- ### Configure OFBiz Truststore for JVM Source: https://github.com/apache/ofbiz-framework/blob/trunk/framework/testtools/src/docs/asciidoc/SingleSignOn.adoc Sets the truststore file for the Java Virtual Machine (JVM) before starting OFBiz to enable SSL/TLS connections. ```java -Djavax.net.ssl.trustStore=path/to/cacerts.jks ```