svn commit: r1826199 - in /ofbiz/ofbiz-framework/trunk: ./ applications/accounting/src/docs/ applications/accounting/src/docs/asciidoc/ docs/ docs/asciidoc/

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

svn commit: r1826199 - in /ofbiz/ofbiz-framework/trunk: ./ applications/accounting/src/docs/ applications/accounting/src/docs/asciidoc/ docs/ docs/asciidoc/

Taher Alkhateeb
Author: taher
Date: Thu Mar  8 10:19:17 2018
New Revision: 1826199

URL: http://svn.apache.org/viewvc?rev=1826199&view=rev
Log:
Implemented: PoC for a documentation system for OFBiz based on Asciidoc
(OFBIZ-9837)

This commit has reference to the community discussion thread [1] and [2] in
which it was agreed to commit a PoC for a documentation framework based on
AsciiDoc. The work in this commit includes:
- Applying the necessary requirements and tasks to build.gradle and facilitate
  the addition of two new tasks: generateOfbizDocumentation and
  generatePluginDocumentation.
- Create an initial skeleton for a "user manual" and "developer manual"
- Create a sample initial skeleton for the accounting component

Thanks: Michael Brohl, Sharan Foga, Olivier Heintz for testing and feedback.

[1] https://s.apache.org/4Lat
[2] https://s.apache.org/26kc

Added:
    ofbiz/ofbiz-framework/trunk/applications/accounting/src/docs/
    ofbiz/ofbiz-framework/trunk/applications/accounting/src/docs/asciidoc/
    ofbiz/ofbiz-framework/trunk/applications/accounting/src/docs/asciidoc/accounting.adoc
    ofbiz/ofbiz-framework/trunk/docs/
    ofbiz/ofbiz-framework/trunk/docs/asciidoc/
    ofbiz/ofbiz-framework/trunk/docs/asciidoc/developer-manual.adoc
    ofbiz/ofbiz-framework/trunk/docs/asciidoc/user-manual.adoc
Modified:
    ofbiz/ofbiz-framework/trunk/build.gradle

Added: ofbiz/ofbiz-framework/trunk/applications/accounting/src/docs/asciidoc/accounting.adoc
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/docs/asciidoc/accounting.adoc?rev=1826199&view=auto
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/accounting/src/docs/asciidoc/accounting.adoc (added)
+++ ofbiz/ofbiz-framework/trunk/applications/accounting/src/docs/asciidoc/accounting.adoc Thu Mar  8 10:19:17 2018
@@ -0,0 +1,8 @@
+= Accounting
+
+The OFBiz accounting system is a core application component and has most of the
+modern features you would expect in a general purpose double-entry accounting
+system. However, OFBiz goes beyond that by integrating the accounting
+functionality with other core components including party, product and order
+management. This makes the system as a whole robust and integrated to provide
+more value than a plain accounting system.

Modified: ofbiz/ofbiz-framework/trunk/build.gradle
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/build.gradle?rev=1826199&r1=1826198&r2=1826199&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/build.gradle (original)
+++ ofbiz/ofbiz-framework/trunk/build.gradle Thu Mar  8 10:19:17 2018
@@ -18,6 +18,7 @@
  */
 import at.bxm.gradleplugins.svntools.tasks.SvnCheckout
 import org.apache.tools.ant.filters.ReplaceTokens
+import org.asciidoctor.gradle.AsciidoctorTask
 
 /* ========================================================
  * Project setup
@@ -27,13 +28,16 @@ buildscript {
         jcenter()
     }
     dependencies {
-      classpath "at.bxm.gradleplugins:gradle-svntools-plugin:latest.release"
+        classpath 'at.bxm.gradleplugins:gradle-svntools-plugin:latest.release'
+        classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.7'
+        classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16'
     }
 }
 apply plugin: 'java'
 apply plugin: 'eclipse'
 apply plugin: 'maven-publish'
 apply plugin: "at.bxm.svntools"
+apply plugin: 'org.asciidoctor.convert'
 
 apply from: 'common.gradle'
 
@@ -309,6 +313,7 @@ if (project.hasProperty('enableOwasp'))
 
 // ========== Task group labels ==========
 def cleanupGroup = 'Cleaning'
+def docsGroup = 'Documentation'
 def ofbizServer = 'OFBiz Server'
 def ofbizPlugin = 'OFBiz Plugin'
 def sysadminGroup = 'System Administration'
@@ -480,6 +485,36 @@ task createTenant(group: ofbizServer, de
     }
 }
 
+// ========== Documentation tasks ==========
+tasks.withType(AsciidoctorTask) { task ->
+    backends 'html5', 'pdf'
+    attributes toc: ''
+}
+
+task generateOfbizDocumentation(group: docsGroup, type: AsciidoctorTask) {
+    description 'Generate OFBiz documentation manual'
+    sourceDir "${rootDir}/docs/asciidoc"
+    outputDir file("${buildDir}/asciidoc/ofbiz")
+}
+
+task generatePluginDocumentation(group: docsGroup) {
+    description 'Generate plugin documentation. Expects pluginId flag'
+    doFirst {
+        if (!project.hasProperty('pluginId')) {
+            throw new GradleException('Missing property \"pluginId\"')
+        }
+    }
+    iterateOverActiveComponents { component ->
+        if(project.hasProperty('pluginId')) {
+            def pluginAsciidoc = task "${component.name}" (type: AsciidoctorTask) {
+                sourceDir file("${component}/src/docs/asciidoc")
+                outputDir file("${buildDir}/asciidoc/${component.name}")
+            }
+            dependsOn pluginAsciidoc
+        }
+    }
+}
+
 // ========== System Administration tasks ==========
 task createTestReports(group: sysadminGroup, description: 'Generate HTML reports from junit XML output') {
     doLast {

Added: ofbiz/ofbiz-framework/trunk/docs/asciidoc/developer-manual.adoc
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/docs/asciidoc/developer-manual.adoc?rev=1826199&view=auto
==============================================================================
--- ofbiz/ofbiz-framework/trunk/docs/asciidoc/developer-manual.adoc (added)
+++ ofbiz/ofbiz-framework/trunk/docs/asciidoc/developer-manual.adoc Thu Mar  8 10:19:17 2018
@@ -0,0 +1,3 @@
+= Apache OFBiz Developer Manual
+
+content goes here

Added: ofbiz/ofbiz-framework/trunk/docs/asciidoc/user-manual.adoc
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/docs/asciidoc/user-manual.adoc?rev=1826199&view=auto
==============================================================================
--- ofbiz/ofbiz-framework/trunk/docs/asciidoc/user-manual.adoc (added)
+++ ofbiz/ofbiz-framework/trunk/docs/asciidoc/user-manual.adoc Thu Mar  8 10:19:17 2018
@@ -0,0 +1,40 @@
+= Apache OFBiz User Manual
+
+== Introduction to 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.
+
+This manual will describe all aspects of this powerful ERP system. The manual
+starts with the basics of what OFBiz and how it works, and describes high level
+concepts like the entity engine, service engine, widget system and so on. In
+addition the manual explains the core application of this framework like the
+Party Manager, Order Manager, Accounting system, and others.
+
+If you wish to contribute to OFBiz and help make it better, you may wish to read
+the "Apache OFBiz Developer Manual" for a deeper understanding of the
+architectural concepts of the framework.
+
+=== What is Apache OFBiz
+
+=== The main parts of Apache OFBiz
+
+==== Web MVC Framework
+
+==== Entity Engine
+
+==== Service Engine
+
+==== Widget System
+
+==== Data Model Library
+
+==== Service Library
+
+==== Core Applications
+
+==== Plugins
+
+include::../../applications/accounting/src/docs/asciidoc/accounting.adoc[leveloffset=+1]