{"id":15056574,"url":"https://github.com/apache/ofbiz-framework","last_synced_at":"2025-05-14T11:12:23.769Z","repository":{"id":37251742,"uuid":"81799714","full_name":"apache/ofbiz-framework","owner":"apache","description":"Apache OFBiz is an open source product for the automation of enterprise processes. It includes framework components and business applications for ERP, CRM, E-Business/E-Commerce, Supply Chain Management and Manufacturing Resource Planning. OFBiz provides a foundation and starting point for reliable, secure and scalable enterprise solutions.","archived":false,"fork":false,"pushed_at":"2025-05-05T15:48:28.000Z","size":746262,"stargazers_count":885,"open_issues_count":17,"forks_count":570,"subscribers_count":89,"default_branch":"trunk","last_synced_at":"2025-05-10T17:16:41.618Z","etag":null,"topics":["content","database","geospatial","groovy","hacktoberfest","https","java","javascript","network-server","ofbiz","plugins","web-framework","xml"],"latest_commit_sha":null,"homepage":"https://ofbiz.apache.org/","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":"CONTRIBUTING.adoc","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-02-13T08:00:07.000Z","updated_at":"2025-05-10T11:53:01.000Z","dependencies_parsed_at":"2023-09-28T16:21:40.388Z","dependency_job_id":"cb84677a-e381-4087-8569-53dad752f4c4","html_url":"https://github.com/apache/ofbiz-framework","commit_stats":{"total_commits":29279,"total_committers":104,"mean_commits":"281.52884615384613","dds":0.7411796850985348,"last_synced_commit":"9a524b0b1a9350ef1865fdbaa5ccfb6eed275709"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fofbiz-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fofbiz-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fofbiz-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fofbiz-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/ofbiz-framework/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253850700,"owners_count":21973663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["content","database","geospatial","groovy","hacktoberfest","https","java","javascript","network-server","ofbiz","plugins","web-framework","xml"],"created_at":"2024-09-24T21:53:35.309Z","updated_at":"2025-05-14T11:12:23.720Z","avatar_url":"https://github.com/apache.png","language":"Java","readme":"////\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n////\n[[apache-ofbiz]]\n= Apache OFBiz®\nThe Apache OFBiz Project\n\nimage:https://img.shields.io/badge/License-Apache%202.0-blue.svg[link=http://www.apache.org/licenses/LICENSE-2.0]\nimage:https://img.shields.io/badge/Version-trunk-red.svg[link=https://github.com/apache/ofbiz-framework]\n\nimage:https://github.com/apache/ofbiz-framework/actions/workflows/gradle.yaml/badge.svg?branch=trunk[link=https://github.com/apache/ofbiz-framework/actions/workflows/gradle.yaml]\n// For the CodeQL badge to not get stuck on failing, you need to delete the last failing CodeQL workflow (AKA action)\nimage:https://github.com/apache/ofbiz-framework/actions/workflows/codeql-analysis.yml/badge.svg[link=https://github.com/apache/ofbiz-framework/actions/workflows/codeql-analysis.yml]\n// For the BuildBot badge to not get stuck on failure, ALL builds of all branches handled by https://svn.apache.org/repos/infra/infrastructure/buildbot2/projects/ofbiz.py need to pass\nimage:https://ci2.apache.org/badges/ofbizTrunkFrameworkPlugins.svg[link=https://ci2.apache.org/#/builders?tags=%2BofbizTrunkFrameworkPlugins]\nimage:https://qpkb254zxeu.montastic.io/badge[link=https://qpkb254zxeu.montastic.io]\n\nimage:https://github.com/apache/ofbiz-framework/actions/workflows/scorecard.yml/badge.svg[https://github.com/apache/ofbiz-framework/actions/workflows/scorecard.yml]\nimage:https://api.securityscorecards.dev/projects/github.com/apache/ofbiz-framework/badge[link=https://securityscorecards.dev/viewer/?uri=github.com/apache/ofbiz-framework]\nimage:https://www.bestpractices.dev/projects/8708/badge[link=https://www.bestpractices.dev/projects/8708]\n\n\nIf you are reading this file in AsciiDoc format you may want to see it at\nhttps://nightlies.apache.org/ofbiz/trunk/readme/html5/README.html[HTML]\nor https://nightlies.apache.org/ofbiz/trunk/readme/pdf/README.pdf[PDF] format\n\n---\n\nWelcome to *Apache OFBiz*! A powerful top level Apache software project. OFBiz\nis an Enterprise Resource Planning (ERP) System written in Java and houses a\nlarge set of libraries, entities, services and features to run all aspects of\nyour business.\n\nFor more details about OFBiz please visit the OFBiz Documentation page:\n\nhttp://ofbiz.apache.org/documentation.html[OFBiz documentation]\n\nhttp://www.apache.org/licenses/LICENSE-2.0[OFBiz License]\n\n== Notes\n[NOTE]\n====\nIf you want to use Eclipse, read the link:#setup-eclipse-project-for-ofbiz[Setup eclipse project for OFBiz]\nsection to set it up.\n====\n\n[NOTE]\n====\nIf you want to use an external database like MySQL or PostgreSQL, read\nthe link:#setup-an-external-database-like-mysql-postgresql-etc[Setup an external database] section to set it up.\n====\n\n[NOTE]\n====\nIf you want to run OFBiz without an internet connection, read the\nlink:#running-gradle-tasks-without-an-internet-connection[Running gradle tasks without an internet connection] section.\n====\n\n[NOTE]\n====\nThe directory structure and repositories have changed. For more\ninformation read the link:#repository-and-directory-structure[Repository and directory structure] section.\n====\n[NOTE]\n====\nIf you are in China you may encounter network issues or proxy settings. That's of course unrelated to OFBiz.\n====\n\n\n[[system-requirements]]\n== System requirements\n\nThe only requirements to run OFBiz is\n\n* to have the Java Development Kit (JDK) version 17 installed on your system\n(not just the JRE, but the full JDK) that you can download from the below link.\nMake sure of setting the $JAVA_HOME environment variable. +\nhttps://adoptopenjdk.net/[JDK download].\nhttps://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244[To know more about the JDK]\n\n[WARNING]\n==================\nOn Windows don't put OFBiz in a directory with space/s in the path.\n==================\n\n* If on Windows, a Powershell version \u003e= 7.1.3 installed that you can download from the below link. +\nhttps://github.com/PowerShell/PowerShell[Powershell]\n\n[[quick-start]]\n// tag::quickstart[]\n== Quick start\n\nTo quickly install and fire-up OFBiz, please follow the below instructions from\nthe command line at the OFBiz top level directory (folder).\n\n[[download-the-gradle-wrapper]]\n=== Download the Gradle wrapper:\n\nMS Windows: `init-gradle-wrapper`\n[IMPORTANT]\n====\n* If you cross the error\n[quote]\n____\n\"Powershell is not recognized as an internal or external command, operable program or batch file\"\n____\n\nfollow the advice there: https://s.apache.org/vdcv8. If you want more details see: https://s.apache.org/urnju\n\n* If you run into problems check the the execution policy of PowerShell. See https://s.apache.org/urnju for details.\nBy setting the execution policy to \"unrestricted\", you'll be prompted to run the script once you run the init-gradle-wrapper command.\n\n====\n[NOTE]\n====\nIf you wonder where are stored the PowerShell Executables, here are the answers: https://s.apache.org/w5dye\n====\n\nUnix-like OS: `./gradle/init-gradle-wrapper.sh`\n\n\n[[prepare-ofbiz]]\n=== Prepare OFBiz:\n\n==== Clean system and load the complete OFBiz data\n_________________________________________________________________________________________________________________________________________________________________________________________________________________\n_Note_: Depending on your Internet connection speed it might take a long time\nfor this step to complete if you are using OFBiz for the first time as it needs\nto download all dependencies. So please be patient!\n_________________________________________________________________________________________________________________________________________________________________________________________________________________\n\nMS Windows: `gradlew cleanAll loadAll`\n\nUnix-like OS: `./gradlew cleanAll loadAll`\n\nWARNING: This command deletes all previous data and resets it to the initial demo data.\n\n[[start-ofbiz]]\n=== Start OFBiz:\n\nMS Windows: `gradlew ofbiz`\n\nUnix-like OS: `./gradlew ofbiz`\n\n___________________________________________________________________________________________________\n_Note_: Ignore the % progress indicator because this task does not end as long\nas OFBiz is running.\n___________________________________________________________________________________________________\n\n\n[[visit-ofbiz-through-your-browser]]\n=== Visit OFBiz through your browser:\n\nhttps://localhost:8443/ordermgr[Order Back Office interface]\n\nhttps://localhost:8443/accounting[Accounting Back Office interface]\n\nhttps://localhost:8443/webtools[Administrator interface]\n\nYou can log in with the user *admin* and password *ofbiz*.\n\n// end::quickstart[]\n\n[NOTE]\nIn case of problems visit our link:#further-reading[Further reading section].\n\n[[Docker]]\n== Docker\nIf you want to set and use Docker, link:https://nightlies.apache.org/ofbiz/trunk/readme/html5/DOCKER.html[here is the documentation]\n\n[[production-setup]]\n== Production setup\n\n[NOTE]\n====\nCurrently deployment configuration is tied to the source code. If you want to separate deployment configuration from production code we recommend using Docker, see link:#Docker[Docker] section above.\n====\n\nFollowing is a simple production setup. For more detailed information visit link:https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide[Apache OFBiz Technical Production Setup Guide].\n\n=== Package OFBiz\n\nMS Windows: `gradlew distZip`\n\nUnix-like OS: `./gradlew distTar`\n\n=== Copy to server\n\nCopy the archive from `build/distributions` directory to the server and unarchive them with `tar xf` or `unzip`.\n\n=== Run OFBiz\n\nFrom the unarchived directory you can run either `bin/ofbiz` shell script or `bin/ofbiz.bat` batch script.\n\n=== Install as a service\n\nMS Windows: you can use link:https://nssm.cc/usage[nssm]\n\nUnix-like OS: link:https://cwiki.apache.org/confluence/display/OFBIZ/How+to+run+OFBiz+as+a+Service[This article] might give you an idea, although it seems to be outdated. Either way, you can use the standard mechanism of your distribution, like for example creating an `/etc/systemd/system/ofbiz.service` file.\n\n=== Troubleshooting\n\nOn Windows you might get the following error when trying to run the `ofbiz.bat` script:\n`The input line is too long. The syntax of the command is incorrect.`\n\nThe current workaround is to clone the repository and run gradlew commands from the root folder instead.\n\n[[security]]\n== Security\n\n* If you find a pre-auth security issue, please report it to: security @ ofbiz.apache.org.\nOnce proper mitigations to the security issues are complete the OFBiz team will\ndisclose this information to the public mailing list.\n* If you find a post-auth security issue, please https://s.apache.org/dsj2p[create a bug in our issue tracker (Jira)] .\n\n* If you want to use AJP on a non localhost OFBiz instance, you need to set the value of allowedRequestAttributesPattern\nin framework/catalina/ofbiz-component.xml\n\nYou can find more information about security in OFBiz at\nhttps://cwiki.apache.org/confluence/display/OFBIZ/Keeping+OFBiz+secure[Keeping OFBiz secure]\n\n[CAUTION]\n====\nIn production never use the credentials contained in demo data. Not only the admin credentials, but all of them.\n\nAlso we recommend to not use Windows Server in production because we are not supporting specific Windows related security issues.\n====\n\n[[build-system-syntax]]\n== Build system syntax\n\nAll build tasks are executed using the *Gradle* build system which is embedded\nin OFBiz. To execute build tasks go to OFBiz top-level directory (folder) and\nexecute tasks from there.\n\n[[operating-system-syntax]]\n=== Operating System Syntax\n\nThe syntax for tasks differ slightly between windows and Unix-like systems\n\n* *Windows*: `gradlew \u003ctasks-in-here\u003e`\n* *Unix-like*: `./gradlew \u003ctasks-in-here\u003e`\n\nFor the rest of this document, we will use the windows syntax, if you are on a\nUnix-like system, you need to add the `./` to gradlew\n\n[[types-of-tasks-in-gradle]]\n=== Types of tasks in Gradle\n\nThere are two types of tasks designed for OFBiz in Gradle:\n\n* *Standard tasks*: To execute general standard Gradle tasks\n* *OFBiz server tasks*: To execute OFBiz startup commands. These tasks start\nwith one of the following words:\n* *ofbiz* : standard server commands\n* *ofbizBackground* ; server commands running in a background forked process\n\nTips:\n\n* OFBiz *server commands* require *\"quoting\"* the commands. For example:\n`gradlew \"ofbiz --help\"`\n* Shortcuts to task names can be used by writing the first letter of every word\nin a task name. However, you cannot use the shortcut form for OFBiz server\ntasks. Example: `gradlew loadAdminUserLogin -PuserLoginId=myadmin` =\n`gradlew lAUL -PuserLoginId=myadmin`\n* Dependent tasks can be skipped with the -x switch. Example:\n`gradlew build -x test` does not run the tests within the build.\n\n[[example-standard-tasks]]\n==== Example standard tasks\n\n`gradlew build`\n\n`gradlew cleanAll loadAll testIntegration`\n\n[[example-ofbiz-server-tasks]]\n==== Example OFBiz server tasks\n\n`gradlew \"ofbiz --help\"`\n\n`gradlew \"ofbiz --test\" --debug-jvm`\n\n`gradlew \"ofbizBackground --start --portoffset 10000\"`\n\n`gradlew \"ofbiz --shutdown --portoffset 10000\"`\n\n`gradlew ofbiz` (default is --start)\n\n[[example-mixed-tasks-standard-and-ofbiz-server]]\n==== Example mixed tasks (standard and OFBiz server)\n\n`gradlew cleanAll loadAll \"ofbiz --start --portoffset 10000\"`\n\n\n\n[[quick-reference]]\n== Quick reference\n\nYou can use the below common list of tasks as a quick reference for controlling\nthe system. This document uses the windows task syntax, if you are on a\nUnix-like system, you need to add the `./` to gradlew i.e. `./gradlew`\n\n\n\n[[help-tasks]]\n=== Help tasks\n\n[[list-ofbiz-server-commands]]\n==== List OFBiz server commands\n\nList all available commands to control the OFBiz server\n\n`gradlew \"ofbiz --help\"`\n\n[[list-build-tasks]]\n==== List build tasks\n\nList all available tasks from the build system\n\n`gradlew tasks`\n\n[[list-build-projects]]\n==== List build projects\n\nList all available projects in the build system\n\n`gradlew projects`\n\n[[gradle-build-system-help]]\n==== Gradle build system help\n\nShow usage and options for the Gradle build system\n\n`gradlew --help`\n\n\n\n[[server-command-tasks]]\n=== Server command tasks\n\n[[start-ofbiz-1]]\n==== Start OFBiz\n\n`gradlew \"ofbiz --start\"`\n\nstart is the default server task so this also works:\n\n`gradlew ofbiz`\n\n[[shutdown-ofbiz]]\n==== Shutdown OFBiz\n\n`gradlew \"ofbiz --shutdown\"`\n\n[[get-ofbiz-status]]\n==== Get OFBiz status\n\n`gradlew \"ofbiz --status\"`\n\n[[force-ofbiz-shutdown]]\n==== Force OFBiz shutdown\n\nTerminate all running OFBiz server instances by calling the appropriate\noperating system kill command. Use this command to force OFBiz termination if\nthe --shutdown command does not work. Usually this is needed when in the middle\nof data loading or testing in OFBiz.\n\nWarning: Be careful in using this command as force termination might lead to inconsistent state / data\n\n`gradlew terminateOfbiz`\n\n[[start-ofbiz-in-remote-debug-mode]]\n==== Start OFBiz in remote debug mode\n\nStarts OFBiz in remote debug mode and waits for debugger or IDEs to connect on\nport *5005*\n\n`gradlew ofbiz --debug-jvm`\n\n[[start-ofbiz-on-a-different-port]]\n==== Start OFBiz on a different port\n\nStart OFBiz of the network port offsetted by the range provided in the argument\nto --portoffset\n\n`gradlew \"ofbiz --start --portoffset 10000\"`\n\n[[start-ofbiz-in-the-background]]\n==== Start OFBiz in the background\n\nStart OFBiz in the background by forking it to a new process and redirecting the\noutput to *runtime/logs/console.log*\n\n`gradlew \"ofbizBackground --start\"`\n\nOR\n\n`gradlew ofbizBackground`\n\nYou can also offset the port, for example:\n\n`gradlew \"ofbizBackground --start --portoffset 10000\"`\n\n[[passing-jvm-runtime-options-to-ofbiz]]\n==== Passing JVM runtime options to OFBiz\n\nYou can pass JVM runtime options by specifying the project property `-PjvmArgs`.\n\n`gradlew ofbiz -PjvmArgs=\"-Xms1024M -Xmx2048M\" -Dsome.parameter=hello`\n\nIf you do not specify `jvmArgs`, a default of `-Xms128M -Xmx1024M` is set.\n\n\n\n[[data-loading-tasks]]\n=== Data loading tasks\n\nOFBiz contains the following data reader types:\n\n* *seed*: OFBiz and External Seed Data - to be maintained along with source and\nupdated whenever a system deployment is updated\n* *seed-initial*: OFBiz and External Seed Data - to be maintained along with\nsource like other seed data, but only loaded initially and not updated when a\nsystem is updated except manually reviewing each line\n* *demo*: OFBiz Only Demo Data\n* *ext*: External General Data (custom)\n* *ext-test*: External Test Data (custom)\n* *ext-demo*: External Demo Data (custom)\n* *tenant*: Data to load into the master tenants database \"ofbiztenant\". This\ndata is required to identify where a tenant's database is located. For more\ninformation you can review the relevant\nhttps://cwiki.apache.org/confluence/display/OFBIZ/Multitenancy+support[tenant\ndocumentation]\n\nAvailable options for the --load-data server command are the following:\n\n* *readers=[name]*: only load data from certain readers separated by comma. e.g.\nseed,seed-initial,ext\n* *file=[path]*: load a single file from location or several files separated by\ncommas. e.g. /my/file/1,/my/file/2\n* *dir=[path]*: load all data files found in directory\n* *component=[name]*: only load data from a specific component. e.g. base\n* *delegator=[name]*: use the defined delegator. Default is \"default\". If the\nvalue passed is *\"all-tenants\"* then OFBiz will load the data for all defined\ntenants in the system.\n* *group=[name]*: override the entity group (org.apache.ofbiz). e.g.\ncom.example.something\n* *timeout=[millis]*: timeout in milliseconds\n* *create-pks*: create primary keys\n* *drop-pks*: drop primary keys\n* *create-constraints*: create indexes and foreign keys after loading\n* *drop-constraints*: drop indexes and foreign keys before loading\n* *create-fks*: create dummy (placeholder) foreign keys\n* *maintain-txs*: maintain timestamps in data file\n* *try-inserts*: use mostly inserts\n* *repair-columns*: repair column sizes (default is true w/ drop-constraints)\n* *continue-on-failure*: By default OFBiz will fail and stop if it is unable to\nload any of the files it is attempting to load. By passing this property OFBiz\nwill ignore failures and continue loading all files\n\n[[load-specific-ofbiz-data]]\n==== Load specific OFBiz data\n\nyou can choose which data readers to pass in the following syntax:\n\n`gradlew \"ofbiz --load-data readers=\u003creaders-here-comma-separated\u003e\"`\n\nExample:\n\n`gradlew \"ofbiz --load-data readers=seed,seed-initial,ext,ext-demo\"`\n\n Beware that copying this command in Microsoft Word will automatically transform\nthe double dash in en dashes (Unicode 0x2013: –) Other cases not related to Word\nwere also reported.So when this command does not work check that you are using\ndash!\n\n[[load-all-ofbiz-data]]\n==== Load all OFBiz data\n\nLoads all data sets; meant for initial loading of generic OFBiz data. Can be\napplied for development, testing, demonstration, etc. purposes. Be aware that\nexecuting this task can result in your data being overwritten in your database\nof choice.\n\n`gradlew loadAll` OR `gradlew \"ofbiz --load-data\"`\n\n[CAUTION]\nUse with caution in production environments.\n\n\n[[load-seed-data]]\n==== Load seed data\n\nLoad ONLY the seed data (not seed-initial, demo, ext* or anything else); meant\nfor use after an update of the code to reload the seed data as it is generally\nmaintained along with the code and needs to be in sync for operation\n\n`gradlew \"ofbiz --load-data readers=seed\"`\n\n[[load-ext-data]]\n==== load ext data\n\nLoad seed, seed-initial and ext data; meant for manual/generic testing,\ndevelopment, or going into production with a derived system based on stock OFBiz\nwhere the ext data basically replaces the demo data\n\n`gradlew \"ofbiz --load-data readers=seed,seed-initial,ext\"`\n\n[[load-ext-test-data]]\n==== load ext test data\n\nLoad seed, seed-initial, ext and ext-test data; meant for automated testing with\na derived system based on stock OFBiz\n\n`gradlew \"ofbiz --load-data readers=seed,seed-initial,ext,ext-test\"`\n\n[[load-data-from-an-entity-file]]\n==== load data from an entity file\n\nLoad data from an XML file holding entity data.\n\n`gradlew \"ofbiz --load-data file=foo/bar/FileNameHere.xml\"`\n\n[[create-a-new-tenant]]\n==== create a new tenant\n\nCreate a new tenant in your environment, create the delegator, load initial data\nwith admin-user and password (needs multitenant=Y in general.properties). The\nfollowing project parameters are passed:\n\n* tenantId: mandatory\n* tenantName: optional, default is value of tenantId\n* domainName: optional, default is org.apache.ofbiz\n* tenantReaders: optional, default value is seed,seed-initial,demo\n* dbPlatform: optional, D(Derby), M(MySQL), O(Oracle), P(PostgreSQL) (default D)\n* dbIp: optional, ip address of the database\n* dbUser: optional, username of the database\n* dbPassword: optional, password of the database\n\n`gradlew createTenant -PtenantId=mytenant`\n\n`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`\n\nIf run successfully, the system creates a new tenant having:\n\n* delegator: default#$\\{tenandId} (e.g. default#mytenant)\n* admin user: $\\{tenantId}-admin (e.g. mytenant-admin)\n* admin user password: ofbiz\n\n[[load-data-for-a-specific-tenant]]\n==== load data for a specific tenant\n\nLoad data for one specific tenant in a multitenant environment. Note that you\nmust set multitenant=Y in general.properties and the following project\nparameters are passed:\n\n* tenantId (mandatory)\n* tenantReaders (optional)\n* tenantComponent (optional)\n\n`gradlew loadTenant -PtenantId=mytenant`\n\n`gradlew loadTenant -PtenantId=mytenant -PtenantReaders=seed,seed-initial,demo -PtenantComponent=base`\n\n\n\n[[testing-tasks]]\n=== Testing tasks\n\n// tag::testingtasks[]\n[[execute-all-unit-tests]]\n==== Execute all unit tests (no need access to the DB)\n\n`gradlew test`\n\n[[execute-all-integration-tests]]\n==== Execute all integration tests (need access to the DB)\n\n`gradlew testIntegration`\n\nOR\n\n`gradlew 'ofbiz --test'`\n\n[[execute-integration-tests-with-a-different-log-level]]\n==== Execute integration tests with a different log level\n\nIt is possible to start integration tests with a log level different from the\ndefault one. The log levels allowed are listed below from most verbose to least\nverbose:\n\n* always\n* verbose\n* timing\n* info\n* important\n* warning\n* error\n* fatal\n\n`gradlew \"ofbiz --test loglevel=fatal\"`\n\n[[execute-an-integration-test-case]]\n==== Execute an integration test case\n\nRun a test case, in this example the component is \"entity\" and the case name is\n\"entity-tests\"\n\n`gradlew \"ofbiz --test component=entity --test suitename=entitytests --test case=entity-query-tests\"`\n\n[[execute-an-integration-test-case-in-debug-mode-with-verbose-log]]\n==== Execute an integration test case in debug mode with verbose log\n\nListens on port *5005*\n\n`gradlew \"ofbiz --test component=entity --test loglevel=verbose\" --debug-jvm`\n\n[[execute-an-integration-test-suite]]\n==== Execute an integration test suite\n\n`gradlew \"ofbiz --test component=entity --test suitename=entitytests\"`\n\n[[execute-an-integration-test-suite-in-debug-mode]]\n==== Execute an integration test suite in debug mode\n\nListens on port *5005*\n\n`gradlew \"ofbiz --test component=entity --test suitename=entitytests\" --debug-jvm`\n\n[[execute-all-component-tests]]\n==== Execute all component tests\n\n`gradlew \"ofbiz --test component=entity\"`\n\n[[execute-all-component-tests-in-debug-mode]]\n==== Execute all component tests in debug mode\n\nListens on port *5005*\n\n`gradlew \"ofbiz --test component=entity\" --debug-jvm`\n\n\n\n// end::testingtasks[]\n\n\n[[miscellaneous-tasks]]\n=== Miscellaneous tasks\n\n[[run-all-tests-on-a-clean-system]]\n==== Run all tests on a clean system\n\n`gradlew cleanAll loadAll testIntegration`\n\n[[clean-all-generated-artifacts]]\n==== Clean all generated artifacts\n\n`gradlew cleanAll`\n\n[[refresh-the-generated-artifacts]]\n==== Refresh the generated artifacts\n\n`gradlew clean build`\n\n[[create-an-admin-user-account]]\n==== Create an admin user account\n\nCreate an admin user with login name MyUserName and default password with value\n\"ofbiz\". Upon first login OFBiz will request changing the default password\n\n`gradlew loadAdminUserLogin -PuserLoginId=MyUserName`\n\n[[compile-java-without-using-xlint-output]]\n==== Compile Java without using Xlint output\n\nBy default Xlint prints output of all warnings detected by the compiler, if you\nwant to silence them\n\n`gradlew -PXlint:none build`\n\n[[run-owasp-tool-to-identify-dependency-vulnerabilities-cves]]\n==== Run OWASP tool to identify dependency vulnerabilities (CVEs)\n\nThe below command activates a gradle plugin (OWASP) and Identifies and reports\nknown vulnerabilities (CVEs) in OFBiz library dependencies. The task takes time\nto complete, and once done, a report will be generated in\n$OFBIZ_HOME/build/reports/dependency-check-report.html\n\n`gradlew -PenableOwasp dependencyCheckAnalyze`\n\n[[setup-eclipse-project-for-ofbiz]]\n==== Setup eclipse project for OFBiz\n\nSetting up OFBiz on eclipse is done by simply running the below command and then\nimporting the project to eclipse. This command will generate the necessary\n*.classpath* and *.project* files for eclipse and it will also make the source\ncode for external libraries available in eclipse (i.e. you can view source\nthrough Ctrl + Click)\n\nThe first time you run this command it will take a long time to execute because\nit will download source packages available for project dependencies.\n\n`gradlew eclipse`\n\n[[package-and-distribute-ofbiz]]\n==== Package and distribute OFBiz\n\nIn order to deploy OFBiz on a target system and in particular in a production\nenvironment without requiring the target system to download Gradle and OFBiz\ndependencies from the internet, it is possible to generate an archive bundling\nOFBiz with all the Jars it depends on as a `tar` archive\n\n`gradlew distTar`\n\nor as a `zip` archive.\n\n`gradlew distZip`\n\nThose archives are available in the `build/distributions` directory.  To run\nOFBiz from those archive you must first unarchive them with `tar xf` or `unzip`\nand then from that directory you can run either `bin/ofbiz` shell script or\n`bin/ofbiz.bat` batch script with the appropriate ofbiz options.\n\n[[ofbiz-plugin-system]]\n== OFBiz plugin system\n\nOFBiz provides an extension mechanism through plugins. Plugins are standard\nOFBiz components that reside in the plugins directory. Plugins can be added\nmanually or fetched from a maven repository. The standard tasks for managing\nplugins are listed below.\n\n__________________________________________________________________________________\n_Note_: OFBiz plugin versions follow http://semver.org/[Semantic Versioning\n2.0.0]\n__________________________________________________________________________________\n\n[[pull-download-and-install-a-plugin-automatically]]\n=== Pull (download and install) a plugin automatically\n\nDownload a plugin with all its dependencies (plugins) and install them\none-by-one starting with the dependencies and ending with the plugin itself.\n\n`gradlew pullPlugin -PdependencyId=\"org.apache.ofbiz.plugin:myplugin:0.1.0\"`\n\nIf the plugin resides in a custom maven repository (not jcenter or localhost)\nthen you can use specify the repository using below command:\n\n`gradlew pullPlugin -PrepoUrl=\"http://www.example.com/custom-maven\" -PdependencyId=\"org.apache.ofbiz.plugin:myplugin:0.1.0\"`\n\nIf you need username and password to access the custom repository:\n\n`gradlew pullPlugin -PrepoUrl=\"http://www.example.com/custom-maven\" -PrepoUser=myuser -PrepoPassword=mypassword -PdependencyId=\"org.apache.ofbiz.plugin:myplugin:0.1.0\"`\n\n[[pull-an-official-plugin-from-source-control]]\n=== Pull an official plugin from source control\n\nDownload an official plugin from source control and place it in the plugins directory.\nIt's able to handle branches switches\n\n[IMPORTANT]\n====\nYou need to use the last Git version, at least a 2.26 version\n====\n\n\nMS Windows: `pullPluginSource example` +\nUnix-like OS: `./pullPluginSource.sh example`\n\n[[pull-all-official-plugins-from-source-control]]\n=== Pull all official plugins from source control\n\nDownload all officially supported plugins from source control and place them in /plugins.\nIt's able to handle branches switches\n\n[CAUTION]\n====\n This task deletes the /plugins directory and replaces it with the official plugins.\n====\n\n[IMPORTANT]\n====\nYou need to use the last Git version, at least a 2.26 version\n====\n\nMS Windows: `pullAllPluginsSource` +\nUnix-like OS: `./pullAllPluginsSource.sh`\n\n\n[[install-a-plugin]]\n=== Install a plugin\n\nIf you have a plugin called mycustomplugin and want to install it in OFBiz\nfollow the below instructions:\n\n* Extract the plugin if it is compressed\n* Place the extracted directory into /plugins\n* Run the below command\n\n`gradlew installPlugin -PpluginId=myplugin`\n\nThe above commands executes the task \"install\" in the plugin's build.gradle file\nif it exists\n\n[[uninstall-a-plugin]]\n=== Uninstall a plugin\n\nIf you have an existing plugin called mycustomplugin and you wish to uninstall\nrun the below command\n\n`gradlew uninstallPlugin -PpluginId=myplugin`\n\nThe above command executes the task \"uninstall\" in the plugin's build.gradle\nfile if it exists\n\n[[remove-a-plugin]]\n=== Remove a plugin\n\nCalls *uninstallPlugin* on an existing plugin and then delete it from the\nfile-system\n\n`gradlew removePlugin -PpluginId=myplugin`\n\n[[create-a-new-plugin]]\n=== Create a new plugin\n\nCreate a new plugin. The following project parameters are passed:\n\n* pluginId: mandatory\n* pluginResourceName: optional, default is the Capitalized value of pluginId\n* webappName: optional, default is the value of pluginId\n* basePermission: optional, default is the UPPERCASE value of pluginId\n\n`gradlew createPlugin -PpluginId=myplugin`\n\n`gradlew createPlugin -PpluginId=myplugin -PpluginResourceName=MyPlugin -PwebappName=mypluginweb -PbasePermission=MYSECURITY`\n\nThe above command creates a new plugin in /plugins/myplugin\n\n[[push-a-plugin-to-a-repository]]\n=== Push a plugin to a repository\n\nThis task publishes an OFBiz plugin into a maven package and then uploads it to\na maven repository. Currently, pushing is limited to localhost maven repository\n(work in progress). To push a plugin the following parameters are passed:\n\n* pluginId: mandatory\n* groupId: optional, defaults to org.apache.ofbiz.plugin\n* pluginVersion: optional, defaults to 0.1.0-SNAPSHOT\n* pluginDescription: optional, defaults to \"Publication of OFBiz plugin\n$\\{pluginId}\"\n\n`gradlew pushPlugin -PpluginId=myplugin`\n\n`gradlew pushPlugin -PpluginId=mycompany -PpluginGroup=com.mycompany.ofbiz.plugin -PpluginVersion=1.2.3 -PpluginDescription=\"Introduce special functionality X\"`\n\n[[miscellaneous-documentation]]\n== Miscellaneous Documentation\n\n[[further-reading]]\n=== Further reading\n\n* https://cwiki.apache.org/confluence/display/OFBIZ/FAQ%2B-%2BTips%2B-%2BTricks%2B-%2BCookbook%2B-%2BHowTo#FAQ-Tips-Tricks-Cookbook-HowTo-Knownissues[Known\nissues]\n* https://cwiki.apache.org/confluence/display/OFBIZ/FAQ%2B-%2BTips%2B-%2BTricks%2B-%2BCookbook%2B-%2BHowTo[Tips and Tricks]\n\n[[repository-and-directory-structure]]\n=== Repository and directory structure\n\nOFBiz is split into two repositories:\n\n* *ofbiz-framework*: Contains the core framework and main applications in the\nsystem like accounting, party, order, etc\n* *ofbiz-plugins*: Renamed from \"special-purpose\" and contains optional\ncomponents that are officially supported by the community\n\nFurthermore, the hot-deploy directory is removed as the plugins directory works\nas a replacement for both \"special-purpose\" and \"hot-deploy\".\n\nIf you need to load the components in the plugins directory in a specific order\nplace a component-load.xml file in the plugins directory listing the order.\n\nTo check out a plugin from source control use the Windows or Unix-like *pullPluginSource* script.\nTo check out all plugins from source control use the\n*pullAllPluginsSource* script. *Beware* this deletes a previously existing plugins\ndirectory.\n\n[[running-gradle-tasks-without-an-internet-connection]]\n=== Running gradle tasks without an internet connection\n\nOFBiz must run with an internet connection the *first time* it is prepared on\nthe system because it needs to download all the required dependencies.\n\nAfter preparing OFBiz the first time correctly, it is possible to run OFBiz\nwithout an internet connection by using the `--offline` command line switch\nwhich tells Gradle to fetch its dependencies from the cache.\n\nIf any dependencies are missing from the cache and you pass `--offline` switch\nthen the build execution will fail.\n\n[[setup-an-external-database-like-mysql-postgresql-etc]]\n=== Setup an external database like MySQL, PostgreSQL, etc\n\nTo setup an external database instead of the default embedded Apache Derby, you\nwill need to follow the following instructions:\n\n1.  Find the JDBC driver suitable for your database using one of the following\noptions:\n\n* Search for the JDBC driver in https://bintray.com/bintray/jcenter[jcenter] and\nplace it in build.gradle dependencies e.g.\n`runtime 'mysql:mysql-connector-java:8.0.30'`\n+\nOR\n* Download the JDBC driver jar and place it in $OFBIZ_HOME/lib or the lib\nsub-directory of any component\n\n2.  Modify the entityengine.xml file located in\n$OFBIZ_HOME/framework/entity/config to switch the default database to the one\nyou selected. For more details you can read the relevant section in the\nhttps://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide[technical\nsetup guide]\n\n[[setup-gradle-tab-completion-on-unix-like-systems]]\n=== Setup gradle tab-completion on Unix-like systems:\n\nTo get tab completion (auto complete gradle commands by pressing tab) you can\ndownload the script from the below link and place it in the appropriate location\nfor your system.\n\nhttps://edub.me/gradle-completion-bash[Gradle tab completion]\n\nFor example, on debian based systems, you can use the following command:\n\n`sudo curl -L -s https://edub.me/gradle-completion-bash -o /etc/bash_completion.d/gradle-tab-completion.bash`\n\n[[crypto-notice]]\n== Crypto notice\n\nThis distribution includes cryptographic software. The country in which you\ncurrently reside may have restrictions on the import, possession, use, and/or\nre-export to another country, of encryption software. BEFORE using any\nencryption software, please check your country's laws, regulations and policies\nconcerning the import, possession, or use, and re-export of encryption software,\nto see if this is permitted. See http://www.wassenaar.org/ for more information.\n\nThe U.S. Government Department of Commerce, Bureau of Industry and Security\n(BIS), has classified this software as Export Commodity Control Number (ECCN)\n5D002.C.1, which includes information security software using or performing\ncryptographic functions with asymmetric algorithms. The form and manner of this\nApache Software Foundation distribution makes it eligible for export under the\nLicense Exception ENC Technology Software Unrestricted (TSU) exception (see the\nBIS Export Administration Regulations, Section 740.13) for both object code and\nsource code.\n\nThe following provides more details on the included cryptographic software:\n\n* Various classes in OFBiz, including DesCrypt, HashCrypt, and BlowFishCrypt use\nlibraries from the Sun Java JDK API including java.security.* and javax.crypto.*\n(the JCE, Java Cryptography Extensions API)\n* Other classes such as HttpClient and various related ones use the JSSE (Java\nSecure Sockets Extension) API\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fofbiz-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fofbiz-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fofbiz-framework/lists"}