svn commit: r1757044 - in /ofbiz/trunk/tools: documentation/ documentation/README.md.html documentation/pandoc.bat pandoc.bat

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1757044 - in /ofbiz/trunk/tools: documentation/ documentation/README.md.html documentation/pandoc.bat pandoc.bat

jleroux@apache.org
Author: jleroux
Date: Sun Aug 21 10:47:54 2016
New Revision: 1757044

URL: http://svn.apache.org/viewvc?rev=1757044&view=rev
Log:
"Updates documentation with respect to implementation of gradle as a replacement of ant" - https://issues.apache.org/jira/browse/OFBIZ-7677

As suggested by Taher moves README.md.html to another folder than root. FOr now I decided to create a documentation sub folder into tools and to put it there while also moving pandoc.bat there. This is a WIP anyway...

Added:
    ofbiz/trunk/tools/documentation/
    ofbiz/trunk/tools/documentation/README.md.html   (with props)
    ofbiz/trunk/tools/documentation/pandoc.bat   (with props)
Removed:
    ofbiz/trunk/tools/pandoc.bat

Added: ofbiz/trunk/tools/documentation/README.md.html
URL: http://svn.apache.org/viewvc/ofbiz/trunk/tools/documentation/README.md.html?rev=1757044&view=auto
==============================================================================
--- ofbiz/trunk/tools/documentation/README.md.html (added)
+++ ofbiz/trunk/tools/documentation/README.md.html Sun Aug 21 10:47:54 2016
@@ -0,0 +1,228 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <meta http-equiv="Content-Style-Type" content="text/css" />
+  <meta name="generator" content="pandoc" />
+  <title></title>
+  <style type="text/css">code{white-space: pre;}</style>
+</head>
+<body>
+<h1 id="apache-ofbiz">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 id="system-requirements">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 id="quick-start">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 id="prepare-ofbiz">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 id="start-ofbiz">Start OFBiz:</h3>
+<p>MS Windows: <code>gradlew ofbiz</code></p>
+<p>Unix-like OS: <code>./gradlew ofbiz</code></p>
+<h3 id="visit-ofbiz-through-your-browser">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 id="build-system-syntax">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 id="operating-system-syntax">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 &lt;tasks-in-here&gt;</code></p></li>
+<li><p><strong>Unix-like</strong>: <code>./gradlew &lt;tasks-in-here&gt;</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 id="types-of-tasks-in-gradle">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><strong>OFBiz server tasks</strong>: To execute OFBiz startup commands. These tasks start with one of the following words:</li>
+<li><strong>ofbiz</strong> : standard server commands</li>
+<li><strong>ofbizDebug</strong> : server commands running in remote debug mode</li>
+<li><p><strong>ofbizBackground</strong> ; server commands running in a background forked process</p></li>
+</ul>
+<p>Tips:</p>
+<ul>
+<li><p>OFBiz <strong>server commands</strong> require <strong>&quot;quoting&quot;</strong> the commands. For example: <code>gradlew &quot;ofbiz --help&quot;</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 id="example-standard-tasks">Example standard tasks</h4>
+<p><code>gradlew build</code></p>
+<p><code>gradlew cleanAll loadDefault testIntegration</code></p>
+<h4 id="example-ofbiz-server-tasks">Example OFBiz server tasks</h4>
+<p><code>gradlew &quot;ofbiz --help&quot;</code></p>
+<p><code>gradlew &quot;ofbizDebug --test&quot;</code></p>
+<p><code>gradlew &quot;ofbizBackground --start --portoffset 10000&quot;</code></p>
+<p><code>gradlew &quot;ofbiz --shutdown --portoffset 10000&quot;</code></p>
+<p><code>gradlew ofbiz</code> (default is --start)</p>
+<h4 id="example-mixed-tasks-standard-and-ofbiz-server">Example mixed tasks (standard and OFBiz server)</h4>
+<p><code>gradlew cleanAll loadDefault &quot;ofbiz --start&quot;</code></p>
+<hr />
+<h2 id="quick-reference">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 id="help-tasks">Help tasks</h3>
+<h4 id="list-ofbiz-server-commands">List OFBiz server commands</h4>
+<p>List all available commands to control the OFBiz server</p>
+<p><code>gradlew &quot;ofbiz --help&quot;</code></p>
+<h4 id="list-build-tasks">List build tasks</h4>
+<p>List all available tasks from the build system</p>
+<p><code>gradlew tasks</code></p>
+<h4 id="list-build-projects">List build projects</h4>
+<p>List all available projects in the build system</p>
+<p><code>gradlew projects</code></p>
+<h4 id="gradle-build-system-help">Gradle build system help</h4>
+<p>Show usage and options for the Gradle build system</p>
+<p><code>gradlew --help</code></p>
+<hr />
+<h3 id="server-command-tasks">Server command tasks</h3>
+<h4 id="start-ofbiz-1">Start OFBiz</h4>
+<p><code>gradlew &quot;ofbiz --start&quot;</code></p>
+<p>start is the default server task so this also works:</p>
+<p><code>gradlew ofbiz</code></p>
+<h4 id="shutdown-ofbiz">Shutdown OFBiz</h4>
+<p><code>gradlew &quot;ofbiz --shutdown&quot;</code></p>
+<h4 id="get-ofbiz-status">Get OFBiz status</h4>
+<p><code>gradlew &quot;ofbiz --status&quot;</code></p>
+<h4 id="force-ofbiz-shutdown">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 id="start-ofbiz-in-remote-debug-mode">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 &quot;ofbizDebug --start&quot;</code></p>
+<p>OR</p>
+<p><code>gradlew ofbizDebug</code></p>
+<h4 id="start-ofbiz-on-a-different-port">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 &quot;ofbiz --start --portoffset 10000&quot;</code></p>
+<h4 id="start-ofbiz-in-the-background">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 &quot;ofbizBackground --start&quot;</code></p>
+<p>OR</p>
+<p><code>gradlew ofbizBackground</code></p>
+<p>You can also offset the port, for example:</p>
+<p><code>gradlew &quot;ofbizBackground --start --portoffset 10000&quot;</code></p>
+<hr />
+<h3 id="data-loading-tasks">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 &quot;ofbiz --load-data readers=&lt;readers-here-comma-separated&gt;&quot;</code></p>
+<p>Example:</p>
+<p><code>gradlew &quot;ofbiz --load-data readers=seed,seed-initial,ext,ext-demo&quot;</code></p>
+<h4 id="load-default-ofbiz-data">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 &quot;ofbiz --load-data&quot;</code></p>
+<h4 id="load-seed-data">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 &quot;ofbiz --load-data readers=seed&quot;</code></p>
+<h4 id="load-ext-data">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 &quot;ofbiz --load-data readers=seed,seed-initial,ext&quot;</code></p>
+<h4 id="load-ext-test-data">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 &quot;ofbiz --load-data readers=seed,seed-initial,ext,ext-test&quot;</code></p>
+<h4 id="load-data-from-an-entity-file">load data from an entity file</h4>
+<p>Load data from an XML file holding entity data.</p>
+<p><code>gradlew &quot;ofbiz --load-data file=foo/bar/FileNameHere.xml&quot;</code></p>
+<h4 id="create-a-new-tenant">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=&quot;My Name&quot;</code></p>
+<p><code>gradlew createTenant -PtenantId=mytenant -PtenantName=&quot;My Name&quot; -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 id="load-data-for-a-specific-tenant">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 id="testing-tasks">Testing tasks</h3>
+<h4 id="execute-all-unit-tests">Execute all unit tests</h4>
+<p><code>gradlew test</code></p>
+<h4 id="execute-all-integration-tests">Execute all integration tests</h4>
+<p><code>gradlew testIntegration</code></p>
+<p>OR</p>
+<p><code>gradlew 'ofbiz --test'</code></p>
+<h4 id="execute-an-integration-test-case">Execute an integration test case</h4>
+<p>run a test case, in this example the componnet is &quot;entity&quot; and the case name is &quot;entity-tests&quot;</p>
+<p><code>gradlew &quot;ofbiz --test component=entity --test case=entity-tests&quot;</code></p>
+<h4 id="execute-an-integration-test-case-in-debug-mode">Execute an integration test case in debug mode</h4>
+<p>listens on port <strong>5005</strong></p>
+<p><code>gradlew &quot;ofbizDebug --test component=entity --test case=entity-tests&quot;</code></p>
+<h4 id="execute-an-integration-test-suite">Execute an integration test suite</h4>
+<p>listens on port <strong>5005</strong></p>
+<p><code>gradlew &quot;ofbiz --test component=widget --test suitename=org.apache.ofbiz.widget.test.WidgetMacroLibraryTests&quot;</code></p>
+<h4 id="execute-an-integration-test-suite-in-debug-mode">Execute an integration test suite in debug mode</h4>
+<p>listens on port <strong>5005</strong></p>
+<p><code>gradlew &quot;ofbizDebug --test component=widget --test suitename=org.apache.ofbiz.widget.test.WidgetMacroLibraryTests&quot;</code></p>
+<hr />
+<h3 id="miscellaneous-tasks">Miscellaneous tasks</h3>
+<h4 id="launch-a-graphical-user-interface-of-gradle">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 id="run-all-tests-on-a-clean-system">Run all tests on a clean system</h4>
+<p><code>gradlew cleanAll loadDefault testIntegration</code></p>
+<h4 id="clean-all-generated-artifacts">Clean all generated artifacts</h4>
+<p><code>gradlew cleanAll</code></p>
+<h4 id="refresh-the-generated-artifacts">Refresh the generated artifacts</h4>
+<p><code>gradlew clean build</code></p>
+<h4 id="create-a-custom-component-in-hot-deploy">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 id="create-an-admin-user-account">Create an admin user account</h4>
+<p>Create an admin user with login name MyUserName and default password with value &quot;ofbiz&quot;. Upon first login OFBiz will request changing the default password</p>
+<p><code>gradlew loadAdminUserLogin -PuserLoginId=MyUserName</code></p>
+<h4 id="setup-eclipse-project-for-ofbiz">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 id="useful-tips">Useful Tips</h2>
+<h3 id="gradle-tab-completion-on-unix-like-systems">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/tools/documentation/README.md.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/tools/documentation/README.md.html
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/tools/documentation/README.md.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: ofbiz/trunk/tools/documentation/pandoc.bat
URL: http://svn.apache.org/viewvc/ofbiz/trunk/tools/documentation/pandoc.bat?rev=1757044&view=auto
==============================================================================
--- ofbiz/trunk/tools/documentation/pandoc.bat (added)
+++ ofbiz/trunk/tools/documentation/pandoc.bat Sun Aug 21 10:47:54 2016
@@ -0,0 +1 @@
+pandoc readme.md -s -o tools/documentation/README.md.html
\ No newline at end of file

Propchange: ofbiz/trunk/tools/documentation/pandoc.bat
------------------------------------------------------------------------------
    svn:eol-style = CRLF