diff --git a/template/bk_main.xml b/template/bk_main.xml index 8543563..b021601 100644 --- a/template/bk_main.xml +++ b/template/bk_main.xml @@ -29,11 +29,11 @@ - 2015 + 2015, 2016 OpenPOWER Foundation - Revision 0.9.1 + Revision 0.9.2 OpenPOWER @@ -58,6 +58,16 @@ + + 2016-02-25 + + + + Version 0.9.2: Technical and process updates. Explanation of project structure. + + + + 2016-01-25 diff --git a/template/ch_example.xml b/template/ch_example.xml index 6d1ec47..8afa822 100644 --- a/template/ch_example.xml +++ b/template/ch_example.xml @@ -12,7 +12,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_examples">
Example Itemized List - Here's an example of an itemized list + Here is an example of an itemized list @@ -184,9 +184,9 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_examples">
Example of code citations and user input 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: - $echo "Hello world" + $ echo "Hello world" Hello world -$ +$ 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: diff --git a/template/ch_template_overview.xml b/template/ch_template_overview.xml index a2e357b..a12b212 100644 --- a/template/ch_template_overview.xml +++ b/template/ch_template_overview.xml @@ -10,12 +10,12 @@ xmlns:xlink="http://www.w3.org/1999/xlink"> The major sections of this document addresses the following topics: - Getting started: This section details tools and commands used to contribute to OpenPOWER documentation. + 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. 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. + from scratch. Use this section to start a new document. 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"> Debugging build failures: This section provides examples of the two most common types of build failures and helps users find the relevant failure information. + + Understanding the project structure: This section provides detailed descriptions of the various project + components and their roles in the documentation creation process. + Policies and conventions: This secion contains 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"> + diff --git a/template/figures/project_structure_graphic.bmp b/template/figures/project_structure_graphic.bmp new file mode 100644 index 0000000..3b7f4af Binary files /dev/null and b/template/figures/project_structure_graphic.bmp differ diff --git a/template/figures/project_structure_graphic.odg b/template/figures/project_structure_graphic.odg new file mode 100644 index 0000000..17e60d4 Binary files /dev/null and b/template/figures/project_structure_graphic.odg differ diff --git a/template/sec_template_debugging.xml b/template/sec_template_debugging.xml index ed252c6..ef17853 100644 --- a/template/sec_template_debugging.xml +++ b/template/sec_template_debugging.xml @@ -2,7 +2,51 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_debug"> Debugging build failures - 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. + Maven/docbkx failures generally fall into these categories: + + Project structure errors + Docbook validation errors + Build failures + + Correcting the document errors starts with understanding which type of failure has occurred and + understanding where to look in your document source. + +
+ Project structure errors + + Because the OpenPOWER Foundation documentation projects are not self-contained in the + GitHub repositories, forgetting to clone the Docs-Master 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: +... +[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 + The identifying characteristic of this error type is the message, "Non-resolvable parent POM". This occurs because the + pom.xml file in the documentation project, called the "workgroup-pom" because of a project + <artifactId>workgroup-pom</artifactId> declaration, expects its parent pom file to be in the + location defined by the <relativePath>../Docs-Master/pom.xml</relativePath>, up one directory and + then in the Docs-Master director. + + + So, if you see the message "Non-resolvable parent POM", ensure that the Docs-Master project + and your project have been cloned + into the same parent directory. See for detailed directions on how to do this. + +
+ +
+ Docbook validation errors + Validation errors are generally indicated in the build output with text like the following: ... @@@@@@@@@@@@@@@@@@@@@@ @@ -11,7 +55,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_debug"> 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. You must correct the errors in the original @@ -26,7 +70,7 @@ lineNumber: 272; columnNumber: 70; text not allowed here; expected element "add The full path and filename that contains the context for the failure. In the message above, this is -/home/user1/openpower-foundation-docbkx-framework/doc/template/target//bk_main.xml-invalid.xml. +/home/user1/Docs-Template/template/target//bk_main.xml-invalid.xml. The location within the file of the syntax error. For the above example, the key information is "lineNumber: 272; columnNumber: 70. @@ -35,6 +79,12 @@ lineNumber: 272; columnNumber: 70; text not allowed here; expected element "add An explanation of the failure. This information in the above error reads, "text not allowed here; expected element "address", ...". + +
+ +
+ Build failures + Build errors are easily identified as well. Below is an example: ... [INFO] ------------------------------------------------------------------------ @@ -46,21 +96,25 @@ lineNumber: 272; columnNumber: 70; text not allowed here; expected element "add [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 "</para>". -> [Help 1]... + Like validation errors, three key pieces of information are again provided: The full path and filename of our failure is -/home/user1/openpower-foundation-docbkx-framework/doc/template/sec_template_new_document.xml. +/home/user1/Docs-Template/template/sec_template_new_document.xml. The location within the file of the error is "lineNumber: 55; columnNumber: 17. - An explanation of the failure begins with the text, "The element type "para" must be terminated by the matching end-tag "</para>." + An explanation of the failure begins with the text, "The element type "para" must be terminated by the + matching end-tag "</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 may be helpful. + 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 may be helpful. +
diff --git a/template/sec_template_existing_document.xml b/template/sec_template_existing_document.xml index 04365b4..ab3fe52 100644 --- a/template/sec_template_existing_document.xml +++ b/template/sec_template_existing_document.xml @@ -2,19 +2,27 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_existing_document"> Modifying an existing document - 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:$git clone https://github.com/open-power/openpower-foundation-docbkx-framework.git -Cloning into 'openpower-foundation-docbkx-framework'... -remote: Counting objects: 288, done. -remote: Compressing objects: 100% (157/157), done. -remote: Total 288 (delta 121), reused 288 (delta 121) -Receiving objects: 100% (288/288), 12.41 MiB | 8.04 MiB/s, done. -Resolving deltas: 100% (121/121), done. + + To begin editing an existing document, you must first clone two projects -- the master document framework project and + the specific document project. Begin by cloning the master document as described in . + + Once complete, obtain a copy of the desired document by cloning its project. For example, to clone this document, + Master Template Guide, from the + public OpenPOWER Foundation git repository, use this + command:$ git clone https://github.com/OpenPOWERFoundation/Docs-Template.git +Cloning into 'Docs-Template'... +Username for 'https://github.com': my_userid +Password for 'https://my_userid@github.com': my_password +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. -~$ +$ - To build a document such as the template guide, follow these steps from the directory where you just cloned:$cd openpower-foundation-docbkx-framework/doc/template -$mvn clean + To build a specific document such as the template guide, follow these steps from the directory where + you just cloned:$ cd Docs-Template/template +$ mvn clean [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ @@ -22,7 +30,7 @@ Checking connectivity... done. [INFO] ------------------------------------------------------------------------ [INFO] [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] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ @@ -30,7 +38,7 @@ Checking connectivity... done. [INFO] Finished at: Wed Feb 25 12:54:47 CST 2015 [INFO] Final Memory: 3M/7M [INFO] ------------------------------------------------------------------------ -$mvn generate-sources +$ mvn generate-sources [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ @@ -47,8 +55,20 @@ Checking connectivity... done. [INFO] Finished at: Wed Feb 25 12:55:15 CDT 2015 [INFO] Final Memory: 30M/390M [INFO] ------------------------------------------------------------------------ -$ - If all goes well, the generated pdf should be available in ~/openpower-foundation-docbkx-framework/doc/template/target/docbkx/webhelp/template-guide/. +$ + + 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 mvn clean generate-sources would accomplish the + same thing as the above sequence of commands. + + If all goes well, the generated pdf should be available in ~/Docs-Template/template/target/docbkx/webhelp/template-guide/. + + For assistance correcting commmon build failures, see . + Projects may contain multiple documents. While specific documents can be built by executing a + mvn clean generate-sources in the specific document directory, executing this command in + the base project directory will build all projects identified in the <module> list in the + top-level pom.xml file, known as the "workgroup-pom". +
diff --git a/template/sec_template_getting_started.xml b/template/sec_template_getting_started.xml index d04285c..9302a65 100644 --- a/template/sec_template_getting_started.xml +++ b/template/sec_template_getting_started.xml @@ -5,10 +5,13 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_getting_star To begin contributing to the OpenPOWER Foundation documentation, the following steps must be completed: - Install tools + Installing tools - Create accounts + Creating accounts + + + Cloning master document information @@ -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. Installation steps for these tools varies by operating system. On Debian-based Linux operating systems (Ubuntu and Debian), install maven and git as follows: - #apt-get install git -#apt-get install maven + # apt-get install git +# apt-get install maven On RPM-based Linux operating systems (Fedora, RHEL, openSUSE, SLES), install maven and git as follows: - #yum install git -#yum install maven + # yum install git +# yum install maven On Mac OS X, use Macports to install maven and git as follows: - #port install git -#port install maven3 + # port install git +# port install maven3 or use Homebrew to install maven and git as follows: - $brew install git -$brew install maven + $ brew install git +$ brew install maven For information on how to setup the environment on Windows, see the following websites: @@ -44,22 +47,43 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_getting_star + 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 http://bluefish.openoffice.nl/index.html. -
+
Creating accounts All OpenPOWER project documentation is maintained in GitHub trees, public and private. The first step to creating documentation will be joining the GitHub community. To join the GitHub community, apply at https://github.com/join. - The private trees are grouped in the OpenPOWER Foundation project at + The OpenPOWER Foundation documentation trees are grouped in the OpenPOWER Foundation project at https://github.com/OpenPOWERFoundation. - If you will be participating in private OpenPOWER Foundation trees, you will need to visit the OpenPOWER Foundation Members - Area wiki to find administrators for the appropriate git tree. + Everyone should be able to see and access public trees like Docs-Master. However, + if you will be participating in private OpenPOWER Foundation trees, you will need to request access from the + Technical Steering Committee Chair, tsc-chair@openpowerfoundation.org. To learn more about using git, see the online article in GitHub Help, "Good Resources for Learning Git and GitHub." at https://help.github.com/articles/good-resources-for-learning-git-and-github/.
+
+ Cloning master document information + 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 Docs-Master. + To clone the master template document framework use the clone git command:$ git clone https://github.com/OpenPOWERFoundation/Docs-Master.git +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. +$ + More information can be found about the Docs-Master project online at + https://github.com/OpenPOWERFoundation/Docs-Master. Additional details about the OpenPOWER Foundation documentation structure + are explained in of this document. +
diff --git a/template/sec_template_new_document.xml b/template/sec_template_new_document.xml index 78c1ecb..845f31b 100644 --- a/template/sec_template_new_document.xml +++ b/template/sec_template_new_document.xml @@ -4,69 +4,176 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_new_document Creating a new document Creating a new document from scratch follows four simple steps: - - Clone the appropriate template document framework. - - - Copy the template directory into a new project directory. - - - Modify core project files. - - - Begin adding document content, either from scratch or from another document. - + + Cloning the project source. + + + Finding a document framework. + + + Modifying core project files. + + + Adding new document content. +
- Cloning the base document framework - All new projects need to begin by cloning the appropriate documentation template. The template document project resides at https://github.com/open-power/openpower-foundation-docbkx-framework.git. This template should be used for both private and public OpenPOWER Foundation documents. - To clone the existing template document framework use the clone git command:$git clone https://github.com/open-power/openpower-foundation-docbkx-framework.git -Cloning into 'openpower-foundation-docbkx-framework'... -remote: Counting objects: 288, done. -remote: Compressing objects: 100% (157/157), done. -remote: Total 288 (delta 121), reused 288 (delta 121) -Receiving objects: 100% (288/288), 12.41 MiB | 8.04 MiB/s, done. -Resolving deltas: 100% (121/121), done. + Clone the project source. + All documentation projects reside in a project directory maintained in GitHub, just like the + Docs-Master framework described in . In the same directory + where the Docs-Master project has been cloned, you will need to + clone the documentation source for your project. A list of the OpenPOWER Foundation projects can be found at + https://github.com/OpenPOWERFoundation/. Select + the project from this list. + + If you do not see the project for which you are looking, you may not be authorized to it. See + 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, tsc-chair@openpowerfoundation.org, to request and get this setup. + + To clone an OpenPOWER Foundation project like Docs-Template issue the following + command:$ git clone https://github.com/OpenPOWERFoundation/Docs-Template.git +Cloning into 'Docs-Template'... +Username for 'https://github.com': my_userid +Password for 'https://my_userid@github.com': my_password +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. -$ - 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 openpower-foundation-docbkx-framework directory. -
+$ The results should look roughly something like above with actual numbers of objects, files, etc. varying + for different projects. + Private projects prompt for a GitHub userid and and password. When cloning public projects, these prompts + are skipped. + + The base project has now been cloned. + +
- Copying the template directory into a new project directory - To create a new document directory, follow these steps: + Finding a document framework + 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 Docs-Template. + You can verify this by inspecting + the files in your project directory. A new project will contain a template directory, a pom.xml + file, a LICENSE file, and a README.md file. If this is the case, you simply + need to perform the following three steps: + - - Navigate down to the doc sub-directory. On Linux and Mac OS command lines, this can be achieved using the cd command: -$cd /openpower-foundation-docbkx-framework/doc -$ - This directory should contain at least two directories, one named doc and another template, as well as a pom.xml file. + + Navigate down to your project directory, called my_project for this example. This can be achieved + using the cd command: +$ cd ~/my_project +$ + This directory should contain the template folder used to prime the project. - To create a new project directory, simply create a new directory and copy the contents of the template directory. If creating a new project named my_proj via a command line in Linux or Mac OS, the command sequence would look like this: -$mkdir my_proj -$cp -r template/* my_proj -$ + Rename the template document directory to something new like my_doc. + To accomplish this, use the mv command:: +$ mv template/ my_doc - Add the new project to the master POM.xml file. Using your editor, add the following lines - between the <modules> and the </modules> tags near the top of the file:my_proj + Change the project name in the workgroup POM.xml file. Using your editor, change this line + between the <modules> and the </modules> tags near the top of the + file:template +]]> to read like this:my_doc ]]> + + + + If this is not the first document in the project, then you can either begin by copying an existing document or by cloning the + Docs-Template project. To copy an existing project, follow these steps: + + + + Navigate down to your project directory, called my_project for this example. + This can be achieved using the cd command: +$ cd ~/my_project +$ + This directory should contain the folder name of the document wishing to be copied, called source_doc + for clarity in these directions. - Finally, make sure to add the new directory to the git repository. -$git add my_proj + To create a new document directory, simply create a new directory and copy the contents of the source_doc + directory. If creating a new directory named my_doc via a command line, the command + sequence would look like this: +$ mkdir my_doc +$ cp -r source_doc/* my_doc +$ + + + Add the new project to the workgroup POM.xml file. Using your editor, add the following lines + between the <modules> and the </modules> tags near the top of the file:my_doc +]]> + + + + 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: + + + + Navigate down to your project directory, called my_project for this example. + This can be achieved using the cd command: +$ cd ~/my_project +$ + This directory should contain any existing document folders along with at least a pom.xml file, a + LICENSE file, and a README.md file. + + + Clone the the template project into your working directory with this + command:$ git clone https://github.com/OpenPOWERFoundation/Docs-Template.git +Cloning into 'Docs-Template'... +Username for 'https://github.com': my_userid +Password for 'https://my_userid@github.com': my_password +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. +$ + + + To create a new project directory, simply create a new directory and copy the contents of the Docs-Template/template + directory. If creating a new project named my_doc via a command line, the command + sequence would look like this: +$ mkdir my_doc +$ cp -r Docs-Template/template/* my_doc +$ + + + 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 rm -rf Docs-Template + + + Finally, add the new project to the workgroup POM.xml file. Using your editor, add the following lines + between the <modules> and the </modules> tags near the top of the file:my_doc +]]> -
-
+ 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 git add my_doc/ command on the whole directory. + + + + You are now ready to begin making updates to your new document. The next section will provided detailed steps of where to + get started. +
+ +
Modifying core project files - The first step to customizing a new project is to modify two core project files--pom.xml and bk_main.xml. Within these two files are XML comment tags that begin "<!-- TODO:" 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. - Be sure to remember two key values you used in the pom.xml file, <webhelpDirname> and <pdfFilenameBase>, as these will be used to locate your generated document. - When complete, be sure to build your new document using standard maven commands like this:$cd openpower-foundation-docbkx-framework/doc/template -$mvn clean + The first step to customizing a new project is to modify two core project files--pom.xml + and bk_main.xml. Within these two files are XML comment tags that begin "<!-- TODO:" + 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. + Be sure to remember two key values you used in the pom.xml file, <webhelpDirname> + and <pdfFilenameBase>, as these will be used to locate your generated document. + When complete, be sure to build your new document using standard maven commands like + this:$ cd my_proj/my_doc +$ mvn clean [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ @@ -74,7 +181,7 @@ Checking connectivity... done. [INFO] ------------------------------------------------------------------------ [INFO] [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] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ @@ -82,7 +189,7 @@ Checking connectivity... done. [INFO] Finished at: Wed Feb 25 12:54:47 CST 2015 [INFO] Final Memory: 3M/7M [INFO] ------------------------------------------------------------------------ -$mvn generate-sources +$ mvn generate-sources [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ @@ -99,28 +206,45 @@ Checking connectivity... done. [INFO] Finished at: Wed Feb 25 12:55:15 CDT 2015 [INFO] Final Memory: 30M/390M [INFO] ------------------------------------------------------------------------ -$ - If all goes well, the new generated pdf should be available in target/docbkx/webhelp/<webhelpDirname>/<pdfFilenameBase>.pdf. +$ + If all goes well, the new generated pdf should be available in + target/docbkx/webhelp/<webhelpDirname>/<pdfFilenameBase>.pdf. + For assistance correcting commmon build failures, see . + + 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 mvn clean generate-sources would accomplish the + same thing as the above sequence of commands.
-
- Adding new content - The starting point for book content is the bk_main.xml 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: - +
+ Adding new content + + The starting point for book content is the bk_main.xml 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: + - - + + - + ]]> - 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 ch_example.xml and app_template.xml files may serve as excellent starting points. For XML examples of various document structures, please see and its supporting source files in this document. Online resources such as those listed in may also be helpful. - When creating new files for the project, remember to use the git add <file name> command to add new files to the git tree. + + 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 ch_example.xml and app_template.xml files + may serve as excellent starting points. For XML examples of various document structures, please see + and its supporting source files in this document. Online resources such as those listed in + may also be helpful. + + When creating new files for the project, remember to use the git add <file name> command to + add new files to the git tree. +
diff --git a/template/sec_template_policies.xml b/template/sec_template_policies.xml index 36c0b98..80b82ef 100644 --- a/template/sec_template_policies.xml +++ b/template/sec_template_policies.xml @@ -2,14 +2,17 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_policies"> Policies and conventions - 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. + 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. The recommended documentation structure guidelines are as follows: The head book file should be named with the prefix "bk_". - The document versioning as defined by the releaseinfo tag in the main book file bk_xxx should be named "Revision N.N", not "Version N.N" or simply "N.N" + The document versioning as defined by the releaseinfo tag in the main book + file bk_xxx should be named "Revision N.N", not "Version N.N" or simply "N.N" Chapters files should be named with the prefix "ch_". @@ -27,9 +30,14 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_template_policies"> In addition to documentation documentation structure, general community/project guidelines are as follows - + + Contributions to the documentation projects should conform to the Developer Certificate + Of Origin as defined at + http://elinux.org/Developer_Certificate_Of_Origin. Submissions of patches to GitHub project need + to contain the following line to indicate the submitter accepts the + DCO:Signed-off-by: Your name >your_email@domain.com + - diff --git a/template/sec_template_structure.xml b/template/sec_template_structure.xml new file mode 100644 index 0000000..0a8ed64 --- /dev/null +++ b/template/sec_template_structure.xml @@ -0,0 +1,70 @@ +
+ + Understanding the project structure + 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. + + As mentioned multiple times throughout this guide, successful build of any OpenPOWER Foundation + document requires two things: + + The cloning of the Docs-Master project. + The cloning of the specific documentation project into the same parent directory as the + Docs-Master project. + + To begin to understand why, let us use a picture. The following graphic illustrates + the directory structure of three projects -- two + Docs-Master and Docs-Template, both existing OpenPOWER Foundation GitHub projects and a + hypothetical new project named my_project. + +
+ Directory structure and key files in the OpenPOWER Foundation Docbook projects + + + + + +
+ + To create this structure, one would get the green directories and files by cloning Docs-Master, blue + directories and files by cloning Docs-Template, and the red files by cloning a hypothetical project + my_project. + + Among these directories, the most important directory and project is Docs-Master. Without this project + and associated directory, no document will build. As depicted in the above figure, the Docs-Master directory + must sit at a level equal to all other project directories. Details on how to install this project can be found in the + section. + + Inside the Docs-Masterproject directory, the two most important pieces are a + commmon directory + and a pom.xml file. The directory contains common files used by all projects such as the common preface + (ch_preface.xml) and the common appendix (app_foundation.xml. The pom.xml 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 + http://openpowerfoundation.org/repo.openpowerfoundation.org/) + used to control the OpenPOWER + Foundation document builds where all other dependencies, supporting tools, and document build rules are defined. + + The Docs-Template project and directory are depicted in blue in the above figure. The top level of the + project Docs-Template must be cloned into the same parent directory as the Docs-Master + for Maven builds to complete successfully. + At the top level of the Docs-Template project + are a pom.xml referred to as the "Workgroup POM" and a single document directory (template). + The "Workgroup POM" is a minimal POM file that locates the the parent, "Master POM" in the Docs-Masterproject directory + with a <relativePath> definition of ../Docs-Master/pom.xml. + The document directory contains the unique files used to create the document. The two most important files in the + Docs-Template/template directory(and in any project) are the pom.xml or "Document POM" which describes + how to build the document and which points to the main document file, the bk_main.xml file. This book file + contains all the Docbook source, directly or through include statements (<xi:include href="..."), + to build the document. + + For completeness of understanding, a hypothetical project my_project is also depected in red. Like all + OpenPOWER Foundation projects, it is cloned at the correct level, equal to Docs-Master. Like the + Docs-Template project, it has a "Workgroup POM" which will differ only in the <modules> + section where it will describe two document projects, my_doc_1 and my_doc_2. But, each + document directory has similar contents to Docs-Template/template -- a "Document POM" (pom.xml) + and a "Main book file" (bk_main.xml). +
+