Author: jleroux
Date: Thu Sep 7 08:57:09 2017
New Revision: 1807572
URL: http://svn.apache.org/viewvc?rev=1807572&view=rev
Log:
Updates the README.md.html file for the wiki page which uses it
Modified:
ofbiz/ofbiz-framework/trunk/README.md.html
Modified: ofbiz/ofbiz-framework/trunk/README.md.html
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/README.md.html?rev=1807572&r1=1807571&r2=1807572&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/README.md.html (original)
+++ ofbiz/ofbiz-framework/trunk/README.md.html Thu Sep 7 08:57:09 2017
@@ -32,17 +32,17 @@ under the License.
<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>
<blockquote>
-<p><em>Note</em>: since the trunk was split into <strong>ofbiz-framework</strong> and <strong>ofbiz-plugins</strong>, the
specialpurpose and hot-deploy directories have disappeared. New components must be put in a plugins directory which works as was the hot-deploy directory. If you need to
load the components in a specific order put a component-load.xml file in the plugins directory.</br> For OFBiz existing components, check them out using the Gradle
tasks below. To check out a component, in a created on the fly plugins directory, use the <strong>pullPluginSource</strong> Gradle task. To get all
components use <strong>pullAllPluginsSource</strong>. <strong>Beware</strong> this deletes a previously existing plugins directory.</p>
+<p><em>Note</em>: If you want to use Eclipse, read the "Setup eclipse project for
OFBiz" section to set it up.</p>
</blockquote>
-<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>
+<p><em>Note</em>: If you want to use an external database like MySQL or PostgreSQL, read the
"Setup an external database" section to set it up.</p>
</blockquote>
<blockquote>
-<p><em>Note</em>: if you want to use an external DBMS, instead of the embedded Derby, you will need a JDBC
driver. The only thing you need to do is add a dependency in build.gradle to the MySQL/PostgreSQL/whatever JDBC driver. Search
in Jcenter for the database driver suitable for the database installed on your production system. For example, under the
dependencies section you can add something like this for mysql: <code>runtime
'mysql:mysql-connector-java:5.1.36'</code> Of course you need to make sure the connector is compatible with
<em>your</em> version of the database installed!</p>
+<p>Note : The directory structure and repositories have changed. For more information read
the "Repository and directory structure" section.</p>
</blockquote>
+<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. Make sure of setting the $JAVA_HOME environment
variable.</p>
+<p><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK
download</a></p>
<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>
@@ -53,21 +53,15 @@ under the License.
<p>MS Windows: <code>gradlew ofbiz</code></p>
<p>Unix-like OS: <code>./gradlew ofbiz</code></p>
<blockquote>
-<p><em>Note</em>: then ignore the % progress indicator because this task does not
end as long as OFBiz is running.</p>
+<p><em>Note</em>: Ignore the % progress indicator because this task does not end as
long as OFBiz is running.</p>
</blockquote>
<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>
<h2 id="security">Security</h2>
-<p>You can trust the OFBiz Project Management Committee members and committers do
their best to keep OFBiz secure from external exploits, and fix vulnerabilities as soon as
they are known. Despite these efforts, if ever you find and want to report a security
issue, please report at: security @ ofbiz.apache.org, before disclosing them in a public
forum.</p>
-<blockquote>
-<p><em>Note</em>: Be sure to read this Wiki page if ever you plan to use RMI, JNDI, JMX or Spring and
maybe other Java classes OFBiz does not use Out Of The Box (OOTB): <a
href="https://cwiki.apache.org/confluence/display/OFBIZ/The+infamous+Java+serialization+vulnerability">The
infamous Java serialization vulnerability</a></p>
-</blockquote>
+<p>If you find a security issue, please report it to: security @ ofbiz.apache.org.
Once proper mitigations to the security issues are complete the OFBiz team will disclose
this information to the public mailing list.</p>
<p>You can find more information about security in OFBiz at <a
href="https://cwiki.apache.org/confluence/display/OFBIZ/Keeping+OFBiz+secure">Keeping OFBiz
secure</a></p>
<hr />
<h2 id="build-system-syntax">Build system syntax</h2>
@@ -103,7 +97,7 @@ under the License.
<p><code>gradlew "ofbiz --shutdown --portoffset 10000"</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 loadAll "ofbiz --start"</code></p>
+<p><code>gradlew cleanAll loadAll "ofbiz --start --portoffset
10000"</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>
@@ -161,12 +155,32 @@ under the License.
<li><strong>ext-test</strong>: External Test Data (custom)</li>
<li><strong>ext-demo</strong>: External Demo Data (custom)</li>
</ul>
+<p>Available options for the --load-data server command are the following:</p>
+<ul>
+<li><strong>readers=[name]</strong>: only load data from certain readers separated
by comma. e.g. seed,seed-initial,ext</li>
+<li><strong>file=[path]</strong>: load a single file from location or several files
separated by commas. e.g. /my/file/1,/my/file/2</li>
+<li><strong>dir=[path]</strong>: load all data files found in directory</li>
+<li><strong>component=[name]</strong>: only load data from a specific component.
e.g. base</li>
+<li><strong>delegator=[name]</strong>: use the defined delegator. Default is "default". If the
value passed is <strong>"all-tenants"</strong> then OFBiz will load the data for all defined tenants
in the system.</li>
+<li><strong>group=[name]</strong>: override the entity group (org.apache.ofbiz).
e.g. com.example.something</li>
+<li><strong>timeout=[millis]</strong>: timeout in milliseconds</li>
+<li><strong>create-pks</strong>: create primary keys</li>
+<li><strong>drop-pks</strong>: drop primary keys</li>
+<li><strong>create-constraints</strong>: create indexes and foreign keys after
loading</li>
+<li><strong>drop-constraints</strong>: drop indexes and foreign keys before
loading</li>
+<li><strong>create-fks</strong>: create dummy (placeholder) foreign keys</li>
+<li><strong>maintain-txs</strong>: maintain timestamps in data file</li>
+<li><strong>try-inserts</strong>: use mostly inserts</li>
+<li><strong>repair-columns</strong>: repair column sizes (default is true w/
drop-constraints)</li>
+<li><strong>continue-on-failure</strong>: By default OFBiz will fail and stop if it
is unable to load any of the files it is attempting to load. By passing this property OFBiz will ignore
failures and continue loading all files</li>
+</ul>
+<h4 id="load-specific-ofbiz-data">Load specific OFBiz data</h4>
<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 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>
+<h4 id="load-all-ofbiz-data">Load all OFBiz data</h4>
+<p>Loads all data sets; 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.</p>
<p><code>gradlew loadAll</code></p>
<p>OR</p>
<p><code>gradlew "ofbiz --load-data"</code></p>
@@ -219,22 +233,32 @@ under the License.
<p><code>gradlew testIntegration</code></p>
<p>OR</p>
<p><code>gradlew 'ofbiz --test'</code></p>
+<h4 id="execute-integration-tests-with-a-different-log-level">Execute integration
tests with a different log level</h4>
+<p>It is possible to start integration tests with a log level different from the
default one. The log levels allowed are listed below from most verbose to least
verbose:</p>
+<ul>
+<li>always</li>
+<li>verbose</li>
+<li>timing</li>
+<li>info</li>
+<li>important</li>
+<li>warning</li>
+<li>error</li>
+<li>fatal</li>
+</ul>
+<p><code>gradlew "ofbiz --test loglevel=fatal"</code></p>
<h4 id="execute-an-integration-test-case">Execute an integration test
case</h4>
<p>run a test case, in this example the component is "entity" and the case name
is "entity-tests"</p>
-<p><code>gradlew "ofbiz --test component=entity --test
case=entity-tests"</code></p>
-<h4 id="execute-an-integration-test-case-in-debug-mode">Execute an integration test
case in debug mode</h4>
+<p><code>gradlew "ofbiz --test component=entity --test suitename=entitytests --test
case=entity-query-tests"</code></p>
+<h4 id="execute-an-integration-test-case-in-debug-mode-with-verbose-log">Execute an
integration test case in debug mode with verbose log</h4>
<p>listens on port <strong>5005</strong></p>
-<p><code>gradlew "ofbizDebug --test component=entity --test
case=entity-tests"</code></p>
+<p><code>gradlew "ofbizDebug --test component=entity --test
loglevel=verbose"</code></p>
<h4 id="execute-an-integration-test-suite">Execute an integration test
suite</h4>
-<p><code>gradlew "ofbiz --test component=widget --test
suitename=widgettests"</code></p>
+<p><code>gradlew "ofbiz --test component=entity --test
suitename=entitytests"</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 "ofbizDebug --test component=widget --test
suitename=widgettests"</code></p>
+<p><code>gradlew "ofbizDebug --test component=entity --test
suitename=entitytests"</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 loadAll testIntegration</code></p>
<h4 id="clean-all-generated-artifacts">Clean all generated artifacts</h4>
@@ -251,7 +275,7 @@ under the License.
<p>The below command activates a gradle plugin (OWASP) and Identifies and reports
known vulnerabilities (CVEs) in OFBiz library dependencies. This command takes a long time
to execute because it needs to download all plugin dependencies and the CVE identification
process is also time consuming. But it's the only way to check OFBiz does not use
vulnerable libraries.</p>
<p><code>gradlew -PenableOwasp dependencyCheck</code></p>
<h4 id="setup-eclipse-project-for-ofbiz">Setup eclipse project for OFBiz</h4>
-<p>Setting up OFBiz on eclipse is easy by simply running the below command and then importing the project to
eclipse. This command will generate the necessary <strong>.classpath</strong> and
<strong>.project</strong> files for eclipse and it will also make the source code for external
libraries available in eclipse (i.e. you can view source through Ctrl + Click)</p>
+<p>Setting up OFBiz on eclipse is done by simply running the below command and then importing the project to
eclipse. This command will generate the necessary <strong>.classpath</strong> and
<strong>.project</strong> files for eclipse and it will also make the source code for external
libraries available in eclipse (i.e. you can view source through Ctrl + Click)</p>
<p>The first time you run this command it will take a long time to execute because
it will download source packages available for project dependencies.</p>
<p><code>gradlew eclipse</code></p>
<hr />
@@ -319,12 +343,35 @@ under the License.
<p><code>gradlew pushPlugin -PpluginId=myplugin</code></p>
<p><code>gradlew pushPlugin -PpluginId=mycompany -PpluginGroup=com.mycompany.ofbiz.plugin
-PpluginVersion=1.2.3 -PpluginDescription="Introduce special functionality
X"</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>
+<h2 id="miscellaneous-documentation">Miscellaneous Documentation</h2>
+<h3 id="repository-and-directory-structure">Repository and directory
structure</h3>
+<p>OFBiz is split into two repositories:</p>
+<ul>
+<li><p><strong>ofbiz-framework</strong>: Contains the core framework and main applications
in the system like accounting, party, order, etc</p></li>
+<li><p><strong>ofbiz-plugins</strong>: Renamed from "special-purpose" and
contains optional components that are officially supported by the community</p></li>
+</ul>
+<p>Furthermore, the hot-deploy directory is removed as the plugins directory works as a replacement
for both "special-purpose" and "hot-deploy".</p>
+<p>If you need to load the components in the plugins directory in a specific order
place a component-load.xml file in the plugins directory listing the order.</p>
+<p>To check out a plugin from source control use the <strong>pullPluginSource</strong> Gradle task. To check
out all plugins from source control use the <strong>pullAllPluginsSource</strong>.
<strong>Beware</strong> this deletes a previously existing plugins directory.</p>
+<h3 id="setup-an-external-database-like-mysql-postgresql-etc">Setup an external
database like MySQL, PostgreSQL, etc</h3>
+<p>To setup an external database instead of the default embedded Apache Derby, you
will need to follow the following instructions:</p>
+<ol style="list-style-type: decimal">
+<li>Find the JDBC driver suitable for your database using one of the following
options:</li>
+</ol>
+<ul>
+<li><p>Search for the JDBC driver in <a href="https://bintray.com/bintray/jcenter">jcenter</a>
and place it in build.gradle dependencies e.g. <code>runtime 'mysql:mysql-connector-java:5.1.36'</code></p>
+<p>OR</p></li>
+<li><p>Download the JDBC driver jar and place it in $OFBIZ_HOME/lib or the lib
sub-directory of any component</p></li>
+</ul>
+<ol start="2" style="list-style-type: decimal">
+<li>Modify the entityengine.xml file located in $OFBIZ_HOME/framework/entity/config to switch the default
database to the one you selected. For more details you can read the relevant section in the <a
href="https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide">technical
setup guide</a></li>
+</ol>
+<h3 id="setup-gradle-tab-completion-on-unix-like-systems">Setup 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/Ea87/46401a96df31cd208a87">Gradle tab
completion</a></p>
+<p><a href="https://edub.me/gradle-completion-bash">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/Ea87/46401a96df31cd208a87/raw/gradle-tab-completion.bash -o
/etc/bash_completion.d/gradle-tab-completion.bash</code></p>
+<p><code>sudo curl -L -s https://edub.me/gradle-completion-bash -o
/etc/bash_completion.d/gradle-tab-completion.bash</code></p>
+<hr />
<h2 id="crypto-notice">Crypto notice</h2>
<p>This distribution includes cryptographic software. The country in which you currently reside may have
restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any
encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use,
and re-export of encryption software, to see if this is permitted. See <a href="http://www.wassenaar.org/"
class="uri">http://www.wassenaar.org/</a> for more information.</p>
<p>The U.S. Government Department of Commerce, Bureau of Industry and Security
(BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1,
which includes information security software using or performing cryptographic functions
with asymmetric algorithms. The form and manner of this Apache Software Foundation
distribution makes it eligible for export under the License Exception ENC Technology
Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations,
Section 740.13) for both object code and source code.</p>