OpenPOWER Library

 1.3.3. 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.

In the pom.xml file, pick your settings for document work product type (<workProduct>, work flow status (<documentStatus>), and security (<security>) carefully. Section 1.6, “Publishing OpenPOWER Documents” provides an overview of the process and details the various settings needed in the document core project files. If you still have questions after reading this section, consult with your Technical Steering Committee representative.

[Note]Note

In addition to the document settings, 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.

In the book.xml file, you will find the following document unique values which you most likely want to change:

<title>

The main title of the document. This appears in the largest font at the top of the title page.

<subtitle>

The second title of the document. This title appears in a smaller font below the <title> on the title page.

<realeaseinfo>

The document version value. This value should take the form of "Revision V.R.M" as described in Section 1.7, “Policies and conventions” recommendation 2.

When ready, build your new document using standard maven commands like this:

$ cd my_project/my_doc
$ mvn clean
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building OpenPOWER Template Guide 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ openpower-template-guide ---
[INFO] Deleting ~/my_doc/my_proj/target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.353s
[INFO] Finished at: Wed Feb 25 12:54:47 CST 2015
[INFO] Final Memory: 3M/7M
[INFO] ------------------------------------------------------------------------
$ mvn generate-sources
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building OpenPOWER Template Guide 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- openpowerdocs-maven-plugin:1.0.0:generate-webhelp (generate-webhelp) @ openpower-template-guide ---
[INFO] Processing input file: bk_main.xml
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.361s
[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.

For assistance correcting commmon build failures, see Section 1.5, “Debugging build failures”.

[Note]Note

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.

You have completed updates to core project files for your new document. Continue with the next step in Creating a new document.


loading table of contents...