Review version 0.9.2

- Technical updates to reflect new project structure.
- Addition of project structure section to explain project relationships.
- General readability improvements.

Signed-off-by: Jeff Scheel <scheel@us.ibm.com>
master
Jeff Scheel 9 years ago
parent 8906b605e6
commit 1ba6581021

@ -29,11 +29,11 @@
</author> </author>
<copyright> <copyright>
<!-- TODO: Set copyright year --> <!-- TODO: Set copyright year -->
<year>2015</year> <year>2015, 2016</year>
<holder>OpenPOWER Foundation</holder> <holder>OpenPOWER Foundation</holder>
</copyright> </copyright>
<!-- TODO: Set the correct document releaseinfo --> <!-- TODO: Set the correct document releaseinfo -->
<releaseinfo>Revision 0.9.1</releaseinfo> <releaseinfo>Revision 0.9.2</releaseinfo>
<productname>OpenPOWER</productname> <productname>OpenPOWER</productname>
<pubdate/> <pubdate/>


@ -58,6 +58,16 @@


<revhistory> <revhistory>
<!-- TODO: Set the initial version information and clear any old information out --> <!-- TODO: Set the initial version information and clear any old information out -->
<revision>
<date>2016-02-25</date>
<revdescription>
<itemizedlist spacing="compact">
<listitem>
<para>Version 0.9.2: Technical and process updates. Explanation of project structure.</para>
</listitem>
</itemizedlist>
</revdescription>
</revision>
<revision> <revision>
<date>2016-01-25</date> <date>2016-01-25</date>
<revdescription> <revdescription>

@ -12,7 +12,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_examples">
<section xml:id="list_example_label"> <section xml:id="list_example_label">
<title>Example Itemized List</title> <title>Example Itemized List</title>
<para> <para>
Here's an example of an itemized list</para> Here is an example of an itemized list</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para> <para>
@ -184,9 +184,9 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_examples">
<section> <section>
<title>Example of code citations and user input</title> <title>Example of code citations and user input</title>
<para>When showing user input, you want a nice sceen-looking layout, a prompt, monospace text, and a way to differentiate input from output. Here's an example: <para>When showing user input, you want a nice sceen-looking layout, a prompt, monospace text, and a way to differentiate input from output. Here's an example:
<screen><prompt>$</prompt><userinput>echo "Hello world"</userinput> <screen><prompt>$ </prompt><userinput>echo "Hello world"</userinput>
Hello world Hello world
<prompt>$</prompt></screen> <prompt>$ </prompt></screen>
</para> </para>
<para>Docbook also allows for formatting and display of common languages, allowing for whitespace <para>Docbook also allows for formatting and display of common languages, allowing for whitespace
and line returns just as they are written. Here's a sample snippet of C code with line numbering enabled:<programlisting linenumbering="numbered"><![CDATA[#include<stdio.h> and line returns just as they are written. Here's a sample snippet of C code with line numbering enabled:<programlisting linenumbering="numbered"><![CDATA[#include<stdio.h>

@ -10,12 +10,12 @@ xmlns:xlink="http://www.w3.org/1999/xlink">
<para>The major sections of this document addresses the following topics:</para> <para>The major sections of this document addresses the following topics:</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>Getting started: This section details tools and commands used to contribute to OpenPOWER documentation. <para>Get started: This section details tools and commands used to contribute to OpenPOWER documentation.
All users who are new to OpenPOWER Foundation documentation should start here.</para> All users who are new to OpenPOWER Foundation documentation should start here.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Creating a new document: This section provides step-by-step instructions on how to create a new document <para>Creating a new document: This section provides step-by-step instructions on how to create a new document
from scratch. Use this section to start a new documentation project.</para> from scratch. Use this section to start a new document.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Modifying an existing document: This section highlights common steps in editing an existing OpenPOWER <para>Modifying an existing document: This section highlights common steps in editing an existing OpenPOWER
@ -25,6 +25,10 @@ xmlns:xlink="http://www.w3.org/1999/xlink">
<para>Debugging build failures: This section provides examples of the two most common types of build failures <para>Debugging build failures: This section provides examples of the two most common types of build failures
and helps users find the relevant failure information.</para> and helps users find the relevant failure information.</para>
</listitem> </listitem>
<listitem>
<para>Understanding the project structure: This section provides detailed descriptions of the various project
components and their roles in the documentation creation process.</para>
</listitem>
<listitem> <listitem>
<para>Policies and conventions: This secion contains <para>Policies and conventions: This secion contains
the generally accepted guidelines for creating OpenPOWER documentation. Use this section as a reference the generally accepted guidelines for creating OpenPOWER documentation. Use this section as a reference
@ -47,6 +51,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink">
<xi:include href="sec_template_new_document.xml"/> <xi:include href="sec_template_new_document.xml"/>
<xi:include href="sec_template_existing_document.xml"/> <xi:include href="sec_template_existing_document.xml"/>
<xi:include href="sec_template_debugging.xml"/> <xi:include href="sec_template_debugging.xml"/>
<xi:include href="sec_template_structure.xml"/>
<xi:include href="sec_template_policies.xml"/> <xi:include href="sec_template_policies.xml"/>
<xi:include href="sec_template_faq.xml"/> <xi:include href="sec_template_faq.xml"/>
<xi:include href="sec_template_references.xml"/> <xi:include href="sec_template_references.xml"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 KiB

@ -2,7 +2,51 @@
xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_debug"> xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_debug">


<title>Debugging build failures</title> <title>Debugging build failures</title>
<para>Maven/docbkx failures generally fall into one of two categories, validation errors or build failures. Correcting the document begins with understanding which type of failure has occurred and understanding where to look in your document source.</para> <para>Maven/docbkx failures generally fall into these categories:</para>
<itemizedlist>
<listitem><para>Project structure errors</para></listitem>
<listitem><para>Docbook validation errors</para></listitem>
<listitem><para>Build failures</para></listitem>
</itemizedlist>
<para>Correcting the document errors starts with understanding which type of failure has occurred and
understanding where to look in your document source.</para>
<section>
<title>Project structure errors</title>
<para>Because the OpenPOWER Foundation documentation projects are not self-contained in the
GitHub repositories, forgetting to clone the <literal>Docs-Master</literal> project in addition
to the document project or cloning it in the wrong location is a common problem. Failures of this kind
produce the following error:</para>
<screen>...
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.openpowerfoundation.docs:workgroup-pom:1.0.0-SNAPSHOT (/home/scheel/Docs-Template/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact org.openpowerfoundation.docs:master-pom:pom:1.0.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException</screen>
<para>The identifying characteristic of this error type is the message, "Non-resolvable parent POM". This occurs because the
<literal>pom.xml</literal> file in the documentation project, called the "workgroup-pom" because of a project
<literal>&lt;artifactId>workgroup-pom&lt;/artifactId></literal> declaration, expects its parent pom file to be in the
location defined by the <literal>&lt;relativePath>../Docs-Master/pom.xml&lt;/relativePath></literal>, up one directory and
then in the <literal>Docs-Master</literal> director.
</para>
<para>So, if you see the message "Non-resolvable parent POM", ensure that the <literal>Docs-Master</literal> project
and your project have been cloned
into the same parent directory. See <xref linkend="section_cloning_master_doc"/> for detailed directions on how to do this.</para>
</section>

<section>
<title>Docbook validation errors</title>
<para>Validation errors are generally indicated in the build output with text like the following: <para>Validation errors are generally indicated in the build output with text like the following:
<screen>... <screen>...
@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@
@ -11,7 +55,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_debug">


Note: Open the temporary file: Note: Open the temporary file:


file:/home/user1/openpower-foundation-docbkx-framework/doc/template/target//bk_main.xml-invalid.xml file:/home/user1/Docs-Template/template/target//bk_main.xml-invalid.xml


to see all the errors in context. to see all the errors in context.
You must correct the errors in the original You must correct the errors in the original
@ -26,7 +70,7 @@ lineNumber: 272; columnNumber: 70; text not allowed here; expected element "add
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>The full path and filename that contains the context for the failure. In the message above, this is <para>The full path and filename that contains the context for the failure. In the message above, this is
<literal>/home/user1/openpower-foundation-docbkx-framework/doc/template/target//bk_main.xml-invalid.xml</literal>.</para> <literal>/home/user1/Docs-Template/template/target//bk_main.xml-invalid.xml</literal>.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>The location within the file of the syntax error. For the above example, the key information is "<literal>lineNumber: 272; columnNumber: 70</literal>.</para> <para>The location within the file of the syntax error. For the above example, the key information is "<literal>lineNumber: 272; columnNumber: 70</literal>.</para>
@ -35,6 +79,12 @@ lineNumber: 272; columnNumber: 70; text not allowed here; expected element "add
<para>An explanation of the failure. This information in the above error reads, "text not allowed here; expected element "address", ...".</para> <para>An explanation of the failure. This information in the above error reads, "text not allowed here; expected element "address", ...".</para>
</listitem> </listitem>
</orderedlist> </orderedlist>
</section>

<section>
<title>Build failures</title>
<para>Build errors are easily identified as well. Below is an example: <para>Build errors are easily identified as well. Below is an example:
<screen>... <screen>...
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
@ -46,21 +96,25 @@ lineNumber: 272; columnNumber: 70; text not allowed here; expected element "add
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openpowerfoundation.docs:openpowerdocs-maven-plugin:1.0.0:generate-webhelp (generate-webhelp) on project openpower-template-guide: Execution generate-webhelp of goal org.openpowerfoundation.docs:openpowerdocs-maven-plugin:1.0.0:generate-webhelp failed: XInclude resource error (sec_template_new_document.xml) and no fallback provided. XProc error err:XD0011: org.xml.sax.SAXParseException; systemId: file:/home/user1/openpower-foundation-docbkx-framework/doc/template/sec_template_new_document.xml; lineNumber: 55; columnNumber: 17; The element type "para" must be terminated by the matching end-tag "&lt;/para&gt;". -> [Help 1]... [ERROR] Failed to execute goal org.openpowerfoundation.docs:openpowerdocs-maven-plugin:1.0.0:generate-webhelp (generate-webhelp) on project openpower-template-guide: Execution generate-webhelp of goal org.openpowerfoundation.docs:openpowerdocs-maven-plugin:1.0.0:generate-webhelp failed: XInclude resource error (sec_template_new_document.xml) and no fallback provided. XProc error err:XD0011: org.xml.sax.SAXParseException; systemId: file:/home/user1/openpower-foundation-docbkx-framework/doc/template/sec_template_new_document.xml; lineNumber: 55; columnNumber: 17; The element type "para" must be terminated by the matching end-tag "&lt;/para&gt;". -> [Help 1]...
</screen></para> </screen></para>

<para>Like validation errors, three key pieces of information are again provided:</para> <para>Like validation errors, three key pieces of information are again provided:</para>
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>The full path and filename of our failure is <para>The full path and filename of our failure is
<literal>/home/user1/openpower-foundation-docbkx-framework/doc/template/sec_template_new_document.xml</literal>.</para> <literal>/home/user1/Docs-Template/template/sec_template_new_document.xml</literal>.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>The location within the file of the error is "<literal>lineNumber: 55; columnNumber: 17</literal>.</para> <para>The location within the file of the error is "<literal>lineNumber: 55; columnNumber: 17</literal>.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>An explanation of the failure begins with the text, "The element type "para" must be terminated by the matching end-tag "&lt;/para&gt;."</para> <para>An explanation of the failure begins with the text, "The element type "para" must be terminated by the
matching end-tag "&lt;/para&gt;."</para>
</listitem> </listitem>
</orderedlist> </orderedlist>
<para>With these details in hand for either error, one simply locates the offending syntax and makes the appropriate correction. Online resources such as those listed in <xref linkend="section_template_references"/> may be helpful.</para>


<para>With these details in hand for either error, one simply locates the offending syntax and makes the appropriate
correction. Online resources such as those listed in <xref linkend="section_template_references"/> may be helpful.</para>
</section>


</section> </section>

@ -2,19 +2,27 @@
xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_existing_document"> xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_existing_document">


<title>Modifying an existing document</title> <title>Modifying an existing document</title>
<para>To obtain a copy of the existing template document framework and all public documents from the
public OpenPOWER git repository, simply clone the project using this command:<screen><prompt>$</prompt><userinput>git clone https://github.com/open-power/openpower-foundation-docbkx-framework.git</userinput> <para>To begin editing an existing document, you must first clone two projects -- the master document framework project and
Cloning into 'openpower-foundation-docbkx-framework'... the specific document project. Begin by cloning the master document as described in <xref linkend="section_cloning_master_doc"/>.</para>
remote: Counting objects: 288, done.
remote: Compressing objects: 100% (157/157), done. <para>Once complete, obtain a copy of the desired document by cloning its project. For example, to clone this document,
remote: Total 288 (delta 121), reused 288 (delta 121) <citetitle>Master Template Guide</citetitle>, from the
Receiving objects: 100% (288/288), 12.41 MiB | 8.04 MiB/s, done. public OpenPOWER Foundation git repository, use this
Resolving deltas: 100% (121/121), done. command:<screen><prompt>$ </prompt><userinput>git clone https://github.com/OpenPOWERFoundation/Docs-Template.git</userinput>
Cloning into 'Docs-Template'...
Username for 'https://github.com': <userinput>my_userid</userinput>
Password for 'https://my_userid@github.com': <userinput>my_password</userinput>
remote: Counting objects: 62, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 62 (delta 2), reused 0 (delta 0), pack-reused 52
Unpacking objects: 100% (62/62), done.
Checking connectivity... done. Checking connectivity... done.
<prompt>~$</prompt></screen></para> <prompt>$ </prompt></screen></para>


<para>To build a document such as the template guide, follow these steps from the directory where you just cloned:<screen><prompt>$</prompt><userinput>cd openpower-foundation-docbkx-framework/doc/template</userinput> <para>To build a specific document such as the template guide, follow these steps from the directory where
<prompt>$</prompt><userinput>mvn clean</userinput> you just cloned:<screen><prompt>$ </prompt><userinput>cd Docs-Template/template</userinput>
<prompt>$ </prompt><userinput>mvn clean</userinput>
[INFO] Scanning for projects... [INFO] Scanning for projects...
[INFO] [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
@ -22,7 +30,7 @@ Checking connectivity... done.
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
[INFO] [INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ openpower-template-guide --- [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ openpower-template-guide ---
[INFO] Deleting ~/openpower-foundation-docbkx-framework/doc/template/target [INFO] Deleting ~/Docs-Template/template/target
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS [INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
@ -30,7 +38,7 @@ Checking connectivity... done.
[INFO] Finished at: Wed Feb 25 12:54:47 CST 2015 [INFO] Finished at: Wed Feb 25 12:54:47 CST 2015
[INFO] Final Memory: 3M/7M [INFO] Final Memory: 3M/7M
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
<prompt>$</prompt><userinput>mvn generate-sources</userinput> <prompt>$ </prompt><userinput>mvn generate-sources</userinput>
[INFO] Scanning for projects... [INFO] Scanning for projects...
[INFO] [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
@ -47,8 +55,20 @@ Checking connectivity... done.
[INFO] Finished at: Wed Feb 25 12:55:15 CDT 2015 [INFO] Finished at: Wed Feb 25 12:55:15 CDT 2015
[INFO] Final Memory: 30M/390M [INFO] Final Memory: 30M/390M
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
<prompt>$</prompt></screen></para> <prompt>$ </prompt></screen></para>
<para>If all goes well, the generated pdf should be available in <literal>~/openpower-foundation-docbkx-framework/doc/template/target/docbkx/webhelp/template-guide/</literal>.</para>
<note><para>The permutations of Maven invocations may be combined into one operation where the parameters are specified in the order
in which one wishes to execute them. Thus, the command <literal>mvn clean generate-sources</literal> would accomplish the
same thing as the above sequence of commands.</para></note>

<para>If all goes well, the generated pdf should be available in <literal>~/Docs-Template/template/target/docbkx/webhelp/template-guide/</literal>.</para>

<para>For assistance correcting commmon build failures, see <xref linkend="section_template_debug"/>.</para>

<note><para>Projects may contain multiple documents. While specific documents can be built by executing a
<literal>mvn clean generate-sources</literal> in the specific document directory, executing this command in
the base project directory will build all projects identified in the <literal>&lt;module></literal> list in the
top-level <literal>pom.xml</literal> file, known as the "workgroup-pom".</para></note>
</section> </section>

@ -5,10 +5,13 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_getting_star
<para>To begin contributing to the OpenPOWER Foundation documentation, the following steps must be completed: <para>To begin contributing to the OpenPOWER Foundation documentation, the following steps must be completed:
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Install tools</para> <para>Installing tools</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Create accounts</para> <para>Creating accounts</para>
</listitem>
<listitem>
<para>Cloning master document information</para>
</listitem> </listitem>
</orderedlist> </orderedlist>
</para> </para>
@ -22,17 +25,17 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_getting_star
source and maven provides the build framework to create the published content in PDF and html form. source and maven provides the build framework to create the published content in PDF and html form.
Installation steps for these tools varies by operating system.</para> Installation steps for these tools varies by operating system.</para>
<para>On Debian-based Linux operating systems (Ubuntu and Debian), install maven and git as follows: <para>On Debian-based Linux operating systems (Ubuntu and Debian), install maven and git as follows:
<screen><prompt>#</prompt><userinput>apt-get install git</userinput> <screen><prompt># </prompt><userinput>apt-get install git</userinput>
<prompt>#</prompt><userinput>apt-get install maven</userinput></screen></para> <prompt># </prompt><userinput>apt-get install maven</userinput></screen></para>
<para>On RPM-based Linux operating systems (Fedora, RHEL, openSUSE, SLES), install maven and git as follows: <para>On RPM-based Linux operating systems (Fedora, RHEL, openSUSE, SLES), install maven and git as follows:
<screen><prompt>#</prompt><userinput>yum install git</userinput> <screen><prompt># </prompt><userinput>yum install git</userinput>
<prompt>#</prompt><userinput>yum install maven</userinput></screen></para> <prompt># </prompt><userinput>yum install maven</userinput></screen></para>
<para>On Mac OS X, use Macports to install maven and git as follows: <para>On Mac OS X, use Macports to install maven and git as follows:
<screen><prompt>#</prompt><userinput>port install git</userinput> <screen><prompt># </prompt><userinput>port install git</userinput>
<prompt>#</prompt><userinput>port install maven3</userinput></screen></para> <prompt># </prompt><userinput>port install maven3</userinput></screen></para>
<para>or use Homebrew to install maven and git as follows: <para>or use Homebrew to install maven and git as follows:
<screen><prompt>$</prompt><userinput>brew install git</userinput> <screen><prompt>$ </prompt><userinput>brew install git</userinput>
<prompt>$</prompt><userinput>brew install maven</userinput></screen></para> <prompt>$ </prompt><userinput>brew install maven</userinput></screen></para>
<para>For information on how to setup the environment on Windows, see the following websites: <para>For information on how to setup the environment on Windows, see the following websites:
<itemizedlist> <itemizedlist>
<listitem> <listitem>
@ -44,22 +47,43 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_getting_star
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</para> </para>
<note><para>Modification of documentation source files requires a text editor. While standard editors like vim, emacs, or gedit can be used,
it is highly recommended that an editor be used which highlights XML or Docbook syntax. If your favorite editor does not include an
extension or plugin to accomplish this, you might consider using Bluefish to edit your docbook files. Details on this editor
can be found at <link xlink:href="http://bluefish.openoffice.nl/index.html">http://bluefish.openoffice.nl/index.html</link>.</para></note>
</section> </section>


<section> <section xml:id="section_creating_accounts">
<title>Creating accounts</title> <title>Creating accounts</title>
<para>All OpenPOWER project documentation is maintained in GitHub trees, public and private. The first <para>All OpenPOWER project documentation is maintained in GitHub trees, public and private. The first
step to creating documentation will be joining the GitHub community.</para> step to creating documentation will be joining the GitHub community.</para>
<para>To join the GitHub community, <para>To join the GitHub community,
apply at <link xlink:href="https://github.com/join">https://github.com/join</link>.</para> apply at <link xlink:href="https://github.com/join">https://github.com/join</link>.</para>
<para>The private trees are grouped in the OpenPOWER Foundation project at <para>The OpenPOWER Foundation documentation trees are grouped in the OpenPOWER Foundation project at
<link xlink:href="https://github.com/OpenPOWERFoundation">https://github.com/OpenPOWERFoundation</link>. <link xlink:href="https://github.com/OpenPOWERFoundation">https://github.com/OpenPOWERFoundation</link>.
If you will be participating in private OpenPOWER Foundation trees, you will need to visit the OpenPOWER Foundation Members Everyone should be able to see and access public trees like Docs-Master. However,
Area wiki to find administrators for the appropriate git tree.</para> if you will be participating in private OpenPOWER Foundation trees, you will need to request access from the
Technical Steering Committee Chair, <email>tsc-chair@openpowerfoundation.org</email>.</para>
<para>To learn more about using git, see the online article in GitHub Help, "Good Resources for Learning Git and GitHub." at <para>To learn more about using git, see the online article in GitHub Help, "Good Resources for Learning Git and GitHub." at
<link xlink:href="https://help.github.com/articles/good-resources-for-learning-git-and-github/"> <link xlink:href="https://help.github.com/articles/good-resources-for-learning-git-and-github/">
https://help.github.com/articles/good-resources-for-learning-git-and-github/</link>.</para> https://help.github.com/articles/good-resources-for-learning-git-and-github/</link>.</para>
</section> </section>


<section xml:id="section_cloning_master_doc">
<title>Cloning master document information</title>
<para>To successfully build OpenPOWER Foundation documents, common document files must be in place in addition to the specific
document files. These common files are obtained by cloning the OpenPOWER Foundation public project <literal>Docs-Master</literal>.</para>
<para>To clone the master template document framework use the clone git command:<screen><prompt>$ </prompt><userinput>git clone https://github.com/OpenPOWERFoundation/Docs-Master.git</userinput>
Cloning into 'Docs-Master'...
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 24 (delta 6), reused 20 (delta 5), pack-reused 0
Unpacking objects: 100% (24/24), done.
Checking connectivity... done.
<prompt>$ </prompt></screen></para>
<para>More information can be found about the Docs-Master project online at <link xlink:href="https://github.com/OpenPOWERFoundation/Docs-Master">
https://github.com/OpenPOWERFoundation/Docs-Master</link>. Additional details about the OpenPOWER Foundation documentation structure
are explained in <xref linkend="section_template_structure"/> of this document.</para>
</section>
</section> </section>

@ -5,68 +5,175 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_new_document
<para>Creating a new document from scratch follows four simple steps:</para> <para>Creating a new document from scratch follows four simple steps:</para>
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Clone the appropriate template document framework.</para> <para>Cloning the project source.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Copy the template directory into a new project directory.</para> <para>Finding a document framework.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Modify core project files.</para> <para>Modifying core project files.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Begin adding document content, either from scratch or from another document.</para> <para>Adding new document content.</para>
</listitem> </listitem>
</orderedlist> </orderedlist>


<section> <section>
<title>Cloning the base document framework</title> <title>Clone the project source.</title>
<para>All new projects need to begin by cloning the appropriate documentation template. The template document project resides at <link xlink:href="https://github.com/open-power/openpower-foundation-docbkx-framework.git">https://github.com/open-power/openpower-foundation-docbkx-framework.git</link>. This template should be used for both private and public OpenPOWER Foundation documents.</para> <para>All documentation projects reside in a project directory maintained in GitHub, just like the
<para>To clone the existing template document framework use the clone git command:<screen><prompt>$</prompt><userinput>git clone https://github.com/open-power/openpower-foundation-docbkx-framework.git</userinput> <literal>Docs-Master</literal> framework described in <xref linkend="section_cloning_master_doc"/>. In the same directory
Cloning into 'openpower-foundation-docbkx-framework'... where the <literal>Docs-Master</literal> project has been cloned, you will need to
remote: Counting objects: 288, done. clone the documentation source for your project. A list of the OpenPOWER Foundation projects can be found at
remote: Compressing objects: 100% (157/157), done. <link xlink:href="https://github.com/OpenPOWERFoundation/">https://github.com/OpenPOWERFoundation/</link>. Select
remote: Total 288 (delta 121), reused 288 (delta 121) the project from this list.</para>
Receiving objects: 100% (288/288), 12.41 MiB | 8.04 MiB/s, done.
Resolving deltas: 100% (121/121), done. <note><para>If you do not see the project for which you are looking, you may not be authorized to it. See
<xref linkend="section_creating_accounts"/> for details about joining the OpenPOWER Foundation private projects. If you
feel that you need a new GitHub project, work with the
Technical Steering Committee Chair, <email>tsc-chair@openpowerfoundation.org</email>, to request and get this setup.</para></note>
<para>To clone an OpenPOWER Foundation project like <literal>Docs-Template</literal> issue the following
command:<screen><prompt>$ </prompt><userinput>git clone https://github.com/OpenPOWERFoundation/Docs-Template.git</userinput>
Cloning into 'Docs-Template'...
Username for 'https://github.com': <userinput>my_userid</userinput>
Password for 'https://my_userid@github.com': <userinput>my_password</userinput>
remote: Counting objects: 62, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 62 (delta 2), reused 0 (delta 0), pack-reused 52
Unpacking objects: 100% (62/62), done.
Checking connectivity... done. Checking connectivity... done.
<prompt>$</prompt></screen></para> <prompt>$ </prompt></screen> The results should look roughly something like above with actual numbers of objects, files, etc. varying
<para>This command clones the head of the git tree into your current working directory. If successful, the contents of the current directory should now include a new <literal>openpower-foundation-docbkx-framework</literal> directory.</para> for different projects.</para>

<note><para>Private projects prompt for a GitHub userid and and password. When cloning public projects, these prompts
are skipped.</para></note>
<para>The base project has now been cloned.</para>
</section> </section>
<section> <section>
<title>Copying the template directory into a new project directory</title> <title>Finding a document framework</title>
<para>To create a new document directory, follow these steps:</para> <para>If this is your first document, in a brand new project (git tree), you have the fewest number of steps
to perform because your project should have been primed with a single project based on <literal>Docs-Template</literal>.
You can verify this by inspecting
the files in your project directory. A new project will contain a <literal>template</literal> directory, a <literal>pom.xml
</literal> file, a <literal>LICENSE</literal> file, and a <literal>README.md</literal> file. If this is the case, you simply
need to perform the following three steps:</para>
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Navigate down to the <literal>doc</literal> sub-directory. On Linux and Mac OS command lines, this can be achieved using the <literal>cd</literal> command: <para>Navigate down to your project directory, called <literal>my_project</literal> for this example. This can be achieved
<screen><prompt>$</prompt><userinput>cd /openpower-foundation-docbkx-framework/doc</userinput> using the <literal>cd</literal> command:
<prompt>$</prompt></screen></para> <screen><prompt>$ </prompt><userinput>cd ~/my_project</userinput>
<para>This directory should contain at least two directories, one named <literal>doc</literal> and another <literal>template</literal>, as well as a <literal>pom.xml</literal> file.</para> <prompt>$ </prompt></screen></para>
<para>This directory should contain the <literal>template</literal> folder used to prime the project.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>To create a new project directory, simply create a new directory and copy the contents of the <literal>template</literal> directory. If creating a new project named <literal>my_proj</literal> via a command line in Linux or Mac OS, the command sequence would look like this: <para>Rename the <literal>template</literal> document directory to something new like <literal>my_doc</literal>.
<screen><prompt>$</prompt><userinput>mkdir my_proj</userinput> To accomplish this, use the <literal>mv</literal> command::
<prompt>$</prompt><userinput>cp -r template/* my_proj</userinput> <screen><prompt>$ </prompt><userinput>mv template/ my_doc</userinput></screen></para>
<prompt>$</prompt></screen></para>
</listitem> </listitem>
<listitem> <listitem>
<para>Add the new project to the master POM.xml file. Using your editor, add the following lines <para>Change the project name in the workgroup POM.xml file. Using your editor, change this line
between the &lt;modules> and the &lt;/modules> tags near the top of the file:<programlisting><![CDATA[<module>my_proj</module> between the &lt;modules> and the &lt;/modules> tags near the top of the
file:<programlisting><![CDATA[<module>template</module>
]]></programlisting> to read like this:<programlisting><![CDATA[<module>my_doc</module>
]]></programlisting></para> ]]></programlisting></para>
</listitem>
</orderedlist>
<para>If this is not the first document in the project, then you can either begin by copying an existing document or by cloning the
<literal>Docs-Template</literal> project. To copy an existing project, follow these steps:</para>
<orderedlist>
<listitem>
<para>Navigate down to your project directory, called <literal>my_project</literal> for this example.
This can be achieved using the <literal>cd</literal> command:
<screen><prompt>$ </prompt><userinput>cd ~/my_project</userinput>
<prompt>$ </prompt></screen></para>
<para>This directory should contain the folder name of the document wishing to be copied, called <literal>source_doc</literal>
for clarity in these directions.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Finally, make sure to add the new directory to the git repository. <para>To create a new document directory, simply create a new directory and copy the contents of the <literal>source_doc</literal>
<screen><prompt>$</prompt><userinput>git add my_proj</userinput></screen></para> directory. If creating a new directory named <literal>my_doc</literal> via a command line, the command
sequence would look like this:
<screen><prompt>$ </prompt><userinput>mkdir my_doc</userinput>
<prompt>$ </prompt><userinput>cp -r source_doc/* my_doc</userinput>
<prompt>$ </prompt></screen></para>
</listitem>
<listitem>
<para>Add the new project to the workgroup POM.xml file. Using your editor, add the following lines
between the &lt;modules> and the &lt;/modules> tags near the top of the file:<programlisting><![CDATA[<module>my_doc</module>
]]></programlisting></para>
</listitem> </listitem>
</orderedlist> </orderedlist>
<para>Instead of copying an existing document, you may want to start with the template document source. The steps to do this
are similar to those above, but with a few more commands. The following commands will create a new document based on the
the master template:</para>
<orderedlist>
<listitem>
<para>Navigate down to your project directory, called <literal>my_project</literal> for this example.
This can be achieved using the <literal>cd</literal> command:
<screen><prompt>$ </prompt><userinput>cd ~/my_project</userinput>
<prompt>$ </prompt></screen></para>
<para>This directory should contain any existing document folders along with at least a <literal>pom.xml</literal> file, a
<literal>LICENSE</literal> file, and a <literal>README.md</literal> file.</para>
</listitem>
<listitem>
<para>Clone the the template project into your working directory with this
command:<screen><prompt>$ </prompt><userinput>git clone https://github.com/OpenPOWERFoundation/Docs-Template.git</userinput>
Cloning into 'Docs-Template'...
Username for 'https://github.com': <userinput>my_userid</userinput>
Password for 'https://my_userid@github.com': <userinput>my_password</userinput>
remote: Counting objects: 62, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 62 (delta 2), reused 0 (delta 0), pack-reused 52
Unpacking objects: 100% (62/62), done.
Checking connectivity... done.
<prompt>$ </prompt></screen></para>
</listitem>
<listitem>
<para>To create a new project directory, simply create a new directory and copy the contents of the <literal>Docs-Template/template</literal>
directory. If creating a new project named <literal>my_doc</literal> via a command line, the command
sequence would look like this:
<screen><prompt>$ </prompt><userinput>mkdir my_doc</userinput>
<prompt>$ </prompt><userinput>cp -r Docs-Template/template/* my_doc</userinput>
<prompt>$ </prompt></screen></para>
</listitem>
<listitem>
<para>Once copied, the Docs-Template directory and all its contents should be removed from your project so that it does accidentally get
included in your project. The command <userinput>rm -rf Docs-Template</userinput></para>
</listitem>
<listitem>
<para>Finally, add the new project to the workgroup POM.xml file. Using your editor, add the following lines
between the &lt;modules> and the &lt;/modules> tags near the top of the file:<programlisting><![CDATA[<module>my_doc</module>
]]></programlisting></para>
</listitem>
</orderedlist>

<note><para>Before committing the project back to git, you will need to add the new directory to the git repository. This can
be performed using the <literal>git add my_doc/</literal> command on the whole directory.</para></note>

<warning><para></para></warning>
<para>You are now ready to begin making updates to your new document. The next section will provided detailed steps of where to
get started.</para>
</section> </section>


<section> <section xml:id="section_modifying_project">
<title>Modifying core project files</title> <title>Modifying core project files</title>
<para>The first step to customizing a new project is to modify two core project files--<literal>pom.xml</literal> and <literal>bk_main.xml</literal>. Within these two files are XML comment tags that begin "<literal>&lt;!-- TODO:</literal>" to identify places which need customization. The surrounding comments will provide guidance on what needs to change and how it may be changed. Simply work through each item, making updates as requested.</para> <para>The first step to customizing a new project is to modify two core project files--<literal>pom.xml</literal>
<note><para>Be sure to remember two key values you used in the <literal>pom.xml</literal> file, <literal>&lt;webhelpDirname&gt;</literal> and <literal>&lt;pdfFilenameBase&gt;</literal>, as these will be used to locate your generated document.</para></note> and <literal>bk_main.xml</literal>. Within these two files are XML comment tags that begin "<literal>&lt;!-- TODO:</literal>"
<para>When complete, be sure to build your new document using standard maven commands like this:<screen><prompt>$</prompt><userinput>cd openpower-foundation-docbkx-framework/doc/template</userinput> to identify places which need customization. The surrounding comments will provide guidance on what needs to change and how
<prompt>$</prompt><userinput>mvn clean</userinput> it may be changed. Simply work through each item, making updates as requested.</para>
<note><para>Be sure to remember two key values you used in the <literal>pom.xml</literal> file, <literal>&lt;webhelpDirname&gt;</literal>
and <literal>&lt;pdfFilenameBase&gt;</literal>, as these will be used to locate your generated document.</para></note>
<para>When complete, be sure to build your new document using standard maven commands like
this:<screen><prompt>$ </prompt><userinput>cd my_proj/my_doc</userinput>
<prompt>$ </prompt><userinput>mvn clean</userinput>
[INFO] Scanning for projects... [INFO] Scanning for projects...
[INFO] [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
@ -74,7 +181,7 @@ Checking connectivity... done.
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
[INFO] [INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ openpower-template-guide --- [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ openpower-template-guide ---
[INFO] Deleting ~/openpower-foundation-docbkx-framework/doc/my_proj/target [INFO] Deleting ~/my_doc/my_proj/target
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS [INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
@ -82,7 +189,7 @@ Checking connectivity... done.
[INFO] Finished at: Wed Feb 25 12:54:47 CST 2015 [INFO] Finished at: Wed Feb 25 12:54:47 CST 2015
[INFO] Final Memory: 3M/7M [INFO] Final Memory: 3M/7M
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
<prompt>$</prompt><userinput>mvn generate-sources</userinput> <prompt>$ </prompt><userinput>mvn generate-sources</userinput>
[INFO] Scanning for projects... [INFO] Scanning for projects...
[INFO] [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
@ -99,28 +206,45 @@ Checking connectivity... done.
[INFO] Finished at: Wed Feb 25 12:55:15 CDT 2015 [INFO] Finished at: Wed Feb 25 12:55:15 CDT 2015
[INFO] Final Memory: 30M/390M [INFO] Final Memory: 30M/390M
[INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------
<prompt>$</prompt></screen></para> <prompt>$ </prompt></screen></para>
<para>If all goes well, the new generated pdf should be available in <literal>target/docbkx/webhelp/&lt;webhelpDirname&gt;/&lt;pdfFilenameBase&gt;.pdf</literal>.</para> <para>If all goes well, the new generated pdf should be available in
<literal>target/docbkx/webhelp/&lt;webhelpDirname&gt;/&lt;pdfFilenameBase&gt;.pdf</literal>.</para>
<para>For assistance correcting commmon build failures, see <xref linkend="section_template_debug"/>.</para>
<note><para>The permutations of Maven invocations may be combined into one operation where the parameters are specified in the order
in which one wishes to execute them. Thus, the command <literal>mvn clean generate-sources</literal> would accomplish the
same thing as the above sequence of commands.</para></note>
</section> </section>


<section> <section>
<title>Adding new content</title> <title>Adding new content</title>
<para>The starting point for book content is the <literal>bk_main.xml</literal> file (or whatever to which it was renamed in the previous step). Removal and additions of the main chapter files files will be controlled by entries near the end of that file which appear as follows:<programlisting><![CDATA[ <!-- The ch_preface.xml file is required by all documents -->
<xi:include href="../common/ch_preface.xml"/> <para>The starting point for book content is the <literal>bk_main.xml</literal> file (or whatever to which it was renamed
in the previous step). Removal and additions of the main chapter files files will be controlled by entries near the
end of that file which appear as follows:<programlisting><![CDATA[ <!-- The ch_preface.xml file is required by all documents -->
<xi:include href="../../Docs-Master/common/ch_preface.xml"/>


<!-- TODO: Add your chapter heading files here. Remove both files and insert your own. --> <!-- TODO: Add your chapter heading files here. Remove both files and insert your own. -->
<!-- See the template document for naming conventions and location of files. --> <!-- See the template document for naming conventions and location of files. -->
<xi:include href="ch_template_overview.xml"/> <xi:include href="ch_template_overview.xml"/>
<xi:include href="ch_example.xml"/> <xi:include href="ch_example.xml"/>


<!-- TODO: The following appendices are optional but highly recommended. You may add others as needed. --> <!-- The app_foundation.xml appendix file is required by all documents. -->
<xi:include href="../common/app_foundation.xml"/> <xi:include href="../../Docs-Master/common/app_foundation.xml"/>


<!-- TODO: The following template document may be modified to create additional appendices --> <!-- TODO: The following template document may be modified to create additional appendices as needed. -->
<xi:include href="app_template.xml"/> <xi:include href="app_template.xml"/>
]]></programlisting></para> ]]></programlisting></para>
<para>Copying and modifying existing files from the template or other documents is a great way to get started. When creating whole new chapter or appendix files from scratch, the <literal>ch_example.xml</literal> and <literal>app_template.xml</literal> files may serve as excellent starting points. For XML examples of various document structures, please see <xref linkend="section_template_examples"/> and its supporting source files in this document. Online resources such as those listed in <xref linkend="section_template_references"/> may also be helpful.</para>
<note><para>When creating new files for the project, remember to use the <literal>git add &lt;file name&gt;</literal> command to add new files to the git tree.</para></note> <para>Copying and modifying existing files from the template or other documents is a great way to get started. When creating
whole new chapter or appendix files from scratch, the <literal>ch_example.xml</literal> and <literal>app_template.xml</literal> files
may serve as excellent starting points. For XML examples of various document structures, please see <xref linkend="section_template_examples"/>
and its supporting source files in this document. Online resources such as those listed in <xref linkend="section_template_references"/>
may also be helpful.</para>

<note><para>When creating new files for the project, remember to use the <literal>git add &lt;file name&gt;</literal> command to
add new files to the git tree.</para></note>

</section> </section>


</section> </section>

@ -2,14 +2,17 @@
xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_policies"> xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_policies">


<title>Policies and conventions</title> <title>Policies and conventions</title>
<para>Most document style policies are established simply by using the template documentation framework. However, by applying some conventions to the document source structure, community members will be able to work across more documentation projects.</para> <para>Most document style policies are established simply by using the template documentation framework. However,
by applying some conventions to the document source structure, community members will be able to work across more d
ocumentation projects.</para>
<para>The recommended documentation structure guidelines are as follows: <para>The recommended documentation structure guidelines are as follows:
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>The head book file should be named with the prefix "bk_".</para> <para>The head book file should be named with the prefix "bk_".</para>
</listitem> </listitem>
<listitem> <listitem>
<para>The document versioning as defined by the <literal>releaseinfo</literal> tag in the main book file <literal>bk_xxx</literal> should be named "Revision N.N", not "Version N.N" or simply "N.N"</para> <para>The document versioning as defined by the <literal>releaseinfo</literal> tag in the main book
file <literal>bk_xxx</literal> should be named "Revision N.N", not "Version N.N" or simply "N.N"</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Chapters files should be named with the prefix "ch_".</para> <para>Chapters files should be named with the prefix "ch_".</para>
@ -27,9 +30,14 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_policies">
</para> </para>
<para>In addition to documentation documentation structure, general community/project guidelines are as follows <para>In addition to documentation documentation structure, general community/project guidelines are as follows
<orderedlist> <orderedlist>
<listitem><para></para></listitem> <listitem>
<para>Contributions to the documentation projects should conform to the <citetitle>Developer Certificate
Of Origin</citetitle> as defined at <link xlink:href="http://elinux.org/Developer_Certificate_Of_Origin">
http://elinux.org/Developer_Certificate_Of_Origin</link>. Submissions of patches to GitHub project need
to contain the following line to indicate the submitter accepts the
DCO:<screen>Signed-off-by: Your name &gt;your_email@domain.com</screen></para>
</listitem>
</orderedlist> </orderedlist>
</para> </para>


</section> </section>

@ -0,0 +1,70 @@
<section version="5.0" xml:lang="en" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_structure">

<title>Understanding the project structure</title>
<para>The OpenPOWER Foundation documentation build process involves dependency on a common
framework and shared files. As such a deeper explanation about the relationships of key projects and their
components may be helpful to prevent and diagnose documentation build problems. This section
provides a pictorial layout of key files and explains their roles and relationships.</para>

<para>As mentioned multiple times throughout this guide, successful build of any OpenPOWER Foundation
document requires two things:</para>
<orderedlist>
<listitem><para>The cloning of the <literal>Docs-Master</literal> project.</para></listitem>
<listitem><para>The cloning of the specific documentation project into the same parent directory as the
<literal>Docs-Master</literal> project.</para></listitem>
</orderedlist>
<para>To begin to understand why, let us use a picture. The following graphic illustrates
the directory structure of three projects -- two
<literal>Docs-Master</literal> and <literal>Docs-Template</literal>, both existing OpenPOWER Foundation GitHub projects and a
hypothetical new project named <literal>my_project</literal>.</para>
<figure pgwide="1" xml:id="project_structure_label">
<title>Directory structure and key files in the OpenPOWER Foundation Docbook projects</title>
<mediaobject>
<imageobject>
<imagedata fileref="figures/project_structure_graphic.bmp" format="GIF" scalefit="1" width="100%" />
</imageobject>
</mediaobject>
</figure>
<para>To create this structure, one would get the green directories and files by cloning <literal>Docs-Master</literal>, blue
directories and files by cloning <literal>Docs-Template</literal>, and the red files by cloning a hypothetical project
<literal>my_project</literal>.</para>
<para>Among these directories, the most important directory and project is <literal>Docs-Master</literal>. Without this project
and associated directory, no document will build. As depicted in the above figure, the <literal>Docs-Master</literal> directory
must sit at a level equal to all other project directories. Details on how to install this project can be found in the
<xref linkend="section_cloning_master_doc"/> section.</para>
<para>Inside the <literal>Docs-Master</literal>project directory, the two most important pieces are a
<literal>commmon</literal> directory
and a <literal>pom.xml</literal> file. The directory contains common files used by all projects such as the common preface
(<literal>ch_preface.xml</literal>) and the common appendix (<literal>app_foundation.xml</literal>. The <literal>pom.xml</literal> file
in this directory serves as the "Master POM" for all builds. This file references the OpenPOWER Maven Plugin JAR
(found in the OpenPOWER Foundation Repository at
<link xlink:href="http://openpowerfoundation.org/repo.openpowerfoundation.org/">http://openpowerfoundation.org/repo.openpowerfoundation.org/</link>)
used to control the OpenPOWER
Foundation document builds where all other dependencies, supporting tools, and document build rules are defined. </para>

<para>The <literal>Docs-Template</literal> project and directory are depicted in blue in the above figure. The top level of the
project <literal>Docs-Template</literal> must be cloned into the same parent directory as the <literal>Docs-Master</literal>
for Maven builds to complete successfully.
At the top level of the <literal>Docs-Template</literal> project
are a <literal>pom.xml</literal> referred to as the "Workgroup POM" and a single document directory (<literal>template</literal>).
The "Workgroup POM" is a minimal POM file that locates the the parent, "Master POM" in the <literal>Docs-Master</literal>project directory
with a <literal>&lt;relativePath></literal> definition of <literal>../Docs-Master/pom.xml</literal>.
The document directory contains the unique files used to create the document. The two most important files in the
<literal>Docs-Template/template</literal> directory(and in any project) are the <literal>pom.xml</literal> or "Document POM" which describes
how to build the document and which points to the main document file, the <literal>bk_main.xml</literal> file. This book file
contains all the Docbook source, directly or through include statements (<literal>&lt;xi:include href="..."</literal>),
to build the document.</para>
<para>For completeness of understanding, a hypothetical project <literal>my_project</literal> is also depected in red. Like all
OpenPOWER Foundation projects, it is cloned at the correct level, equal to <literal>Docs-Master</literal>. Like the
<literal>Docs-Template</literal> project, it has a "Workgroup POM" which will differ only in the <literal>&lt;modules></literal>
section where it will describe two document projects, <literal>my_doc_1</literal> and <literal>my_doc_2</literal>. But, each
document directory has similar contents to <literal>Docs-Template/template</literal> -- a "Document POM" (<literal>pom.xml</literal>)
and a "Main book file" (<literal>bk_main.xml</literal>).</para>
</section>
Loading…
Cancel
Save