Author: jleroux
Date: Sun Aug 21 10:21:47 2016 New Revision: 1757043 URL: http://svn.apache.org/viewvc?rev=1757043&view=rev Log: "Updates documentation with respect to implementation of gradle as a replacement of ant" - https://issues.apache.org/jira/browse/OFBIZ-7677 Adds a convenient pandoc.bat as a reminder for now, to be enhanced later. Maybe it will become a Gradle task rather or maybe even several Gradle tasks if we use CONTRIBUTING-template.md and other possible *.md files Updates the README.md file: * Improve the "Load default OFBiz data" explanation * adds the ® sign in 2 places (OFBiz and Tomcat) * Misc other minor changes Replaces README.MD.html renamed README.md.html after regeneration Added: ofbiz/trunk/.README.md.html (with props) ofbiz/trunk/tools/pandoc.bat (with props) Removed: ofbiz/trunk/README.MD.html Modified: ofbiz/trunk/README.md Added: ofbiz/trunk/.README.md.html URL: http://svn.apache.org/viewvc/ofbiz/trunk/.README.md.html?rev=1757043&view=auto ============================================================================== --- ofbiz/trunk/.README.md.html (added) +++ ofbiz/trunk/.README.md.html Sun Aug 21 10:21:47 2016 @@ -0,0 +1,861 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>C:\projectASF-Mars\ofbiz\.README.md.html</title> + + +<style type="text/css"> +body { + color: #333; + font: 13px/1.4 "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif; + padding: 0; + margin: 0; +} + +a { + background: transparent; + color: #4183c4; + text-decoration: none; +} + +a:active, +a:hover { + outline: 0 none; + text-decoration: underline; +} + +abbr[title] { + border-bottom: 1px dotted; +} + +b, +strong { + font-weight: bold; +} + +dfn { + font-style: italic; +} +h1 { + font-size: 2em; + margin: 0.67em 0; +} +mark { + background: #ff0; + color: #000; +} +small { + font-size: 80%; +} +sub, sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + border: 0 none; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + box-sizing: content-box; + height: 0; +} + +code, +kbd, +pre, +samp { + font-family: monospace,monospace; + font-size: 1em; +} + +pre { + overflow: auto; + font: 12px Consolas,"Liberation Mono",Menlo,Courier,monospace; + margin-bottom: 0; + margin-top: 0; +} + +.markdown-body { + padding: 30px; + font-size: 16px; + line-height: 1.6; + word-wrap: break-word; +} + +.markdown-body>*:first-child { + margin-top: 0 !important; +} + +.markdown-body>*:last-child { + margin-bottom: 0 !important; +} + +.markdown-body .absent { + color: #c00; +} + +.markdown-body .anchor { + position: absolute; + top: 0; + bottom: 0; + left: 0; + display: block; + padding-right: 6px; + padding-left: 30px; + margin-left: -30px; +} + +.markdown-body .anchor:focus { + outline: none; +} + +.markdown-body h1, +.markdown-body h2, +.markdown-body h3, +.markdown-body h4, +.markdown-body h5, +.markdown-body h6 { + position: relative; + margin-top: 1em; + margin-bottom: 16px; + font-weight: bold; + line-height: 1.4; +} + +.markdown-body h1 .octicon-link, +.markdown-body h2 .octicon-link, +.markdown-body h3 .octicon-link, +.markdown-body h4 .octicon-link, +.markdown-body h5 .octicon-link, +.markdown-body h6 .octicon-link { + display: none; + color: #000; + vertical-align: middle; +} + +.markdown-body h1:hover .anchor, +.markdown-body h2:hover .anchor, +.markdown-body h3:hover .anchor, +.markdown-body h4:hover .anchor, +.markdown-body h5:hover .anchor, +.markdown-body h6:hover .anchor { + padding-left: 8px; + margin-left: -30px; + line-height: 1; + text-decoration: none; +} + +.markdown-body h1:hover .anchor .octicon-link, +.markdown-body h2:hover .anchor .octicon-link, +.markdown-body h3:hover .anchor .octicon-link, +.markdown-body h4:hover .anchor .octicon-link, +.markdown-body h5:hover .anchor .octicon-link, +.markdown-body h6:hover .anchor .octicon-link { + display: inline-block; +} + +.markdown-body h1 tt, +.markdown-body h1 code, +.markdown-body h2 tt, +.markdown-body h2 code, +.markdown-body h3 tt, +.markdown-body h3 code, +.markdown-body h4 tt, +.markdown-body h4 code, +.markdown-body h5 tt, +.markdown-body h5 code, +.markdown-body h6 tt, +.markdown-body h6 code { + font-size: inherit; +} + +.markdown-body h1 { + padding-bottom: 0.3em; + font-size: 2.25em; + line-height: 1.2; + border-bottom: 1px solid #eee; +} + +.markdown-body h2 { + padding-bottom: 0.3em; + font-size: 1.75em; + line-height: 1.225; + border-bottom: 1px solid #eee; +} + +.markdown-body h3 { + font-size: 1.5em; + line-height: 1.43; +} + +.markdown-body h4 { + font-size: 1.25em; +} + +.markdown-body h5 { + font-size: 1em; +} + +.markdown-body h6 { + font-size: 1em; + color: #777; +} + +.markdown-body p,.markdown-body blockquote, +.markdown-body ul,.markdown-body ol, +.markdown-body dl,.markdown-body table, +.markdown-body pre { + margin-top: 0; + margin-bottom: 16px; +} + +.markdown-body hr { + height: 4px; + padding: 0; + margin: 16px 0; + background-color: #e7e7e7; + border: 0 none; +} + +.markdown-body ul, +.markdown-body ol { + padding-left: 2em; +} + +.markdown-body ul.no-list, +.markdown-body ol.no-list { + padding: 0; + list-style-type: none; +} + +.markdown-body ul ul, +.markdown-body ul ol, +.markdown-body ol ol, +.markdown-body ol ul { + margin-top: 0; + margin-bottom: 0; +} + +.markdown-body li>p { + margin-top: 16px; +} + +.markdown-body dl { + padding: 0; +} + +.markdown-body dl dt { + padding: 0; + margin-top: 16px; + font-size: 1em; + font-style: italic; + font-weight: bold; +} + +.markdown-body dl dd { + padding: 0 16px; + margin-bottom: 16px; +} + +.markdown-body blockquote { + padding: 0 15px; + color: #777; + border-left: 4px solid #ddd; +} + +.markdown-body blockquote>:first-child { + margin-top: 0; +} + +.markdown-body blockquote>:last-child { + margin-bottom: 0; +} + +.markdown-body table { + display: block; + width: 100%; + overflow: auto; + word-break: normal; + word-break: keep-all; +} + +.markdown-body table th { + font-weight: bold; +} + +.markdown-body table th, +.markdown-body table td { + padding: 6px 13px; + border: 1px solid #ddd; +} + +.markdown-body table tr { + background-color: #fff; + border-top: 1px solid #ccc; +} + +.markdown-body table tr:nth-child(2n) { + background-color: #f8f8f8; +} + +.markdown-body img { + max-width: 100%; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.markdown-body span.frame { + display: block; + overflow: hidden; +} + +.markdown-body span.frame>span { + display: block; + float: left; + width: auto; + padding: 7px; + margin: 13px 0 0; + overflow: hidden; + border: 1px solid #ddd; +} + +.markdown-body span.frame span img { + display: block; + float: left; +} + +.markdown-body span.frame span span { + display: block; + padding: 5px 0 0; + clear: both; + color: #333; +} + +.markdown-body span.align-center { + display: block; + overflow: hidden; + clear: both; +} + +.markdown-body span.align-center>span { + display: block; + margin: 13px auto 0; + overflow: hidden; + text-align: center; +} + +.markdown-body span.align-center span img { + margin: 0 auto; + text-align: center; +} + +.markdown-body span.align-right { + display: block; + overflow: hidden; + clear: both; +} + +.markdown-body span.align-right>span { + display: block; + margin: 13px 0 0; + overflow: hidden; + text-align: right; +} + +.markdown-body span.align-right span img { + margin: 0; + text-align: right; +} + +.markdown-body span.float-left { + display: block; + float: left; + margin-right: 13px; + overflow: hidden; +} + +.markdown-body span.float-left span { + margin: 13px 0 0; +} + +.markdown-body span.float-right { + display: block; + float: right; + margin-left: 13px; + overflow: hidden; +} + +.markdown-body span.float-right>span { + display: block; + margin: 13px auto 0; + overflow: hidden; + text-align: right; +} + +.markdown-body code,.markdown-body tt { + padding: 0; + padding-top: 0.2em; + padding-bottom: 0.2em; + margin: 0; + font-size: 85%; + background-color: rgba(0,0,0,0.04); + border-radius: 3px; +} + +.markdown-body code:before, +.markdown-body code:after, +.markdown-body tt:before, +.markdown-body tt:after { + letter-spacing: -0.2em; + content: "\00a0"; +} + +.markdown-body code br, +.markdown-body tt br { + display: none; +} + +.markdown-body del code { + text-decoration: inherit; +} + +.markdown-body pre>code { + padding: 0; + margin: 0; + font-size: 100%; + word-break: normal; + white-space: pre; + background: transparent; + border: 0; +} + +.markdown-body .highlight { + margin-bottom: 16px; +} + +.markdown-body .highlight pre, +.markdown-body pre { + padding: 16px; + overflow: auto; + font-size: 85%; + line-height: 1.45; + background-color: #f7f7f7; + border-radius: 3px; +} + +.markdown-body .highlight pre { + margin-bottom: 0; + word-break: normal; +} + +.markdown-body pre { + word-wrap: normal; +} + +.markdown-body pre code, +.markdown-body pre tt { + display: inline; + max-width: initial; + padding: 0; + margin: 0; + overflow: initial; + line-height: inherit; + word-wrap: normal; + background-color: transparent; + border: 0; +} + +.markdown-body pre code:before, +.markdown-body pre code:after, +.markdown-body pre tt:before, +.markdown-body pre tt:after { + content: normal; +} + +.highlight .pl-coc, +.highlight .pl-entl, +.highlight .pl-entm, +.highlight .pl-eoa, +.highlight .pl-mai .pl-sf, +.highlight .pl-mm, +.highlight .pl-pdv, +.highlight .pl-sc, +.highlight .pl-som, +.highlight .pl-sr, +.highlight .pl-v, +.highlight .pl-vpf { + color: #0086b3; +} +.highlight .pl-eoac, +.highlight .pl-mdht, +.highlight .pl-mi1, +.highlight .pl-mri, +.highlight .pl-va, +.highlight .pl-vpu { + color: #008080; +} +.highlight .pl-c, +.highlight .pl-pdc { + color: #b4b7b4; + font-style: italic; +} +.highlight .pl-k, +.highlight .pl-ko, +.highlight .pl-kolp, +.highlight .pl-mc, +.highlight .pl-mr, +.highlight .pl-ms, +.highlight .pl-s, +.highlight .pl-sok, +.highlight .pl-st { + color: #6e5494; +} +.highlight .pl-ef, +.highlight .pl-enf, +.highlight .pl-enm, +.highlight .pl-entc, +.highlight .pl-eoi, +.highlight .pl-sf, +.highlight .pl-smc { + color: #d12089; +} +.highlight .pl-ens, +.highlight .pl-eoai, +.highlight .pl-kos, +.highlight .pl-mh .pl-pdh, +.highlight .pl-mp, +.highlight .pl-pde, +.highlight .pl-stp { + color: #458; +} +.highlight .pl-enti { + color: #d12089; + font-weight: bold; +} +.highlight .pl-cce, +.highlight .pl-enc, +.highlight .pl-kou, +.highlight .pl-mq { + color: #f93; +} +.highlight .pl-mp1 .pl-sf { + color: #458; + font-weight: bold; +} +.highlight .pl-cos, +.highlight .pl-ent, +.highlight .pl-md, +.highlight .pl-mdhf, +.highlight .pl-ml, +.highlight .pl-pdc1, +.highlight .pl-pds, +.highlight .pl-s1, +.highlight .pl-scp, +.highlight .pl-sol { + color: #df5000; +} +.highlight .pl-c1, +.highlight .pl-cn, +.highlight .pl-pse, +.highlight .pl-pse .pl-s2, +.highlight .pl-vi { + color: #a31515; +} +.highlight .pl-mb, +.highlight .pl-pdb { + color: #df5000; + font-weight: bold; +} +.highlight .pl-mi, +.highlight .pl-pdi { + color: #6e5494; + font-style: italic; +} +.highlight .pl-ms1 { + background-color: #f5f5f5; +} +.highlight .pl-mdh, +.highlight .pl-mdi { + font-weight: bold; +} +.highlight .pl-mdr { + color: #0086b3; + font-weight: bold; +} +.highlight .pl-s2 { + color: #333; +} +.highlight .pl-ii { + background-color: #df5000; + color: #fff; +} +.highlight .pl-ib { + background-color: #f93; +} +.highlight .pl-id { + background-color: #a31515; + color: #fff; +} +.highlight .pl-iu { + background-color: #b4b7b4; +} +.highlight .pl-mo { + color: #969896; +} + +</style> + + +<script type="text/javascript"> + +function getDocumentScrollTop() +{ + var res = document.body.scrollTop || document.documentElement.scrollTop || window.pageYOffset || 0; + // alert(res); + return res; +} + +function setDocumentScrollTop(ypos) +{ + window.scrollTo(0, ypos); +} + +</script> + + +</head> +<body class="markdown-body"> +<h1> <a id="apache-ofbiz" class="anchor" href="#apache-ofbiz" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Apache OFBiz®</h1> +<p>Welcome to <strong>Apache OFBiz®</strong>! A powerful top level Apache software project. OFBiz is an Enterprise Resource Planning (ERP) System written in Java and houses a large set of libraries, entities, services and features to run all aspects of your business.</p> +<p>For more details about OFBiz please visit the OFBiz Documentation page:</p> +<p><a href="http://ofbiz.apache.org/documentation.html">OFBiz documentation</a></p> +<p><a href="http://www.apache.org/licenses/LICENSE-2.0">OFBiz License</a></p> +<h2> <a id="system-requirements" class="anchor" href="#system-requirements" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>System requirements</h2> +<p>The only requirement to run OFBiz is to have the Java Development Kit (JDK) version 8 installed on your system (not just the JRE, but the full JDK) which you can download from the below link.</p> +<p><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK download</a></p> +<blockquote> + <p><em>Note</em>: if you are using Eclipse, make sure of running the appropriate Eclipse command <code>gradlew eclipse</code> before creating the project in Eclipse. This command will prepare OFBiz for Eclipse with the correct classpath and settings by creating the.classpath and .project files.</p> +</blockquote> +<h2> <a id="quick-start" class="anchor" href="#quick-start" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Quick start</h2> +<p>To quickly install and fire-up OFBiz, please follow the below instructions from the command line at the OFBiz top level directory (folder)</p> +<h3> <a id="prepare-ofbiz" class="anchor" href="#prepare-ofbiz" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Prepare OFBiz:</h3> +<p><strong>Note</strong>: Depending on your Internet connection speed it might take a long time for this step to complete if you are using OFBiz for the first time as it needs to download all dependencies. So please be patient!</p> +<p>MS Windows: <code>gradlew cleanAll loadDefault</code></p> +<p>Unix-like OS: <code>./gradlew cleanAll loadDefault</code></p> +<h3> <a id="start-ofbiz" class="anchor" href="#start-ofbiz" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Start OFBiz:</h3> +<p>MS Windows: <code>gradlew ofbiz</code></p> +<p>Unix-like OS: <code>./gradlew ofbiz</code></p> +<h3> <a id="visit-ofbiz-through-your-browser" class="anchor" href="#visit-ofbiz-through-your-browser" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Visit OFBiz through your browser:</h3> +<p><a href="https://localhost:8443/ordermgr">Order Back Office</a></p> +<p><a href="https://localhost:8443/accounting">Accounting Back Office</a></p> +<p><a href="https://localhost:8443/webtools">Administrator interface</a></p> +<p>You can log in with the user <strong>admin</strong> and password <strong>ofbiz</strong>.</p> +<blockquote> + <p><em>Note</em>: the default configuration uses an embedded Java database (Apache Derby) and embedded application server components such as Apache Tomcat®, Apache Geronimo (transaction manager), etc.</p> +</blockquote> +<hr /> +<h2> <a id="build-system-syntax" class="anchor" href="#build-system-syntax" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Build system syntax</h2> +<p>All build tasks are executed using the <strong>Gradle</strong> build system which is embedded in OFBiz. To execute build tasks go to OFBiz top-level directory (folder) and execute tasks from there.</p> +<h3> <a id="operating-system-syntax" class="anchor" href="#operating-system-syntax" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Operating System Syntax</h3> +<p>The syntax for tasks differ slightly between windows and Unix-like systems</p> +<ul> + <li><p><strong>Windows</strong>: <code>gradlew <tasks-in-here></code></p></li> + <li><p><strong>Unix-like</strong>: <code>./gradlew <tasks-in-here></code></p></li> +</ul> +<p>For the rest of this document, we will use the windows syntax, if you are on a Unix-like system, you need to add the <code>./</code> to gradlew</p> +<h3> <a id="types-of-tasks-in-gradle" class="anchor" href="#types-of-tasks-in-gradle" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Types of tasks in Gradle</h3> +<p>There are two types of tasks designed for OFBiz in Gradle:</p> +<ul> + <li><p><strong>Standard tasks</strong>: To execute general standard Gradle tasks</p></li> + <li> <p><strong>OFBiz server tasks</strong>: To execute OFBiz startup commands. These tasks start with one of the following words:</p> + <ul> + <li> <strong>ofbiz</strong> : standard server commands</li> + <li> <strong>ofbizDebug</strong> : server commands running in remote debug mode</li> + <li> <strong>ofbizBackground</strong> ; server commands running in a background forked process</li> + </ul> </li> +</ul> +<p>Tips: </p> +<ul> + <li><p>OFBiz <strong>server commands</strong> require <strong>"quoting"</strong> the commands. For example: <code>gradlew "ofbiz --help"</code></p></li> + <li><p>Shortcuts to task names can be used by writing the first letter of every word in a task name. However, you cannot use the shortcut form for OFBiz server tasks. Example: <code>gradlew loadAdminUserLogin -PuserLoginId=myadmin</code> = <code>gradlew lAUL -PuserLoginId=myadmin</code></p></li> +</ul> +<h4> <a id="example-standard-tasks" class="anchor" href="#example-standard-tasks" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Example standard tasks</h4> +<p><code>gradlew build</code></p> +<p><code>gradlew cleanAll loadDefault testIntegration</code></p> +<h4> <a id="example-ofbiz-server-tasks" class="anchor" href="#example-ofbiz-server-tasks" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Example OFBiz server tasks</h4> +<p><code>gradlew "ofbiz --help"</code></p> +<p><code>gradlew "ofbizDebug --test"</code></p> +<p><code>gradlew "ofbizBackground --start --portoffset 10000"</code></p> +<p><code>gradlew "ofbiz --shutdown --portoffset 10000"</code></p> +<p><code>gradlew ofbiz</code> (default is --start)</p> +<h4> <a id="example-mixed-tasks-standard-and-ofbiz-server" class="anchor" href="#example-mixed-tasks-standard-and-ofbiz-server" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Example mixed tasks (standard and OFBiz server)</h4> +<p><code>gradlew cleanAll loadDefault "ofbiz --start"</code></p> +<hr /> +<h2> <a id="quick-reference" class="anchor" href="#quick-reference" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Quick reference</h2> +<p>You can use the below common list of tasks as a quick reference for controlling the system. This document uses the windows task syntax, if you are on a Unix-like system, you need to add the <code>./</code> to gradlew i.e. <code>./gradlew</code></p> +<hr /> +<h3> <a id="help-tasks" class="anchor" href="#help-tasks" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Help tasks</h3> +<h4> <a id="list-ofbiz-server-commands" class="anchor" href="#list-ofbiz-server-commands" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>List OFBiz server commands</h4> +<p>List all available commands to control the OFBiz server</p> +<p><code>gradlew "ofbiz --help"</code></p> +<h4> <a id="list-build-tasks" class="anchor" href="#list-build-tasks" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>List build tasks</h4> +<p>List all available tasks from the build system</p> +<p><code>gradlew tasks</code></p> +<h4> <a id="list-build-projects" class="anchor" href="#list-build-projects" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>List build projects</h4> +<p>List all available projects in the build system</p> +<p><code>gradlew projects</code></p> +<h4> <a id="gradle-build-system-help" class="anchor" href="#gradle-build-system-help" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Gradle build system help</h4> +<p>Show usage and options for the Gradle build system</p> +<p><code>gradlew --help</code></p> +<hr /> +<h3> <a id="server-command-tasks" class="anchor" href="#server-command-tasks" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Server command tasks</h3> +<h4> <a id="start-ofbiz-1" class="anchor" href="#start-ofbiz-1" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Start OFBiz</h4> +<p><code>gradlew "ofbiz --start"</code></p> +<p>start is the default server task so this also works:</p> +<p><code>gradlew ofbiz</code></p> +<h4> <a id="shutdown-ofbiz" class="anchor" href="#shutdown-ofbiz" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Shutdown OFBiz</h4> +<p><code>gradlew "ofbiz --shutdown"</code></p> +<h4> <a id="get-ofbiz-status" class="anchor" href="#get-ofbiz-status" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Get OFBiz status</h4> +<p><code>gradlew "ofbiz --status"</code></p> +<h4> <a id="force-ofbiz-shutdown" class="anchor" href="#force-ofbiz-shutdown" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Force OFBiz shutdown</h4> +<p>Terminate all running OFBiz server instances by calling the appropriate operating system kill command. Use this command to force OFBiz termination if the --shutdown command does not work. Usually this is needed when in the middle of data loading or testing in OFBiz.</p> +<p>Warning: Be careful in using this command as force termination might lead to inconsistent state / data</p> +<p><code>gradlew terminateOfbiz</code></p> +<h4> <a id="start-ofbiz-in-remote-debug-mode" class="anchor" href="#start-ofbiz-in-remote-debug-mode" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Start OFBiz in remote debug mode</h4> +<p>Starts OFBiz in remote debug mode and waits for debugger or IDEs to connect on port <strong>5005</strong></p> +<p><code>gradlew "ofbizDebug --start"</code></p> +<p>OR</p> +<p><code>gradlew ofbizDebug</code></p> +<h4> <a id="start-ofbiz-on-a-different-port" class="anchor" href="#start-ofbiz-on-a-different-port" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Start OFBiz on a different port</h4> +<p>Start OFBiz of the network port offsetted by the range provided in the argument to --portoffset</p> +<p><code>gradlew "ofbiz --start --portoffset 10000"</code></p> +<h4> <a id="start-ofbiz-in-the-background" class="anchor" href="#start-ofbiz-in-the-background" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Start OFBiz in the background</h4> +<p>Start OFBiz in the background by forking it to a new process and redirecting the output to <strong>runtime/logs/console.log</strong></p> +<p><code>gradlew "ofbizBackground --start"</code></p> +<p>OR</p> +<p><code>gradlew ofbizBackground</code></p> +<p>You can also offset the port, for example:</p> +<p><code>gradlew "ofbizBackground --start --portoffset 10000"</code></p> +<hr /> +<h3> <a id="data-loading-tasks" class="anchor" href="#data-loading-tasks" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Data loading tasks</h3> +<p>OFBiz contains the following data reader types:</p> +<ul> + <li> <strong>seed</strong>: OFBiz and External Seed Data - to be maintained along with source and updated whenever a system deployment is updated</li> + <li> <strong>seed-initial</strong>: OFBiz and External Seed Data - to be maintained along with source like other seed data, but only loaded initially and not updated when a system is updated except manually reviewing each line</li> + <li> <strong>demo</strong>: OFBiz Only Demo Data</li> + <li> <strong>ext</strong>: External General Data (custom)</li> + <li> <strong>ext-test</strong>: External Test Data (custom)</li> + <li> <strong>ext-demo</strong>: External Demo Data (custom)</li> +</ul> +<p>you can choose which data readers to pass in the following syntax:</p> +<p><code>gradlew "ofbiz --load-data readers=<readers-here-comma-separated>"</code></p> +<p>Example:</p> +<p><code>gradlew "ofbiz --load-data readers=seed,seed-initial,ext,ext-demo"</code></p> +<h4> <a id="load-default-ofbiz-data" class="anchor" href="#load-default-ofbiz-data" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Load default OFBiz data</h4> +<p>Loads default data set; meant for initial loading of generic OFBiz data. Can be applied for development, testing, demonstration, etc. purposes. Be aware that executing this task can result in your data being overwritten in your database of choice. Use with caution in production environments. The default data set is defined by datasource using the read-data attribute, followed by the name of the data set, into the datasource element of the 'entityengine.xml' file.</p> +<p><code>gradlew loadDefault</code></p> +<p>OR</p> +<p><code>gradlew "ofbiz --load-data"</code></p> +<h4> <a id="load-seed-data" class="anchor" href="#load-seed-data" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Load seed data</h4> +<p>Load ONLY the seed data (not seed-initial, demo, ext* or anything else); meant for use after an update of the code to reload the seed data as it is generally maintained along with the code and needs to be in sync for operation</p> +<p><code>gradlew "ofbiz --load-data readers=seed"</code></p> +<h4> <a id="load-ext-data" class="anchor" href="#load-ext-data" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>load ext data</h4> +<p>Load seed, seed-initial and ext data; meant for manual/generic testing, development, or going into production with a derived system based on stock OFBiz where the ext data basically replaces the demo data</p> +<p><code>gradlew "ofbiz --load-data readers=seed,seed-initial,ext"</code></p> +<h4> <a id="load-ext-test-data" class="anchor" href="#load-ext-test-data" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>load ext test data</h4> +<p>Load seed, seed-initial, ext and ext-test data; meant for automated testing with a derived system based on stock OFBiz</p> +<p><code>gradlew "ofbiz --load-data readers=seed,seed-initial,ext,ext-test"</code></p> +<h4> <a id="load-data-from-an-entity-file" class="anchor" href="#load-data-from-an-entity-file" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>load data from an entity file</h4> +<p>Load data from an XML file holding entity data.</p> +<p><code>gradlew "ofbiz --load-data file=foo/bar/FileNameHere.xml"</code></p> +<h4> <a id="create-a-new-tenant" class="anchor" href="#create-a-new-tenant" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>create a new tenant</h4> +<p>Create a new tenant in your environment, create the delegator, load initial data with admin-user and password (needs multitenant=Y in general.properties). The following project parameters are passed:</p> +<ul> + <li>tenantId: mandatory</li> + <li>tenantName: mandatory, name of the tenant</li> + <li>domainName: optional, default is org.apache.ofbiz</li> + <li>tenantReaders: optional, default value is seed,seed-initial,demo</li> + <li>dbPlatform: optional, D(Derby), M(MySQL), O(Oracle), P(PostgreSQL) (default D) </li> + <li>dbIp: optional, ip address of the database</li> + <li>dbUser: optional, username of the database</li> + <li>dbPassword: optional, password of the database</li> +</ul> +<p><code>gradlew createTenant -PtenantId=mytenant -PtenantName="My Name"</code></p> +<p><code>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</code></p> +<p>If run successfully, the system creates a new tenant having:</p> +<ul> + <li>delegator: default#${tenandId} (e.g. default#mytenant)</li> + <li>admin user: ${tenantId}-admin (e.g. mytenant-admin)</li> + <li>admin user password: ofbiz</li> +</ul> +<h4> <a id="load-data-for-a-specific-tenant" class="anchor" href="#load-data-for-a-specific-tenant" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>load data for a specific tenant</h4> +<p>Load data for one specific tenant in a multitenant environment. Note that you must set multitenant=Y in general.properties and the following project parameters are passed:</p> +<ul> + <li>tenantId (mandatory)</li> + <li>tenantReaders (optional)</li> + <li>tenantComponent (optional)</li> +</ul> +<p><code>gradlew loadTenant -PtenantId=mytenant</code></p> +<p><code>gradlew loadTenant -PtenantId=mytenant -PtenantReaders=seed,seed-initial,demo -PtenantComponent=base</code></p> +<hr /> +<h3> <a id="testing-tasks" class="anchor" href="#testing-tasks" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Testing tasks</h3> +<h4> <a id="execute-all-unit-tests" class="anchor" href="#execute-all-unit-tests" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Execute all unit tests</h4> +<p><code>gradlew test</code></p> +<h4> <a id="execute-all-integration-tests" class="anchor" href="#execute-all-integration-tests" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Execute all integration tests</h4> +<p><code>gradlew testIntegration</code></p> +<p>OR</p> +<p><code>gradlew 'ofbiz --test'</code></p> +<h4> <a id="execute-an-integration-test-case" class="anchor" href="#execute-an-integration-test-case" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Execute an integration test case</h4> +<p>run a test case, in this example the componnet is "entity" and the case name is "entity-tests"</p> +<p><code>gradlew "ofbiz --test component=entity --test case=entity-tests"</code></p> +<h4> <a id="execute-an-integration-test-case-in-debug-mode" class="anchor" href="#execute-an-integration-test-case-in-debug-mode" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Execute an integration test case in debug mode</h4> +<p>listens on port <strong>5005</strong></p> +<p><code>gradlew "ofbizDebug --test component=entity --test case=entity-tests"</code></p> +<h4> <a id="execute-an-integration-test-suite" class="anchor" href="#execute-an-integration-test-suite" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Execute an integration test suite</h4> +<p>listens on port <strong>5005</strong></p> +<p><code>gradlew "ofbiz --test component=widget --test suitename=org.apache.ofbiz.widget.test.WidgetMacroLibraryTests"</code></p> +<h4> <a id="execute-an-integration-test-suite-in-debug-mode" class="anchor" href="#execute-an-integration-test-suite-in-debug-mode" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Execute an integration test suite in debug mode</h4> +<p>listens on port <strong>5005</strong></p> +<p><code>gradlew "ofbizDebug --test component=widget --test suitename=org.apache.ofbiz.widget.test.WidgetMacroLibraryTests"</code></p> +<hr /> +<h3> <a id="miscellaneous-tasks" class="anchor" href="#miscellaneous-tasks" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Miscellaneous tasks</h3> +<h4> <a id="launch-a-graphical-user-interface-of-gradle" class="anchor" href="#launch-a-graphical-user-interface-of-gradle" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Launch a graphical user interface of Gradle</h4> +<p>This is a very convenient feature of Gradle which allows the user to interact with Gradle through a swing GUI. You can save frequently used commands in a list of favorites for frequent reuse.</p> +<p><code>gradlew --gui</code></p> +<h4> <a id="run-all-tests-on-a-clean-system" class="anchor" href="#run-all-tests-on-a-clean-system" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Run all tests on a clean system</h4> +<p><code>gradlew cleanAll loadDefault testIntegration</code></p> +<h4> <a id="clean-all-generated-artifacts" class="anchor" href="#clean-all-generated-artifacts" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Clean all generated artifacts</h4> +<p><code>gradlew cleanAll</code></p> +<h4> <a id="refresh-the-generated-artifacts" class="anchor" href="#refresh-the-generated-artifacts" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Refresh the generated artifacts</h4> +<p><code>gradlew clean build</code></p> +<h4> <a id="create-a-custom-component-in-hot-deploy" class="anchor" href="#create-a-custom-component-in-hot-deploy" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Create a custom component in hot-deploy</h4> +<p><code>gradlew createComponent -PcomponentName=Custom -PcomponentResourceName=Custom -PwebappName=customweb -PbasePermission=OFBTOOLS,CUSTOM_SECURITY</code></p> +<h4> <a id="create-an-admin-user-account" class="anchor" href="#create-an-admin-user-account" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Create an admin user account</h4> +<p>Create an admin user with login name MyUserName and default password with value "ofbiz". Upon first login OFBiz will request changing the default password</p> +<p><code>gradlew loadAdminUserLogin -PuserLoginId=MyUserName</code></p> +<h4> <a id="setup-eclipse-project-for-ofbiz" class="anchor" href="#setup-eclipse-project-for-ofbiz" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Setup eclipse project for OFBiz</h4> +<p>Thanks to some gradle magic, setting up OFBiz on eclipse is very easy. All you need is to execute one command and then you can import the project to eclipse. This command will generate the necessary <strong>.classpath</strong> and <strong>.project</strong> files for eclipse.</p> +<p><code>gradlew eclipse</code></p> +<hr /> +<h2> <a id="useful-tips" class="anchor" href="#useful-tips" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Useful Tips</h2> +<h3> <a id="gradle-tab-completion-on-unix-like-systems" class="anchor" href="#gradle-tab-completion-on-unix-like-systems" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Gradle tab-completion on Unix-like systems:</h3> +<p>To get tab completion (auto complete gradle commands by pressing tab) you can download the script from the below link and place it in the appropriate location for your system.</p> +<p><a href="https://gist.github.com/nolanlawson/8694399">Gradle tab completion</a></p> +<p>For example, on debian based systems, you can use the following command:</p> +<p><code>sudo curl -L -s https://gist.github.com/nolanlawson/8694399/raw/gradle-tab-completion.bash -o /etc/bash_completion.d/gradle-tab-completion.bash</code></p> +</body> +</html> Propchange: ofbiz/trunk/.README.md.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/.README.md.html ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/.README.md.html ------------------------------------------------------------------------------ svn:mime-type = text/html Modified: ofbiz/trunk/README.md URL: http://svn.apache.org/viewvc/ofbiz/trunk/README.md?rev=1757043&r1=1757042&r2=1757043&view=diff ============================================================================== --- ofbiz/trunk/README.md (original) +++ ofbiz/trunk/README.md Sun Aug 21 10:21:47 2016 @@ -1,443 +1,449 @@ -Apache OFBiz -============ - -Welcome to __Apache OFBiz__! A powerful top level Apache software project. -OFBiz is an Enterprise Resource Planning (ERP) System written in Java and -houses a large set of libraries, entities, services and features to run -all aspects of your business. - -For more details about OFBiz please visit the OFBiz Documentation page: - -[OFBiz documentation](http://ofbiz.apache.org/documentation.html) - -[OFBiz License](http://www.apache.org/licenses/LICENSE-2.0) - -System requirements -------------------- - -The only requirement to run OFBiz is to have the Java Development Kit (JDK) -version 8 installed on your system (not just the JRE, but the full JDK) which -you can download from the below link. - -[JDK download](http://www.oracle.com/technetwork/java/javase/downloads/index.html) - ->_Note_: if you are using eclipse, make sure of running the appropriate eclipse -command `gradlew eclipse`. This command will prepare OFBiz for eclipse with -the correct classpath and settings. - -Quick start ------------ - -To quickly install and fire-up OFBiz, please follow the below instructions -from the command line at the OFBiz top level directory (folder) - -### Prepare OFBiz: - -__Note__: Depending on your Internet connection speed it might take a long -time for this step to complete if you are using OFBiz for the first time -as it needs to download all dependencies. So please be patient! - -MS Windows: -`gradlew cleanAll loadDefault` - -Unix-like OS: -`./gradlew cleanAll loadDefault` - -### Start OFBiz: - -MS Windows: -`gradlew ofbiz` - -Unix-like OS: -`./gradlew ofbiz` - -### Visit OFBiz through your browser: - -[Order Back Office](https://localhost:8443/ordermgr) - -[Accounting Back Office](https://localhost:8443/accounting) - -[Administrator interface](https://localhost:8443/webtools) - -You can log in with the user __admin__ and password __ofbiz__. - ->_Note_: the default configuration uses an embedded Java database -(Apache Derby) and embedded application server components such as -Tomcat, Geronimo (transaction manager), etc. - -* * * * * * * * * * * * - -Build system syntax -------------------- - -All build tasks are executed using the __Gradle__ build system which -is embedded in OFBiz. To execute build tasks go to OFBiz top-level -directory (folder) and execute tasks from there. - -### Operating System Syntax - -The syntax for tasks differ slightly between windows and Unix-like systems - -- __Windows__: `gradlew <tasks-in-here>` - -- __Unix-like__: `./gradlew <tasks-in-here>` - -For the rest of this document, we will use the windows syntax, if you are on -a Unix-like system, you need to add the `./` to gradlew - -### Types of tasks in Gradle - -There are two types of tasks designed for OFBiz in Gradle: - -- __Standard tasks__: To execute general standard Gradle tasks - -- __OFBiz server tasks__: To execute OFBiz startup commands. These - tasks start with one of the following words: - - __ofbiz__ : standard server commands - - __ofbizDebug__ : server commands running in remote debug mode - - __ofbizBackground__ ; server commands running in a background forked process - -Tips: - -- OFBiz __server commands__ require __"quoting"__ the - commands. For example: `gradlew "ofbiz --help"` - -- Shortcuts to task names can be used by writing the - first letter of every word in a task name. However, you - cannot use the shortcut form for OFBiz server tasks. - Example: `gradlew loadAdminUserLogin -PuserLoginId=myadmin` = `gradlew lAUL -PuserLoginId=myadmin` - -#### Example standard tasks - -`gradlew build` - -`gradlew cleanAll loadDefault testIntegration` - -#### Example OFBiz server tasks - -`gradlew "ofbiz --help"` - -`gradlew "ofbizDebug --test"` - -`gradlew "ofbizBackground --start --portoffset 10000"` - -`gradlew "ofbiz --shutdown --portoffset 10000"` - -`gradlew ofbiz` (default is --start) - -#### Example mixed tasks (standard and OFBiz server) - -`gradlew cleanAll loadDefault "ofbiz --start"` - -* * * * * * * * * * * * - -Quick reference ---------------- - -You can use the below common list of tasks as a quick reference -for controlling the system. This document uses the windows task -syntax, if you are on a Unix-like system, you need to add the -`./` to gradlew i.e. `./gradlew` - -* * * * * * * * * * * * - -### Help tasks - -#### List OFBiz server commands - -List all available commands to control the OFBiz server - -`gradlew "ofbiz --help"` - -#### List build tasks - -List all available tasks from the build system - -`gradlew tasks` - -#### List build projects - -List all available projects in the build system - -`gradlew projects` - -#### Gradle build system help - -Show usage and options for the Gradle build system - -`gradlew --help` - -* * * * * * * * * * * * - -### Server command tasks - -#### Start OFBiz - -`gradlew "ofbiz --start"` - -start is the default server task so this also works: - -`gradlew ofbiz` - -#### Shutdown OFBiz - -`gradlew "ofbiz --shutdown"` - -#### Get OFBiz status - -`gradlew "ofbiz --status"` - -#### Force OFBiz shutdown - -Terminate all running OFBiz server instances by calling -the appropriate operating system kill command. Use this -command to force OFBiz termination if the --shutdown -command does not work. Usually this is needed when in the -middle of data loading or testing in OFBiz. - -Warning: Be careful in using this command as force termination -might lead to inconsistent state / data - -`gradlew terminateOfbiz` - -#### Start OFBiz in remote debug mode - +Apache OFBiz® +============ + +Welcome to __Apache OFBiz®__! A powerful top level Apache software project. +OFBiz is an Enterprise Resource Planning (ERP) System written in Java and +houses a large set of libraries, entities, services and features to run +all aspects of your business. + +For more details about OFBiz please visit the OFBiz Documentation page: + +[OFBiz documentation](http://ofbiz.apache.org/documentation.html) + +[OFBiz License](http://www.apache.org/licenses/LICENSE-2.0) + +System requirements +------------------- + +The only requirement to run OFBiz is to have the Java Development Kit (JDK) +version 8 installed on your system (not just the JRE, but the full JDK) which +you can download from the below link. + +[JDK download](http://www.oracle.com/technetwork/java/javase/downloads/index.html) + +>_Note_: if you are using Eclipse, make sure of running the appropriate Eclipse +command `gradlew eclipse` before creating the project in Eclipse. +This command will prepare OFBiz for Eclipse with the correct classpath and settings +by creating the.classpath and .project files. + +Quick start +----------- + +To quickly install and fire-up OFBiz, please follow the below instructions +from the command line at the OFBiz top level directory (folder) + +### Prepare OFBiz: + +__Note__: Depending on your Internet connection speed it might take a long +time for this step to complete if you are using OFBiz for the first time +as it needs to download all dependencies. So please be patient! + +MS Windows: +`gradlew cleanAll loadDefault` + +Unix-like OS: +`./gradlew cleanAll loadDefault` + +### Start OFBiz: + +MS Windows: +`gradlew ofbiz` + +Unix-like OS: +`./gradlew ofbiz` + +### Visit OFBiz through your browser: + +[Order Back Office](https://localhost:8443/ordermgr) + +[Accounting Back Office](https://localhost:8443/accounting) + +[Administrator interface](https://localhost:8443/webtools) + +You can log in with the user __admin__ and password __ofbiz__. + +>_Note_: the default configuration uses an embedded Java database +(Apache Derby) and embedded application server components such as +Apache Tomcat®, Apache Geronimo (transaction manager), etc. + +* * * * * * * * * * * * + +Build system syntax +------------------- + +All build tasks are executed using the __Gradle__ build system which +is embedded in OFBiz. To execute build tasks go to OFBiz top-level +directory (folder) and execute tasks from there. + +### Operating System Syntax + +The syntax for tasks differ slightly between windows and Unix-like systems + +- __Windows__: `gradlew <tasks-in-here>` + +- __Unix-like__: `./gradlew <tasks-in-here>` + +For the rest of this document, we will use the windows syntax, if you are on +a Unix-like system, you need to add the `./` to gradlew + +### Types of tasks in Gradle + +There are two types of tasks designed for OFBiz in Gradle: + +- __Standard tasks__: To execute general standard Gradle tasks + +- __OFBiz server tasks__: To execute OFBiz startup commands. These + tasks start with one of the following words: + - __ofbiz__ : standard server commands + - __ofbizDebug__ : server commands running in remote debug mode + - __ofbizBackground__ ; server commands running in a background forked process + +Tips: + +- OFBiz __server commands__ require __"quoting"__ the + commands. For example: `gradlew "ofbiz --help"` + +- Shortcuts to task names can be used by writing the + first letter of every word in a task name. However, you + cannot use the shortcut form for OFBiz server tasks. + Example: `gradlew loadAdminUserLogin -PuserLoginId=myadmin` = `gradlew lAUL -PuserLoginId=myadmin` + +#### Example standard tasks + +`gradlew build` + +`gradlew cleanAll loadDefault testIntegration` + +#### Example OFBiz server tasks + +`gradlew "ofbiz --help"` + +`gradlew "ofbizDebug --test"` + +`gradlew "ofbizBackground --start --portoffset 10000"` + +`gradlew "ofbiz --shutdown --portoffset 10000"` + +`gradlew ofbiz` (default is --start) + +#### Example mixed tasks (standard and OFBiz server) + +`gradlew cleanAll loadDefault "ofbiz --start"` + +* * * * * * * * * * * * + +Quick reference +--------------- + +You can use the below common list of tasks as a quick reference +for controlling the system. This document uses the windows task +syntax, if you are on a Unix-like system, you need to add the +`./` to gradlew i.e. `./gradlew` + +* * * * * * * * * * * * + +### Help tasks + +#### List OFBiz server commands + +List all available commands to control the OFBiz server + +`gradlew "ofbiz --help"` + +#### List build tasks + +List all available tasks from the build system + +`gradlew tasks` + +#### List build projects + +List all available projects in the build system + +`gradlew projects` + +#### Gradle build system help + +Show usage and options for the Gradle build system + +`gradlew --help` + +* * * * * * * * * * * * + +### Server command tasks + +#### Start OFBiz + +`gradlew "ofbiz --start"` + +start is the default server task so this also works: + +`gradlew ofbiz` + +#### Shutdown OFBiz + +`gradlew "ofbiz --shutdown"` + +#### Get OFBiz status + +`gradlew "ofbiz --status"` + +#### Force OFBiz shutdown + +Terminate all running OFBiz server instances by calling +the appropriate operating system kill command. Use this +command to force OFBiz termination if the --shutdown +command does not work. Usually this is needed when in the +middle of data loading or testing in OFBiz. + +Warning: Be careful in using this command as force termination +might lead to inconsistent state / data + +`gradlew terminateOfbiz` + +#### Start OFBiz in remote debug mode + Starts OFBiz in remote debug mode and waits for debugger or IDEs to connect on port __5005__ - -`gradlew "ofbizDebug --start"` - -OR - -`gradlew ofbizDebug` - -#### Start OFBiz on a different port - -Start OFBiz of the network port offsetted by the range -provided in the argument to --portoffset - -`gradlew "ofbiz --start --portoffset 10000"` - -#### Start OFBiz in the background - -Start OFBiz in the background by forking it to a new -process and redirecting the output to __runtime/logs/console.log__ - -`gradlew "ofbizBackground --start"` - -OR - -`gradlew ofbizBackground` - -You can also offset the port, for example: - -`gradlew "ofbizBackground --start --portoffset 10000"` - -* * * * * * * * * * * * - -### Data loading tasks - -OFBiz contains the following data reader types: - -- __seed__: OFBiz and External Seed Data - to be maintained along with source and - updated whenever a system deployment is updated -- __seed-initial__: OFBiz and External Seed Data - to be maintained along with - source like other seed data, but only loaded initially and not updated - when a system is updated except manually reviewing each line -- __demo__: OFBiz Only Demo Data -- __ext__: External General Data (custom) -- __ext-test__: External Test Data (custom) -- __ext-demo__: External Demo Data (custom) - -you can choose which data readers to pass in the following syntax: - -`gradlew "ofbiz --load-data readers=<readers-here-comma-separated>"` - -Example: - -`gradlew "ofbiz --load-data readers=seed,seed-initial,ext,ext-demo"` - -#### Load default OFBiz data - -Load default data; meant for generic OFBiz development, -testing, demonstration, etc purposes - -`gradlew loadDefault` - -OR - -`gradlew "ofbiz --load-data"` - -#### Load seed data - -Load ONLY the seed data (not seed-initial, demo, ext* or anything else); -meant for use after an update of the code to reload the seed data -as it is generally maintained along with the code and needs to be -in sync for operation - -`gradlew "ofbiz --load-data readers=seed"` - -#### load ext data - -Load seed, seed-initial and ext data; meant for manual/generic -testing, development, or going into production with a derived -system based on stock OFBiz where the ext data basically -replaces the demo data - -`gradlew "ofbiz --load-data readers=seed,seed-initial,ext"` - -#### load ext test data - -Load seed, seed-initial, ext and ext-test data; meant for -automated testing with a derived system based on stock OFBiz - -`gradlew "ofbiz --load-data readers=seed,seed-initial,ext,ext-test"` - -#### load data from an entity file - -Load data from an XML file holding entity data. - -`gradlew "ofbiz --load-data file=foo/bar/FileNameHere.xml"` - -#### create a new tenant - -Create a new tenant in your environment, create the delegator, load -initial data with admin-user and password (needs multitenant=Y in -general.properties). The following project parameters are passed: - -- tenantId: mandatory -- tenantName: mandatory, name of the tenant -- domainName: optional, default is org.apache.ofbiz -- tenantReaders: optional, default value is seed,seed-initial,demo -- dbPlatform: optional, D(Derby), M(MySQL), O(Oracle), P(PostgreSQL) (default D) -- dbIp: optional, ip address of the database -- dbUser: optional, username of the database -- dbPassword: optional, password of the database - -`gradlew createTenant -PtenantId=mytenant -PtenantName="My Name"` - -`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` - -If run successfully, the system creates a new tenant having: - -- delegator: default#${tenandId} (e.g. default#mytenant) -- admin user: ${tenantId}-admin (e.g. mytenant-admin) -- admin user password: ofbiz - -#### load data for a specific tenant - -Load data for one specific tenant in a multitenant environment. Note -that you must set multitenant=Y in general.properties and the -following project parameters are passed: - -- tenantId (mandatory) -- tenantReaders (optional) -- tenantComponent (optional) - -`gradlew loadTenant -PtenantId=mytenant` - -`gradlew loadTenant -PtenantId=mytenant -PtenantReaders=seed,seed-initial,demo -PtenantComponent=base` - -* * * * * * * * * * * * - -### Testing tasks - -#### Execute all unit tests - -`gradlew test` - -#### Execute all integration tests - -`gradlew testIntegration` - -OR - -`gradlew 'ofbiz --test'` - -#### Execute an integration test case - -run a test case, in this example the componnet is "entity" and the case -name is "entity-tests" - -`gradlew "ofbiz --test component=entity --test case=entity-tests"` - -#### Execute an integration test case in debug mode - -listens on port __5005__ - -`gradlew "ofbizDebug --test component=entity --test case=entity-tests"` - -#### Execute an integration test suite - -listens on port __5005__ - -`gradlew "ofbiz --test component=widget --test suitename=org.apache.ofbiz.widget.test.WidgetMacroLibraryTests"` - -#### Execute an integration test suite in debug mode - -listens on port __5005__ - -`gradlew "ofbizDebug --test component=widget --test suitename=org.apache.ofbiz.widget.test.WidgetMacroLibraryTests"` - -* * * * * * * * * * * * - -### Miscellaneous tasks - -#### Launch a graphical user interface of Gradle - -This is a very convenient feature of Gradle which -allows the user to interact with Gradle through a -swing GUI. You can save frequently used commands -in a list of favorites for frequent reuse. - -`gradlew --gui` - -#### Run all tests on a clean system - -`gradlew cleanAll loadDefault testIntegration` - -#### Clean all generated artifacts - -`gradlew cleanAll` - -#### Refresh the generated artifacts - -`gradlew clean build` - -#### Create a custom component in hot-deploy - -`gradlew createComponent -PcomponentName=Custom -PcomponentResourceName=Custom -PwebappName=customweb -PbasePermission=OFBTOOLS,CUSTOM_SECURITY` - -#### Create an admin user account - -Create an admin user with login name MyUserName and default password -with value "ofbiz". Upon first login OFBiz will request changing the -default password - -`gradlew loadAdminUserLogin -PuserLoginId=MyUserName` - -#### Setup eclipse project for OFBiz - -Thanks to some gradle magic, setting up OFBiz on eclipse is very -easy. All you need is to execute one command and then you can -import the project to eclipse. This command will generate -the necessary __.classpath__ and __.project__ files for eclipse. - -`gradlew eclipse` - -* * * * * * * * * * * * - -Useful Tips ------------ - -### Gradle tab-completion on Unix-like systems: - -To get tab completion (auto complete gradle commands by pressing tab) -you can download the script from the below link and place it in the -appropriate location for your system. - -[Gradle tab completion](https://gist.github.com/nolanlawson/8694399) - -For example, on debian based systems, you can use the following command: - + +`gradlew "ofbizDebug --start"` + +OR + +`gradlew ofbizDebug` + +#### Start OFBiz on a different port + +Start OFBiz of the network port offsetted by the range +provided in the argument to --portoffset + +`gradlew "ofbiz --start --portoffset 10000"` + +#### Start OFBiz in the background + +Start OFBiz in the background by forking it to a new +process and redirecting the output to __runtime/logs/console.log__ + +`gradlew "ofbizBackground --start"` + +OR + +`gradlew ofbizBackground` + +You can also offset the port, for example: + +`gradlew "ofbizBackground --start --portoffset 10000"` + +* * * * * * * * * * * * + +### Data loading tasks + +OFBiz contains the following data reader types: + +- __seed__: OFBiz and External Seed Data - to be maintained along with source and + updated whenever a system deployment is updated +- __seed-initial__: OFBiz and External Seed Data - to be maintained along with + source like other seed data, but only loaded initially and not updated + when a system is updated except manually reviewing each line +- __demo__: OFBiz Only Demo Data +- __ext__: External General Data (custom) +- __ext-test__: External Test Data (custom) +- __ext-demo__: External Demo Data (custom) + +you can choose which data readers to pass in the following syntax: + +`gradlew "ofbiz --load-data readers=<readers-here-comma-separated>"` + +Example: + +`gradlew "ofbiz --load-data readers=seed,seed-initial,ext,ext-demo"` + +#### Load default OFBiz data + +Loads default data set; meant for initial loading of generic OFBiz data. +Can be applied for development, testing, demonstration, etc. purposes. +Be aware that executing this task can result in your data being overwritten in your database of choice. +Use with caution in production environments. +The default data set is defined by datasource using the read-data attribute, +followed by the name of the data set, into the datasource element of the 'entityengine.xml' file. + + +`gradlew loadDefault` + +OR + +`gradlew "ofbiz --load-data"` + +#### Load seed data + +Load ONLY the seed data (not seed-initial, demo, ext* or anything else); +meant for use after an update of the code to reload the seed data +as it is generally maintained along with the code and needs to be +in sync for operation + +`gradlew "ofbiz --load-data readers=seed"` + +#### load ext data + +Load seed, seed-initial and ext data; meant for manual/generic +testing, development, or going into production with a derived +system based on stock OFBiz where the ext data basically +replaces the demo data + +`gradlew "ofbiz --load-data readers=seed,seed-initial,ext"` + +#### load ext test data + +Load seed, seed-initial, ext and ext-test data; meant for +automated testing with a derived system based on stock OFBiz + +`gradlew "ofbiz --load-data readers=seed,seed-initial,ext,ext-test"` + +#### load data from an entity file + +Load data from an XML file holding entity data. + +`gradlew "ofbiz --load-data file=foo/bar/FileNameHere.xml"` + +#### create a new tenant + +Create a new tenant in your environment, create the delegator, load +initial data with admin-user and password (needs multitenant=Y in +general.properties). The following project parameters are passed: + +- tenantId: mandatory +- tenantName: mandatory, name of the tenant +- domainName: optional, default is org.apache.ofbiz +- tenantReaders: optional, default value is seed,seed-initial,demo +- dbPlatform: optional, D(Derby), M(MySQL), O(Oracle), P(PostgreSQL) (default D) +- dbIp: optional, ip address of the database +- dbUser: optional, username of the database +- dbPassword: optional, password of the database + +`gradlew createTenant -PtenantId=mytenant -PtenantName="My Name"` + +`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` + +If run successfully, the system creates a new tenant having: + +- delegator: default#${tenandId} (e.g. default#mytenant) +- admin user: ${tenantId}-admin (e.g. mytenant-admin) +- admin user password: ofbiz + +#### load data for a specific tenant + +Load data for one specific tenant in a multitenant environment. Note +that you must set multitenant=Y in general.properties and the +following project parameters are passed: + +- tenantId (mandatory) +- tenantReaders (optional) +- tenantComponent (optional) + +`gradlew loadTenant -PtenantId=mytenant` + +`gradlew loadTenant -PtenantId=mytenant -PtenantReaders=seed,seed-initial,demo -PtenantComponent=base` + +* * * * * * * * * * * * + +### Testing tasks + +#### Execute all unit tests + +`gradlew test` + +#### Execute all integration tests + +`gradlew testIntegration` + +OR + +`gradlew 'ofbiz --test'` + +#### Execute an integration test case + +run a test case, in this example the componnet is "entity" and the case +name is "entity-tests" + +`gradlew "ofbiz --test component=entity --test case=entity-tests"` + +#### Execute an integration test case in debug mode + +listens on port __5005__ + +`gradlew "ofbizDebug --test component=entity --test case=entity-tests"` + +#### Execute an integration test suite + +listens on port __5005__ + +`gradlew "ofbiz --test component=widget --test suitename=org.apache.ofbiz.widget.test.WidgetMacroLibraryTests"` + +#### Execute an integration test suite in debug mode + +listens on port __5005__ + +`gradlew "ofbizDebug --test component=widget --test suitename=org.apache.ofbiz.widget.test.WidgetMacroLibraryTests"` + +* * * * * * * * * * * * + +### Miscellaneous tasks + +#### Launch a graphical user interface of Gradle + +This is a very convenient feature of Gradle which +allows the user to interact with Gradle through a +swing GUI. You can save frequently used commands +in a list of favorites for frequent reuse. + +`gradlew --gui` + +#### Run all tests on a clean system + +`gradlew cleanAll loadDefault testIntegration` + +#### Clean all generated artifacts + +`gradlew cleanAll` + +#### Refresh the generated artifacts + +`gradlew clean build` + +#### Create a custom component in hot-deploy + +`gradlew createComponent -PcomponentName=Custom -PcomponentResourceName=Custom -PwebappName=customweb -PbasePermission=OFBTOOLS,CUSTOM_SECURITY` + +#### Create an admin user account + +Create an admin user with login name MyUserName and default password +with value "ofbiz". Upon first login OFBiz will request changing the +default password + +`gradlew loadAdminUserLogin -PuserLoginId=MyUserName` + +#### Setup eclipse project for OFBiz + +Thanks to some gradle magic, setting up OFBiz on eclipse is very +easy. All you need is to execute one command and then you can +import the project to eclipse. This command will generate +the necessary __.classpath__ and __.project__ files for eclipse. + +`gradlew eclipse` + +* * * * * * * * * * * * + +Useful Tips +----------- + +### Gradle tab-completion on Unix-like systems: + +To get tab completion (auto complete gradle commands by pressing tab) +you can download the script from the below link and place it in the +appropriate location for your system. + +[Gradle tab completion](https://gist.github.com/nolanlawson/8694399) + +For example, on debian based systems, you can use the following command: + `sudo curl -L -s https://gist.github.com/nolanlawson/8694399/raw/gradle-tab-completion.bash -o /etc/bash_completion.d/gradle-tab-completion.bash` \ No newline at end of file Added: ofbiz/trunk/tools/pandoc.bat URL: http://svn.apache.org/viewvc/ofbiz/trunk/tools/pandoc.bat?rev=1757043&view=auto ============================================================================== --- ofbiz/trunk/tools/pandoc.bat (added) +++ ofbiz/trunk/tools/pandoc.bat Sun Aug 21 10:21:47 2016 @@ -0,0 +1 @@ +pandoc readme.md -s -o README.MD.html \ No newline at end of file Propchange: ofbiz/trunk/tools/pandoc.bat ------------------------------------------------------------------------------ svn:eol-style = CRLF |
Free forum by Nabble | Edit this page |