From 88ed61f4d84c56ecbc79d1cbc9daff6330a2c34d Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Wed, 11 May 2016 09:36:10 +0000
Subject: [PATCH] OPENDJ-2947 Create opendj-doc-generated-ref

---
 opendj-doc-generated-ref/src/main/docbkx/man-pages/dsjavaproperties-files.xml                                |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/export-ldif-examples.xml                                  |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/stop-ds-examples.xml                                      |    0 
 opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateGlobalAcisTableMojo.java        |    2 
 opendj-doc-generated-ref/src/main/assembly/config-ref-assembly.xml                                           |   34 +
 opendj-doc-generated-ref/src/main/docbkx/man-pages/index.xml                                                 |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/ldif-diff-examples.xml                                    |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/base64-examples.xml                                       |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/start-ds-examples.xml                                     |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/manage-tasks-examples.xml                                 |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/upgrade-exit-codes.xml                                    |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/encode-password-examples.xml                              |    0 
 opendj-server-legacy/pom.xml                                                                                 |  176 -------
 opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapsearch-examples.xml                                   |    0 
 opendj-ldap-toolkit/pom.xml                                                                                  |  164 -------
 opendj-doc-generated-ref/src/main/docbkx/man-pages/verify-index-examples.xml                                 |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-gt0.xml                                      |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/filters.xml                                               |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/files.xml                                                 |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapdelete-examples.xml                                   |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/list-backends-examples.xml                                |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/man-windows-service.xml                                   |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/restore-examples.xml                                      |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/make-ldif-see-also.xml                                    |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/man-configure.xml                                         |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/variablelist-ldap-controls.xml                            |    0 
 opendj-doc-generated-ref/src/main/assembly/generated-doc-sources-assembly.xml                                |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapcompare-exit-codes.xml                                |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapmodify-examples.xml                                   |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/uninstall-examples.xml                                    |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/dsreplication-examples.xml                                |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/status-examples.xml                                       |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/description-dsconfig-subcommands.xml                      |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/dsconfig-examples.xml                                     |    0 
 opendj-doc-generated-ref/src/main/assembly/sdk-tools-man-pages-assembly.xml                                  |    0 
 opendj-doc-generated-ref/src/main/assembly/server-tools-man-page-sources-assembly.xml                        |    0 
 opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/Utils.java                              |  102 +---
 opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateMessageFileMojo.java            |   25 
 opendj-doc-generated-ref/pom.xml                                                                             |  743 ++++++++++++++++++++++++++++++++
 opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-5-6-other.xml                                |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/rebuild-index-examples.xml                                |    0 
 pom.xml                                                                                                      |    8 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/README.md                                                 |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/itemizedlist-duration.xml                                 |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapcompare-examples.xml                                  |    0 
 opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateRefEntriesMojo.java             |   67 ++
 opendj-doc-generated-ref/src/main/docbkx/man-pages/import-ldif-examples.xml                                  |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/make-ldif-examples.xml                                    |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/description-upgrade.xml                                   |    0 
 opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateConfigurationReferenceMojo.java |    7 
 opendj-doc-generated-ref/src/main/assembly/server-tools-man-pages-assembly.xml                               |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/create-rc-script-examples.xml                             |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/setup-examples.xml                                        |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/dsjavaproperties-examples.xml                             |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/ldappasswordmodify-examples.xml                           |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/description-psearch-info.xml                              |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-ldap-89.xml                                  |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-1.xml                                        |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/backendstat-examples.xml                                  |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/backup-examples.xml                                       |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/manage-account-examples.xml                               |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/description-dsconfig.xml                                  |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/ldifsearch-examples.xml                                   |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/verify-index-exit-codes.xml                               |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/man-opendj.xml                                            |    0 
 /dev/null                                                                                                    |   34 -
 opendj-packages/opendj-deb/pom.xml                                                                           |    2 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/control-panel-examples.xml                                |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/ldifmodify-examples.xml                                   |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/variablelist-backendstat-index-status.xml                 |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/attributes.xml                                            |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-89.xml                                       |    0 
 opendj-doc-generated-ref/src/main/docbkx/man-pages/man-make-ldif-template.xml                                |    0 
 opendj-packages/opendj-rpm/pom.xml                                                                           |    2 
 74 files changed, 877 insertions(+), 489 deletions(-)

diff --git a/opendj-doc-generated-ref/pom.xml b/opendj-doc-generated-ref/pom.xml
new file mode 100644
index 0000000..2dc843e
--- /dev/null
+++ b/opendj-doc-generated-ref/pom.xml
@@ -0,0 +1,743 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ The contents of this file are subject to the terms of the Common Development and
+  ~ Distribution License (the License). You may not use this file except in compliance with the
+  ~ License.
+  ~
+  ~ You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+  ~ specific language governing permission and limitations under the License.
+  ~
+  ~ When distributing Covered Software, include this CDDL Header Notice in each file and include
+  ~ the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+  ~ Header, with the fields enclosed by brackets [] replaced by your own identifying
+  ~ information: "Portions Copyright [year] [name of copyright owner]".
+  ~
+  ~ Copyright 2016 ForgeRock AS.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>opendj-parent</artifactId>
+        <groupId>org.forgerock.opendj</groupId>
+        <version>4.0.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>opendj-doc-generated-ref</artifactId>
+
+    <name>OpenDJ Doc Generated References</name>
+    <description>Build generated documentation sources.</description>
+    <packaging>pom</packaging>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <freemarker.version>2.3.21</freemarker.version>
+    </properties>
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack-source-dependencies</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.forgerock.opendj</groupId>
+                                    <artifactId>opendj-core</artifactId>
+                                    <version>${project.version}</version>
+                                    <classifier>sources</classifier>
+                                </artifactItem>
+
+                                <artifactItem>
+                                    <groupId>org.forgerock.opendj</groupId>
+                                    <artifactId>opendj-server-legacy</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>zip</type>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>${project.build.directory}</outputDirectory>
+                                </artifactItem>
+
+                                <artifactItem>
+                                    <groupId>org.forgerock.opendj</groupId>
+                                    <artifactId>opendj-ldap-toolkit</artifactId>
+                                    <version>${project.version}</version>
+                                    <type>zip</type>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>${project.build.directory}</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>copy-freemarker-jar</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.freemarker</groupId>
+                                    <artifactId>freemarker</artifactId>
+                                    <version>${freemarker.version}</version>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.forgerock.opendj</groupId>
+                <artifactId>opendj-doc-maven-plugin</artifactId>
+
+                <executions>
+                    <execution>
+                        <id>generate-configuration-reference-doc</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>generate-config-ref</goal>
+                        </goals>
+                    </execution>
+
+                    <execution>
+                        <id>generate-global-acis-table-and-ref-for-doc</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>generate-global-acis-table</goal>
+                            <goal>generate-schema-ref</goal>
+                        </goals>
+                    </execution>
+
+                    <execution>
+                        <id>generate-log-reference-doc</id>
+                        <goals>
+                            <goal>generate-xml-messages-doc</goal>
+                        </goals>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/docbkx-sources/shared</outputDirectory>
+                            <messageFileNames>
+                                <!-- for xxx_yyy.properties generates a log-ref-xxx-yyy.xml file -->
+                                <messageFileName>admin</messageFileName>
+                                <messageFileName>backend</messageFileName>
+                                <messageFileName>config</messageFileName>
+                                <messageFileName>core</messageFileName>
+                                <messageFileName>extension</messageFileName>
+                                <messageFileName>logger</messageFileName>
+                                <messageFileName>plugin</messageFileName>
+                                <messageFileName>protocol</messageFileName>
+                                <messageFileName>replication</messageFileName>
+                                <messageFileName>schema</messageFileName>
+                                <messageFileName>task</messageFileName>
+                                <messageFileName>tool</messageFileName>
+                                <messageFileName>utility</messageFileName>
+
+                                <!-- Ignore following message files as we document only serious errors. -->
+                                <!-- <messageFileName>access_control</messageFileName> -->
+                                <!-- <messageFileName>admin_tool</messageFileName> -->
+                                <!-- <messageFileName>external</messageFileName> -->
+                                <!-- <messageFileName>quicksetup.properties</messageFileName> -->
+                                <!-- <messageFileName>runtime_information.properties</messageFileName> -->
+                                <!-- <messageFileName>version.properties</messageFileName> -->
+                            </messageFileNames>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>generate-result-code-doc</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>generate-result-code-doc</goal>
+                        </goals>
+                        <configuration>
+                            <resultCodeSource>
+                                ${project.build.directory}/dependency/org/forgerock/opendj/ldap/ResultCode.java
+                            </resultCodeSource>
+                            <xmlFile>${project.build.directory}/docbkx-sources/shared/appendix-ldap-result-codes.xml
+                            </xmlFile>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>generate-doc</id>
+                        <goals>
+                            <goal>generate-refentry</goal>
+                        </goals>
+                        <configuration>
+                            <archiveDir>${project.build.directory}/opendj-ldap-toolkit</archiveDir>
+                            <mode>TOOLKIT</mode>
+                            <extendedClasspath>
+                                ${project.build.directory}/dependency/freemarker-${freemarker.version}.jar
+                            </extendedClasspath>
+                            <outputDir>${project.build.directory}/generated-man-pages</outputDir>
+                            <tools>
+                                <tool>
+                                    <name>addrate</name>
+                                    <application>com.forgerock.opendj.ldap.tools.AddRate</application>
+                                    <trailingSectionPaths>
+                                        <trailingSectionPath>exit-codes-0-80-89.xml</trailingSectionPath>
+                                        <trailingSectionPath>addrate-examples.xml</trailingSectionPath>
+                                    </trailingSectionPaths>
+                                </tool>
+
+                                <tool>
+                                    <name>authrate</name>
+                                    <application>com.forgerock.opendj.ldap.tools.AuthRate</application>
+                                    <trailingSectionPaths>
+                                        <trailingSectionPath>exit-codes-0-89.xml</trailingSectionPath>
+                                        <trailingSectionPath>authrate-examples.xml</trailingSectionPath>
+                                    </trailingSectionPaths>
+                                </tool>
+
+                                <tool>
+                                    <name>ldapcompare</name>
+                                    <application>com.forgerock.opendj.ldap.tools.LDAPCompare</application>
+                                    <trailingSectionPaths>
+                                        <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
+                                        <trailingSectionPath>files.xml</trailingSectionPath>
+                                        <trailingSectionPath>ldapcompare-examples.xml</trailingSectionPath>
+                                    </trailingSectionPaths>
+                                </tool>
+
+                                <tool>
+                                    <name>ldapmodify</name>
+                                    <application>com.forgerock.opendj.ldap.tools.LDAPModify</application>
+                                    <trailingSectionPaths>
+                                        <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
+                                        <trailingSectionPath>files.xml</trailingSectionPath>
+                                        <trailingSectionPath>ldapmodify-examples.xml</trailingSectionPath>
+                                    </trailingSectionPaths>
+                                </tool>
+
+                                <tool>
+                                    <name>ldappasswordmodify</name>
+                                    <application>com.forgerock.opendj.ldap.tools.LDAPPasswordModify
+                                    </application>
+                                    <trailingSectionPaths>
+                                        <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
+                                        <trailingSectionPath>files.xml</trailingSectionPath>
+                                        <trailingSectionPath>ldappasswordmodify-examples.xml
+                                        </trailingSectionPath>
+                                    </trailingSectionPaths>
+                                </tool>
+
+                                <tool>
+                                    <name>ldapsearch</name>
+                                    <application>com.forgerock.opendj.ldap.tools.LDAPSearch</application>
+                                    <trailingSectionPaths>
+                                        <trailingSectionPath>filters.xml</trailingSectionPath>
+                                        <trailingSectionPath>attributes.xml</trailingSectionPath>
+                                        <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
+                                        <trailingSectionPath>files.xml</trailingSectionPath>
+                                        <trailingSectionPath>ldapsearch-examples.xml</trailingSectionPath>
+                                    </trailingSectionPaths>
+                                </tool>
+
+                                <tool>
+                                    <name>ldifdiff</name>
+                                    <application>com.forgerock.opendj.ldap.tools.LDIFDiff</application>
+                                    <trailingSectionPaths>
+                                        <trailingSectionPath>exit-codes-0-5-6-other.xml</trailingSectionPath>
+                                        <trailingSectionPath>ldifdiff-examples.xml</trailingSectionPath>
+                                    </trailingSectionPaths>
+                                </tool>
+
+                                <tool>
+                                    <name>ldifmodify</name>
+                                    <application>com.forgerock.opendj.ldap.tools.LDIFModify</application>
+                                    <trailingSectionPaths>
+                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                        <trailingSectionPath>ldifmodify-examples.xml</trailingSectionPath>
+                                    </trailingSectionPaths>
+                                </tool>
+
+                                <tool>
+                                    <name>ldifsearch</name>
+                                    <application>com.forgerock.opendj.ldap.tools.LDIFSearch</application>
+                                    <trailingSectionPaths>
+                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                        <trailingSectionPath>ldifsearch-examples.xml</trailingSectionPath>
+                                    </trailingSectionPaths>
+                                </tool>
+
+                                <tool>
+                                    <name>makeldif</name>
+                                    <application>com.forgerock.opendj.ldap.tools.MakeLDIF</application>
+                                    <trailingSectionPaths>
+                                        <trailingSectionPath>exit-codes-0-1.xml</trailingSectionPath>
+                                        <trailingSectionPath>makeldif-examples.xml</trailingSectionPath>
+                                        <trailingSectionPath>makeldif-see-also.xml</trailingSectionPath>
+                                    </trailingSectionPaths>
+                                </tool>
+
+                                <tool>
+                                    <name>modrate</name>
+                                    <application>com.forgerock.opendj.ldap.tools.ModRate</application>
+                                    <trailingSectionPaths>
+                                        <trailingSectionPath>exit-codes-0-89.xml</trailingSectionPath>
+                                        <trailingSectionPath>modrate-examples.xml</trailingSectionPath>
+                                    </trailingSectionPaths>
+                                </tool>
+
+                                <tool>
+                                    <name>searchrate</name>
+                                    <application>com.forgerock.opendj.ldap.tools.SearchRate</application>
+                                    <trailingSectionPaths>
+                                        <trailingSectionPath>exit-codes-0-89.xml</trailingSectionPath>
+                                        <trailingSectionPath>searchrate-examples.xml</trailingSectionPath>
+                                    </trailingSectionPaths>
+                                </tool>
+                            </tools>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!-- Generate Artifacts -->
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>config-ref</id>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/config-ref-assembly.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>generated-doc-sources</id>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/generated-doc-sources-assembly.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>sdk-tools-man-pages</id>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/sdk-tools-man-pages-assembly.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>man-pages</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.forgerock.opendj</groupId>
+                        <artifactId>opendj-doc-maven-plugin</artifactId>
+
+                        <executions>
+                            <execution>
+                                <id>generate-man-pages</id>
+                                <goals>
+                                    <goal>generate-refentry</goal>
+                                </goals>
+                                <phase>generate-sources</phase>
+                                <configuration>
+                                    <archiveDir>${project.build.directory}/opendj</archiveDir>
+                                    <mode>SERVER</mode>
+                                    <extendedClasspath>
+                                        ${project.build.directory}/dependency/freemarker-${freemarker.version}.jar
+                                    </extendedClasspath>
+                                    <outputDir>${project.build.directory}/docbkx-sources/man-pages</outputDir>
+                                    <tools>
+                                        <tool>
+                                            <name>backendstat</name>
+                                            <application>org.opends.server.backends.pluggable.BackendStat</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>backendstat-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>backup</name>
+                                            <application>org.opends.server.tools.BackUpDB</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-1.xml</trailingSectionPath>
+                                                <trailingSectionPath>backup-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>base64</name>
+                                            <application>org.opends.server.util.Base64</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>base64-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>control-panel</name>
+                                            <application>org.opends.guitools.controlpanel.ControlPanelLauncher
+                                            </application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>control-panel-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>create-rc-script</name>
+                                            <application>org.opends.server.tools.CreateRCScript</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>create-rc-script-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>dsconfig</name>
+                                            <application>org.forgerock.opendj.config.dsconfig.DSConfig</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>dsconfig-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>dsjavaproperties</name>
+                                            <application>org.opends.server.tools.JavaPropertiesTool</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>dsjavaproperties-files.xml</trailingSectionPath>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>dsjavaproperties-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>dsreplication</name>
+                                            <application>org.opends.server.tools.dsreplication.ReplicationCliMain
+                                            </application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>dsreplication-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>encode-password</name>
+                                            <application>org.opends.server.tools.EncodePassword</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-5-6-other.xml</trailingSectionPath>
+                                                <trailingSectionPath>encode-password-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>export-ldif</name>
+                                            <application>org.opends.server.tools.ExportLDIF</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>export-ldif-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>import-ldif</name>
+                                            <application>org.opends.server.tools.ImportLDIF</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>export-ldif-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>ldapcompare</name>
+                                            <application>org.opends.server.tools.LDAPCompare</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>ldapcompare-exit-codes.xml</trailingSectionPath>
+                                                <trailingSectionPath>files.xml</trailingSectionPath>
+                                                <trailingSectionPath>ldapcompare-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>ldapdelete</name>
+                                            <application>org.opends.server.tools.LDAPDelete</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
+                                                <trailingSectionPath>files.xml</trailingSectionPath>
+                                                <trailingSectionPath>ldapdelete-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>ldapmodify</name>
+                                            <application>org.opends.server.tools.LDAPModify</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
+                                                <trailingSectionPath>files.xml</trailingSectionPath>
+                                                <trailingSectionPath>ldapmodify-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>ldappasswordmodify</name>
+                                            <application>org.opends.server.tools.LDAPPasswordModify</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
+                                                <trailingSectionPath>files.xml</trailingSectionPath>
+                                                <trailingSectionPath>ldappasswordmodify-examples.xml
+                                                </trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>ldapsearch</name>
+                                            <application>org.opends.server.tools.LDAPSearch</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>filters.xml</trailingSectionPath>
+                                                <trailingSectionPath>attributes.xml</trailingSectionPath>
+                                                <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
+                                                <trailingSectionPath>files.xml</trailingSectionPath>
+                                                <trailingSectionPath>ldapsearch-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>ldif-diff</name>
+                                            <application>org.opends.server.tools.LDIFDiff</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-5-6-other.xml</trailingSectionPath>
+                                                <trailingSectionPath>ldif-diff-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>ldifmodify</name>
+                                            <application>org.opends.server.tools.LDIFModify</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>ldifmodify-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>ldifsearch</name>
+                                            <application>org.opends.server.tools.LDIFSearch</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>ldifsearch-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>list-backends</name>
+                                            <application>org.opends.server.tools.ListBackends</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>list-backends-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>make-ldif</name>
+                                            <application>org.opends.server.tools.makeldif.MakeLDIF</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>make-ldif-examples.xml</trailingSectionPath>
+                                                <trailingSectionPath>make-ldif-see-also.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>manage-account</name>
+                                            <application>org.opends.server.tools.ManageAccount</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-89.xml</trailingSectionPath>
+                                                <trailingSectionPath>manage-account-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>manage-tasks</name>
+                                            <application>org.opends.server.tools.ManageTasks</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>manage-tasks-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>rebuild-index</name>
+                                            <application>org.opends.server.tools.RebuildIndex</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>rebuild-index-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>restore</name>
+                                            <application>org.opends.server.tools.RestoreDB</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>restore-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>setup</name>
+                                            <application>org.opends.quicksetup.installer.SetupLauncher</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>setup-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>start-ds</name>
+                                            <application>org.opends.server.core.DirectoryServer</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>start-ds-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>status</name>
+                                            <application>org.opends.server.tools.status.StatusCli</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>status-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>stop-ds</name>
+                                            <application>org.opends.server.tools.StopDS</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>stop-ds-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>uninstall</name>
+                                            <application>org.opends.guitools.uninstaller.UninstallLauncher</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
+                                                <trailingSectionPath>uninstall-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>upgrade</name>
+                                            <application>org.opends.server.tools.upgrade.UpgradeCli</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>upgrade-exit-codes.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+
+                                        <tool>
+                                            <name>verify-index</name>
+                                            <application>org.opends.server.tools.VerifyIndex</application>
+                                            <trailingSectionPaths>
+                                                <trailingSectionPath>verify-index-exit-codes.xml</trailingSectionPath>
+                                                <trailingSectionPath>verify-index-examples.xml</trailingSectionPath>
+                                            </trailingSectionPaths>
+                                        </tool>
+                                    </tools>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <!-- Format man pages -->
+                    <plugin>
+                        <groupId>org.forgerock.commons</groupId>
+                        <artifactId>forgerock-doc-maven-plugin</artifactId>
+                        <version>${forgerock-doc-plugin.version}</version>
+                        <executions>
+                            <execution>
+                                <id>build-man-pages</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>process</goal>
+                                    <goal>build</goal>
+                                </goals>
+                                <configuration>
+                                    <projectName>OpenDJ</projectName>
+                                    <projectVersion>${project.version}</projectVersion>
+                                    <releaseVersion>${project.version}</releaseVersion>
+                                    <googleAnalyticsId>UA-23412190-8</googleAnalyticsId>
+                                    <formats combine.self="override">
+                                        <format>man</format>
+                                    </formats>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                    <!-- Generate Artifacts -->
+                    <plugin>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>server-tools-man-pages-sources</id>
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                                <phase>package</phase>
+                                <configuration>
+                                    <descriptors>
+                                        <descriptor>src/main/assembly/server-tools-man-page-sources-assembly.xml
+                                        </descriptor>
+                                    </descriptors>
+                                </configuration>
+                            </execution>
+
+                            <execution>
+                                <id>server-tools-man-pages</id>
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                                <phase>package</phase>
+                                <configuration>
+                                    <descriptors>
+                                        <descriptor>src/main/assembly/server-tools-man-pages-assembly.xml</descriptor>
+                                    </descriptors>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/opendj-doc-generated-ref/src/main/assembly/config-ref-assembly.xml b/opendj-doc-generated-ref/src/main/assembly/config-ref-assembly.xml
new file mode 100644
index 0000000..1b813fe
--- /dev/null
+++ b/opendj-doc-generated-ref/src/main/assembly/config-ref-assembly.xml
@@ -0,0 +1,34 @@
+<!--
+  ~ The contents of this file are subject to the terms of the Common Development and
+  ~ Distribution License (the License). You may not use this file except in compliance with the
+  ~ License.
+  ~
+  ~ You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+  ~ specific language governing permission and limitations under the License.
+  ~
+  ~ When distributing Covered Software, include this CDDL Header Notice in each file and include
+  ~ the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+  ~ Header, with the fields enclosed by brackets [] replaced by your own identifying
+  ~ information: "Portions Copyright [year] [name of copyright owner]".
+  ~
+  ~ Copyright 2016 ForgeRock AS.
+  -->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
+                              http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>config-ref</id>
+
+    <formats>
+        <format>jar</format>
+    </formats>
+
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+    <fileSets>
+        <fileSet>
+            <directory>${project.build.directory}/site/configref</directory>
+            <outputDirectory />
+        </fileSet>
+    </fileSets>
+</assembly>
diff --git a/opendj-server-legacy/src/main/assembly/generated-doc-sources-assembly.xml b/opendj-doc-generated-ref/src/main/assembly/generated-doc-sources-assembly.xml
similarity index 100%
rename from opendj-server-legacy/src/main/assembly/generated-doc-sources-assembly.xml
rename to opendj-doc-generated-ref/src/main/assembly/generated-doc-sources-assembly.xml
diff --git a/opendj-ldap-toolkit/src/main/assembly/man-pages.xml b/opendj-doc-generated-ref/src/main/assembly/sdk-tools-man-pages-assembly.xml
similarity index 100%
rename from opendj-ldap-toolkit/src/main/assembly/man-pages.xml
rename to opendj-doc-generated-ref/src/main/assembly/sdk-tools-man-pages-assembly.xml
diff --git a/opendj-man-pages/src/main/assembly/man-page-sources-assembly.xml b/opendj-doc-generated-ref/src/main/assembly/server-tools-man-page-sources-assembly.xml
similarity index 100%
rename from opendj-man-pages/src/main/assembly/man-page-sources-assembly.xml
rename to opendj-doc-generated-ref/src/main/assembly/server-tools-man-page-sources-assembly.xml
diff --git a/opendj-man-pages/src/main/assembly/man-pages-assembly.xml b/opendj-doc-generated-ref/src/main/assembly/server-tools-man-pages-assembly.xml
similarity index 100%
rename from opendj-man-pages/src/main/assembly/man-pages-assembly.xml
rename to opendj-doc-generated-ref/src/main/assembly/server-tools-man-pages-assembly.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/README.md b/opendj-doc-generated-ref/src/main/docbkx/man-pages/README.md
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/README.md
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/README.md
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/attributes.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/attributes.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/attributes.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/attributes.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/backendstat-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/backendstat-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/backendstat-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/backendstat-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/backup-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/backup-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/backup-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/backup-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/base64-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/base64-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/base64-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/base64-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/control-panel-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/control-panel-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/control-panel-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/control-panel-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/create-rc-script-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/create-rc-script-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/create-rc-script-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/create-rc-script-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/description-dsconfig-subcommands.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/description-dsconfig-subcommands.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/description-dsconfig-subcommands.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/description-dsconfig-subcommands.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/description-dsconfig.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/description-dsconfig.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/description-dsconfig.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/description-dsconfig.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/description-psearch-info.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/description-psearch-info.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/description-psearch-info.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/description-psearch-info.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/description-upgrade.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/description-upgrade.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/description-upgrade.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/description-upgrade.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/dsconfig-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/dsconfig-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/dsconfig-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/dsconfig-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/dsjavaproperties-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/dsjavaproperties-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/dsjavaproperties-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/dsjavaproperties-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/dsjavaproperties-files.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/dsjavaproperties-files.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/dsjavaproperties-files.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/dsjavaproperties-files.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/dsreplication-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/dsreplication-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/dsreplication-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/dsreplication-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/encode-password-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/encode-password-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/encode-password-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/encode-password-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/exit-codes-0-1.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-1.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/exit-codes-0-1.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-1.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/exit-codes-0-5-6-other.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-5-6-other.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/exit-codes-0-5-6-other.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-5-6-other.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/exit-codes-0-89.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-89.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/exit-codes-0-89.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-89.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/exit-codes-0-gt0.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-gt0.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/exit-codes-0-gt0.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-gt0.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/exit-codes-0-ldap-89.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-ldap-89.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/exit-codes-0-ldap-89.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/exit-codes-0-ldap-89.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/export-ldif-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/export-ldif-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/export-ldif-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/export-ldif-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/files.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/files.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/files.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/files.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/filters.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/filters.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/filters.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/filters.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/import-ldif-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/import-ldif-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/import-ldif-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/import-ldif-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/index.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/index.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/index.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/index.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/itemizedlist-duration.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/itemizedlist-duration.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/itemizedlist-duration.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/itemizedlist-duration.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/ldapcompare-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapcompare-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/ldapcompare-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapcompare-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/ldapcompare-exit-codes.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapcompare-exit-codes.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/ldapcompare-exit-codes.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapcompare-exit-codes.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/ldapdelete-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapdelete-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/ldapdelete-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapdelete-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/ldapmodify-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapmodify-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/ldapmodify-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapmodify-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/ldappasswordmodify-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/ldappasswordmodify-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/ldappasswordmodify-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/ldappasswordmodify-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/ldapsearch-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapsearch-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/ldapsearch-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/ldapsearch-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/ldif-diff-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/ldif-diff-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/ldif-diff-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/ldif-diff-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/ldifmodify-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/ldifmodify-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/ldifmodify-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/ldifmodify-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/ldifsearch-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/ldifsearch-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/ldifsearch-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/ldifsearch-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/list-backends-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/list-backends-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/list-backends-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/list-backends-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/make-ldif-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/make-ldif-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/make-ldif-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/make-ldif-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/make-ldif-see-also.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/make-ldif-see-also.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/make-ldif-see-also.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/make-ldif-see-also.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/man-configure.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/man-configure.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/man-configure.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/man-configure.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/man-make-ldif-template.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/man-make-ldif-template.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/man-make-ldif-template.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/man-make-ldif-template.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/man-opendj.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/man-opendj.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/man-opendj.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/man-opendj.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/man-windows-service.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/man-windows-service.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/man-windows-service.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/man-windows-service.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/manage-account-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/manage-account-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/manage-account-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/manage-account-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/manage-tasks-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/manage-tasks-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/manage-tasks-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/manage-tasks-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/rebuild-index-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/rebuild-index-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/rebuild-index-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/rebuild-index-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/restore-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/restore-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/restore-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/restore-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/setup-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/setup-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/setup-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/setup-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/start-ds-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/start-ds-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/start-ds-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/start-ds-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/status-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/status-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/status-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/status-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/stop-ds-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/stop-ds-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/stop-ds-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/stop-ds-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/uninstall-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/uninstall-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/uninstall-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/uninstall-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/upgrade-exit-codes.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/upgrade-exit-codes.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/upgrade-exit-codes.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/upgrade-exit-codes.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/variablelist-backendstat-index-status.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/variablelist-backendstat-index-status.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/variablelist-backendstat-index-status.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/variablelist-backendstat-index-status.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/variablelist-ldap-controls.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/variablelist-ldap-controls.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/variablelist-ldap-controls.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/variablelist-ldap-controls.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/verify-index-examples.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/verify-index-examples.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/verify-index-examples.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/verify-index-examples.xml
diff --git a/opendj-man-pages/src/main/docbkx/man-pages/verify-index-exit-codes.xml b/opendj-doc-generated-ref/src/main/docbkx/man-pages/verify-index-exit-codes.xml
similarity index 100%
rename from opendj-man-pages/src/main/docbkx/man-pages/verify-index-exit-codes.xml
rename to opendj-doc-generated-ref/src/main/docbkx/man-pages/verify-index-exit-codes.xml
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateConfigurationReferenceMojo.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateConfigurationReferenceMojo.java
index d1e4176..5618a9f 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateConfigurationReferenceMojo.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateConfigurationReferenceMojo.java
@@ -28,6 +28,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Paths;
 import java.util.LinkedList;
 import java.util.List;
 
@@ -42,6 +43,10 @@
     @Parameter(property = "project", readonly = true, required = true)
     private MavenProject project;
 
+    /** Archive directory of the server to use to generate reference configuration documentation. */
+    @Parameter(property = "docServerArchivePath", defaultValue = "${project.build.directory}/opendj", required = true)
+    private String serverArchiveDirectory;
+
     /**
      * The path to the directory where the configuration reference should be written.
      * This path must be under <code>${project.build.directory}</code>.
@@ -100,7 +105,7 @@
         try {
             commands.add(getJavaCommand());
             commands.add("-classpath");
-            commands.add(getClassPath(getRuntimeClassLoader(project, getLog())));
+            commands.add(Paths.get(serverArchiveDirectory, "lib", "bootstrap.jar").toString());
             commands.add("-DGenerationDir=" + outputDirectory);
             commands.add(generatorClass);
         } catch (Exception e) {
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateGlobalAcisTableMojo.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateGlobalAcisTableMojo.java
index 346a6f0..964e32c 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateGlobalAcisTableMojo.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateGlobalAcisTableMojo.java
@@ -51,7 +51,7 @@
     private String locale;
 
     /** The config.ldif file containing default global ACIs. **/
-    @Parameter(defaultValue = "${basedir}/resource/config/config.ldif")
+    @Parameter(defaultValue = "${project.build.directory}/opendj/template/config/config.ldif")
     private File configDotLdif;
 
     /** Output directory for source files. */
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateMessageFileMojo.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateMessageFileMojo.java
index 363e719..1babb27 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateMessageFileMojo.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateMessageFileMojo.java
@@ -20,10 +20,11 @@
 import static org.forgerock.opendj.maven.doc.DocsMessages.*;
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.PrintWriter;
 import java.io.Writer;
+import java.nio.file.Paths;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
@@ -35,6 +36,7 @@
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.TreeSet;
+import java.util.jar.JarFile;
 
 import freemarker.template.Configuration;
 import freemarker.template.TemplateException;
@@ -56,9 +58,6 @@
     /** The tag of the locale for which to generate the documentation. */
     @Parameter(defaultValue = "en")
     private String locale;
-    /** The path to the directory containing the message properties files. */
-    @Parameter(required = true)
-    private String messagesDirectory;
 
     /**
      * The path to the directory where the XML file should be written.
@@ -310,8 +309,7 @@
         map.put("intro", LOG_REF_INTRO.get());
         List<Map<String, Object>> categories = new LinkedList<>();
         for (String category : messageFileNames) {
-            File source = new File(messagesDirectory, category + ".properties");
-            categories.add(getCategoryMap(source, category.toUpperCase()));
+            categories.add(getCategoryMap(category));
         }
         map.put("categories", categories);
         File file = new File(outputDirectory, "log-message-reference.xml");
@@ -330,10 +328,10 @@
         }
     }
 
-    private Map<String, Object> getCategoryMap(File source, String globalCategory) throws MojoExecutionException {
+    private Map<String, Object> getCategoryMap(final String category) throws MojoExecutionException {
         Properties properties = new Properties();
         try {
-            properties.load(new FileInputStream(source));
+            properties.load(loadPropertiesFromJar(category));
             Map<MessagePropertyKey, String> errorMessages = loadErrorProperties(properties);
             TreeSet<MessageRefEntry> messageRefEntries = new TreeSet<>();
             Set<Integer> usedOrdinals = new HashSet<>();
@@ -343,7 +341,7 @@
                 Integer ordinal = msgKey.getOrdinal();
                 if (ordinal != null && usedOrdinals.contains(ordinal)) {
                     throw new Exception("The ordinal value \'" + ordinal + "\' in key " + msgKey
-                            + " has been previously defined in " + source + KEY_FORM_MSG);
+                            + " has been previously defined in " + category + KEY_FORM_MSG);
                 }
                 usedOrdinals.add(ordinal);
                 messageRefEntries.add(new MessageRefEntry(msgKey.toString(), ordinal, formatString));
@@ -351,12 +349,19 @@
 
             return messageRefEntries.isEmpty()
                     ? new HashMap<String, Object>()
-                    : new MessageRefCategory(globalCategory, messageRefEntries).toMap();
+                    : new MessageRefCategory(category.toUpperCase(), messageRefEntries).toMap();
         } catch (Exception e) {
             throw new MojoExecutionException(e.getMessage(), e);
         }
     }
 
+    private InputStream loadPropertiesFromJar(final String category) throws IOException {
+        final JarFile jarFile = new JarFile(
+                Paths.get(project.getBuild().getDirectory(), "opendj", "lib", "opendj.jar").toString());
+        return jarFile.getInputStream(jarFile.getJarEntry(
+                Paths.get("org", "opends", "messages", category + ".properties").toString()));
+    }
+
     private Map<MessagePropertyKey, String> loadErrorProperties(Properties properties) throws Exception {
         Map<MessagePropertyKey, String> errorMessage = new TreeMap<>();
         for (Object propO : properties.keySet()) {
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateRefEntriesMojo.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateRefEntriesMojo.java
index 3e25c49..b6e3697 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateRefEntriesMojo.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateRefEntriesMojo.java
@@ -16,6 +16,7 @@
 package org.forgerock.opendj.maven.doc;
 
 import static org.forgerock.opendj.maven.doc.Utils.*;
+import static org.forgerock.util.Utils.joinAsString;
 
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -34,8 +35,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.net.URISyntaxException;
-import java.net.URLClassLoader;
 import java.nio.charset.Charset;
 import java.util.LinkedList;
 import java.util.List;
@@ -49,10 +48,32 @@
         requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME)
 public final class GenerateRefEntriesMojo extends AbstractMojo {
 
+    /**
+     * Represents the execution mode of this plugin.
+     * This Information is needed to compute runtime classpath.
+     */
+    public enum Mode {
+        /** Use OpenDJ Ldap server. */
+        SERVER,
+        /** Use the OpenDJ Ldap toolkit. */
+        TOOLKIT
+    }
+
     /** The Maven Project. */
     @Parameter(property = "project", required = true, readonly = true)
     private MavenProject project;
 
+    /** Archive directory of the artifact (server or toolkit) to use to generate documentation. */
+    @Parameter(property = "docArchiveDir", defaultValue = "${project.build.directory}/opendj", required = true)
+    private String archiveDir;
+
+    /** Whether the plugin should use the server or the toolkit classpath. */
+    @Parameter(required = true)
+    private Mode mode;
+
+    @Parameter(property = "docExtendedClasspath")
+    private String extendedClasspath;
+
     /** Tools for which to generate RefEntry files. */
     @Parameter
     private List<CommandLineTool> tools;
@@ -77,17 +98,9 @@
             throw new MojoFailureException("Output directory " + outputDir.getPath() + " not available");
         }
 
-        // A Maven plugin classpath does not include project files.
-        // Prepare a ClassLoader capable of loading the command-line tools.
-        final URLClassLoader toolsClassLoader;
-        try {
-            toolsClassLoader = getRuntimeClassLoader(project, getLog());
-        } catch (Exception e) {
-            throw new MojoExecutionException("Failed to get class loader.", e);
-        }
         for (CommandLineTool tool : tools) {
             if (tool.isEnabled()) {
-                generateManPageForTool(toolsClassLoader, tool);
+                generateManPageForTool(tool);
             }
         }
     }
@@ -95,26 +108,22 @@
     /**
      * Generate a RefEntry file to the output directory for a tool.
      * The files name corresponds to the tool name: {@code man-&lt;name>.xml}.
-     * @param toolsClassLoader          The ClassLoader to run the tool.
      * @param tool                      The tool to run in order to generate the page.
      * @throws MojoExecutionException   Failed to run the tool.
      * @throws MojoFailureException     Tool did not exit successfully.
      */
-    private void generateManPageForTool(final URLClassLoader toolsClassLoader, final CommandLineTool tool)
+    private void generateManPageForTool(final CommandLineTool tool)
             throws MojoExecutionException, MojoFailureException {
         final File   manPage    = new File(outputDir, "man-" + tool.getName() + ".xml");
         final String toolScript = tool.getName();
         final String toolSects  = pathsToXIncludes(tool.getTrailingSectionPaths());
         final String toolClass  = tool.getApplication();
-        List<String> commands   = new LinkedList<>();
+
+        final List<String> commands   = new LinkedList<>();
         commands.add(getJavaCommand());
         commands.addAll(getJavaArgs(toolScript, toolSects));
         commands.add("-classpath");
-        try {
-            commands.add(getClassPath(toolsClassLoader));
-        } catch (URISyntaxException e) {
-            throw new MojoExecutionException("Failed to set the classpath.", e);
-        }
+        commands.add(getClasspath());
         commands.add(toolClass);
         commands.add(getUsageArgument(toolScript));
 
@@ -153,6 +162,20 @@
         }
     }
 
+    private String getClasspath() {
+        String classpath = "";
+        switch (mode) {
+        case SERVER:
+            classpath += getServerClasspath(archiveDir);
+            break;
+        case TOOLKIT:
+            classpath = getToolkitClasspath(archiveDir);
+            break;
+        }
+
+        return joinAsString(File.pathSeparator, classpath, extendedClasspath);
+    }
+
     /**
      * Returns true if the output directory is available.
      * Attempts to create the directory if it does not exist.
@@ -169,9 +192,11 @@
      * @return The Java args for running a tool.
      */
     private List<String> getJavaArgs(final String scriptName, final String trailingSections) {
-        List<String> args = new LinkedList<>();
+        final String tmpDir = System.getProperty("java.io.tmpdir");
+        final List<String> args = new LinkedList<>();
         args.add("-Dorg.forgerock.opendj.gendoc=true");
-        args.add("-Dorg.opends.server.ServerRoot=" + System.getProperty("java.io.tmpdir"));
+        args.add("-Dorg.opends.server.ServerRoot=" + tmpDir);
+        args.add("-Dorg.opends.quicksetup.Root=/path/to/opendj");
         args.add("-Dcom.forgerock.opendj.ldap.tools.scriptName=" + scriptName);
         args.add("-Dorg.forgerock.opendj.gendoc.trailing=" + trailingSections + "");
         return args;
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/Utils.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/Utils.java
index be8a961..2294bce 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/Utils.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/Utils.java
@@ -11,7 +11,7 @@
  * Header, with the fields enclosed by brackets [] replaced by your own identifying
  * information: "Portions Copyright [year] [name of copyright owner]".
  *
- * Copyright 2015 ForgeRock AS.
+ * Copyright 2015-2016 ForgeRock AS.
  */
 package org.forgerock.opendj.maven.doc;
 
@@ -20,29 +20,23 @@
 import freemarker.template.Configuration;
 import freemarker.template.Template;
 import freemarker.template.TemplateExceptionHandler;
-import org.apache.maven.artifact.DependencyResolutionRequiredException;
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.project.MavenProject;
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
+import java.io.FilenameFilter;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.io.Writer;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Collections;
-import java.util.LinkedHashSet;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 /**
  * Provides utility methods for generating documentation.
@@ -133,68 +127,6 @@
         }
     }
 
-    /**
-     * Returns the classpath for the class loader and its parent.
-     * @param classLoader   Contains the URLs of the class path to return.
-     * @return The classpath for the class loader and its parent.
-     */
-    static String getClassPath(URLClassLoader classLoader) throws URISyntaxException {
-        Set<URL> urls = new LinkedHashSet<>();
-        Collections.addAll(urls, classLoader.getURLs());
-        Collections.addAll(urls, ((URLClassLoader) classLoader.getParent()).getURLs());
-        Set<String> paths = new LinkedHashSet<>();
-        for (URL url: urls) {
-            paths.add(new File(url.toURI()).getPath());
-        }
-        return joinAsString(File.pathSeparator, paths);
-    }
-
-    /**
-     * Returns a ClassLoader including the project's runtime classpath elements.
-     * This is useful when running a Java command from inside a Maven plugin.
-     *
-     * @param project   The Maven project holding runtime classpath elements.
-     * @param log       A plugin log to use for debugging.
-     * @return A ClassLoader including the project's runtime classpath elements.
-     * @throws DependencyResolutionRequiredException    Failed to access the runtime classpath
-     * @throws MalformedURLException                    Failed to add an element to the classpath
-     */
-    static URLClassLoader getRuntimeClassLoader(MavenProject project, Log log)
-            throws DependencyResolutionRequiredException, MalformedURLException {
-        List<String> runtimeClasspathElements = project.getRuntimeClasspathElements();
-        Set<URL> runtimeUrls = new LinkedHashSet<>();
-        for (String element : runtimeClasspathElements) {
-            runtimeUrls.add(new File(element).toURI().toURL());
-        }
-
-        final URLClassLoader urlClassLoader = new URLClassLoader(
-                runtimeUrls.toArray(new URL[runtimeClasspathElements.size()]),
-                Thread.currentThread().getContextClassLoader());
-        debugClassPathElements(urlClassLoader, log);
-        return urlClassLoader;
-    }
-
-    /**
-     * Logs what is on the classpath for debugging.
-     * @param classLoader   The ClassLoader with the classpath.
-     * @param log           The Maven plugin log in which to write debug messages.
-     */
-    static void debugClassPathElements(ClassLoader classLoader, Log log) {
-        if (null == classLoader) {
-            return;
-        }
-        log.debug("--------------------");
-        log.debug(classLoader.toString());
-        if (classLoader instanceof URLClassLoader) {
-            final URLClassLoader ucl = (URLClassLoader) classLoader;
-            int i = 0;
-            for (URL url : ucl.getURLs()) {
-                log.debug("url[" + (i++) + "]=" + url);
-            }
-        }
-        debugClassPathElements(classLoader.getParent(), log);
-    }
-
     /** FreeMarker template configuration. */
     static Configuration configuration;
 
@@ -233,6 +165,30 @@
         }
     }
 
+    static String getServerClasspath(final String archivePath) {
+        return Paths.get(archivePath, "lib", "bootstrap.jar").toString();
+    }
+
+    static String getToolkitClasspath(final String archivePath) {
+        File folder = Paths.get(archivePath, "lib").toFile();
+        final List<String> jarFiles = Arrays.asList(folder.list(new FilenameFilter() {
+            @Override
+            public boolean accept(final File dir, final String name) {
+                return name.endsWith(".jar");
+            }
+        }));
+
+        final List<String> absoluteJarFilePaths = new ArrayList<>();
+        for (final String fileName : jarFiles) {
+            try {
+                absoluteJarFilePaths.add(new File(folder, fileName).getCanonicalPath());
+            } catch (final IOException ignored) {
+                // Should never append.
+            }
+        }
+        return joinAsString(File.pathSeparator, absoluteJarFilePaths);
+    }
+
     private Utils() {
         // Not used.
     }
diff --git a/opendj-ldap-toolkit/pom.xml b/opendj-ldap-toolkit/pom.xml
index 746e249..18a18ec 100644
--- a/opendj-ldap-toolkit/pom.xml
+++ b/opendj-ldap-toolkit/pom.xml
@@ -160,168 +160,4 @@
             </plugin>
         </plugins>
     </build>
-
-
-    <profiles>
-        <profile>
-            <id>docs</id>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.forgerock.opendj</groupId>
-                        <artifactId>opendj-doc-maven-plugin</artifactId>
-                        <version>${project.version}</version>
-                        <executions>
-                            <execution>
-                                <id>generate-doc</id>
-                                <goals>
-                                    <goal>generate-refentry</goal>
-                                </goals>
-                                <configuration>
-                                    <outputDir>${project.build.directory}/generated-man-pages</outputDir>
-                                    <tools>
-                                        <tool>
-                                            <name>addrate</name>
-                                            <application>com.forgerock.opendj.ldap.tools.AddRate</application>
-                                            <trailingSectionPaths>
-                                                <trailingSectionPath>exit-codes-0-80-89.xml</trailingSectionPath>
-                                                <trailingSectionPath>addrate-examples.xml</trailingSectionPath>
-                                            </trailingSectionPaths>
-                                        </tool>
-
-                                        <tool>
-                                            <name>authrate</name>
-                                            <application>com.forgerock.opendj.ldap.tools.AuthRate</application>
-                                            <trailingSectionPaths>
-                                                <trailingSectionPath>exit-codes-0-89.xml</trailingSectionPath>
-                                                <trailingSectionPath>authrate-examples.xml</trailingSectionPath>
-                                            </trailingSectionPaths>
-                                        </tool>
-
-                                        <tool>
-                                            <name>ldapcompare</name>
-                                            <application>com.forgerock.opendj.ldap.tools.LDAPCompare</application>
-                                            <trailingSectionPaths>
-                                                <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
-                                                <trailingSectionPath>files.xml</trailingSectionPath>
-                                                <trailingSectionPath>ldapcompare-examples.xml</trailingSectionPath>
-                                            </trailingSectionPaths>
-                                        </tool>
-
-                                        <tool>
-                                            <name>ldapmodify</name>
-                                            <application>com.forgerock.opendj.ldap.tools.LDAPModify</application>
-                                            <trailingSectionPaths>
-                                                <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
-                                                <trailingSectionPath>files.xml</trailingSectionPath>
-                                                <trailingSectionPath>ldapmodify-examples.xml</trailingSectionPath>
-                                            </trailingSectionPaths>
-                                        </tool>
-
-                                        <tool>
-                                            <name>ldappasswordmodify</name>
-                                            <application>com.forgerock.opendj.ldap.tools.LDAPPasswordModify
-                                            </application>
-                                            <trailingSectionPaths>
-                                                <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
-                                                <trailingSectionPath>files.xml</trailingSectionPath>
-                                                <trailingSectionPath>ldappasswordmodify-examples.xml
-                                                </trailingSectionPath>
-                                            </trailingSectionPaths>
-                                        </tool>
-
-                                        <tool>
-                                            <name>ldapsearch</name>
-                                            <application>com.forgerock.opendj.ldap.tools.LDAPSearch</application>
-                                            <trailingSectionPaths>
-                                                <trailingSectionPath>filters.xml</trailingSectionPath>
-                                                <trailingSectionPath>attributes.xml</trailingSectionPath>
-                                                <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
-                                                <trailingSectionPath>files.xml</trailingSectionPath>
-                                                <trailingSectionPath>ldapsearch-examples.xml</trailingSectionPath>
-                                            </trailingSectionPaths>
-                                        </tool>
-
-                                        <tool>
-                                            <name>ldifdiff</name>
-                                            <application>com.forgerock.opendj.ldap.tools.LDIFDiff</application>
-                                            <trailingSectionPaths>
-                                                <trailingSectionPath>exit-codes-0-5-6-other.xml</trailingSectionPath>
-                                                <trailingSectionPath>ldifdiff-examples.xml</trailingSectionPath>
-                                            </trailingSectionPaths>
-                                        </tool>
-
-                                        <tool>
-                                            <name>ldifmodify</name>
-                                            <application>com.forgerock.opendj.ldap.tools.LDIFModify</application>
-                                            <trailingSectionPaths>
-                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                                <trailingSectionPath>ldifmodify-examples.xml</trailingSectionPath>
-                                            </trailingSectionPaths>
-                                        </tool>
-
-                                        <tool>
-                                            <name>ldifsearch</name>
-                                            <application>com.forgerock.opendj.ldap.tools.LDIFSearch</application>
-                                            <trailingSectionPaths>
-                                                <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                                <trailingSectionPath>ldifsearch-examples.xml</trailingSectionPath>
-                                            </trailingSectionPaths>
-                                        </tool>
-
-                                        <tool>
-                                            <name>makeldif</name>
-                                            <application>com.forgerock.opendj.ldap.tools.MakeLDIF</application>
-                                            <trailingSectionPaths>
-                                                <trailingSectionPath>exit-codes-0-1.xml</trailingSectionPath>
-                                                <trailingSectionPath>makeldif-examples.xml</trailingSectionPath>
-                                                <trailingSectionPath>makeldif-see-also.xml</trailingSectionPath>
-                                            </trailingSectionPaths>
-                                        </tool>
-
-                                        <tool>
-                                            <name>modrate</name>
-                                            <application>com.forgerock.opendj.ldap.tools.ModRate</application>
-                                            <trailingSectionPaths>
-                                                <trailingSectionPath>exit-codes-0-89.xml</trailingSectionPath>
-                                                <trailingSectionPath>modrate-examples.xml</trailingSectionPath>
-                                            </trailingSectionPaths>
-                                        </tool>
-
-                                        <tool>
-                                            <name>searchrate</name>
-                                            <application>com.forgerock.opendj.ldap.tools.SearchRate</application>
-                                            <trailingSectionPaths>
-                                                <trailingSectionPath>exit-codes-0-89.xml</trailingSectionPath>
-                                                <trailingSectionPath>searchrate-examples.xml</trailingSectionPath>
-                                            </trailingSectionPaths>
-                                        </tool>
-                                    </tools>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-assembly-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <id>man-pages</id>
-                                <phase>package</phase>
-                                <goals>
-                                    <goal>single</goal>
-                                </goals>
-                                <configuration>
-                                    <descriptors>
-                                        <descriptor>src/main/assembly/man-pages.xml</descriptor>
-                                    </descriptors>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
 </project>
diff --git a/opendj-man-pages/README.md b/opendj-man-pages/README.md
deleted file mode 100644
index 73d2a96..0000000
--- a/opendj-man-pages/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-OpenDJ man pages
-
-This Maven module contains OpenDJ man pages generation for OpenDJ package distribution.
-man pages are available for the following tools:
-
-* backendstat
-* backup
-* base64
-* control-panel
-* create-rc-script
-* dsconfig
-* dsjavaproperties
-* dsreplication
-* encode-password
-* export-ldif
-* import-ldif
-* ldapcompare
-* ldapdelete
-* ldapmodify
-* ldappasswordmodify
-* ldapsearch
-* ldif-diff
-* ldifmodify
-* ldifsearch
-* list-backends
-* make-ldif
-* make-ldif-template
-* manage-account
-* manage-tasks
-* rebuild-index
-* restore
-* setup
-* start-ds
-* status
-* stop-ds
-* uninstall
-* upgrade
-* verify-index
diff --git a/opendj-man-pages/pom.xml b/opendj-man-pages/pom.xml
deleted file mode 100644
index 62f01d0..0000000
--- a/opendj-man-pages/pom.xml
+++ /dev/null
@@ -1,416 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  The contents of this file are subject to the terms of the Common Development and
-  Distribution License (the License). You may not use this file except in compliance with the
-  License.
-
-  You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
-  specific language governing permission and limitations under the License.
-
-  When distributing Covered Software, include this CDDL Header Notice in each file and include
-  the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
-  Header, with the fields enclosed by brackets [] replaced by your own identifying
-  information: "Portions Copyright [year] [name of copyright owner]".
-
-  Copyright 2015-2016 ForgeRock AS.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.forgerock.opendj</groupId>
-        <artifactId>opendj-parent</artifactId>
-        <version>4.0.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>opendj-man-pages</artifactId>
-    <name>OpenDJ Man Pages</name>
-    <description>This module contains OpenDJ tools man pages.</description>
-
-    <packaging>pom</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.forgerock.opendj</groupId>
-            <artifactId>opendj-server-legacy</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.forgerock.opendj</groupId>
-                <artifactId>opendj-doc-maven-plugin</artifactId>
-                <version>${project.version}</version>
-                <executions>
-                    <execution>
-                        <id>generate-man-pages</id>
-                        <goals>
-                            <goal>generate-refentry</goal>
-                        </goals>
-                        <phase>process-classes</phase>
-                        <configuration>
-                            <outputDir>${project.build.directory}/docbkx-sources/man-pages</outputDir>
-                            <tools>
-                                <tool>
-                                    <name>backendstat</name>
-                                    <application>org.opends.server.backends.pluggable.BackendStat</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>backendstat-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>backup</name>
-                                    <application>org.opends.server.tools.BackUpDB</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-1.xml</trailingSectionPath>
-                                        <trailingSectionPath>backup-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>base64</name>
-                                    <application>org.opends.server.util.Base64</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>base64-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>control-panel</name>
-                                    <application>org.opends.guitools.controlpanel.ControlPanelLauncher</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>control-panel-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>create-rc-script</name>
-                                    <application>org.opends.server.tools.CreateRCScript</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>create-rc-script-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>dsconfig</name>
-                                    <application>org.forgerock.opendj.config.dsconfig.DSConfig</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>dsconfig-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>dsjavaproperties</name>
-                                    <application>org.opends.server.tools.JavaPropertiesTool</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>dsjavaproperties-files.xml</trailingSectionPath>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>dsjavaproperties-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>dsreplication</name>
-                                    <application>org.opends.server.tools.dsreplication.ReplicationCliMain</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>dsreplication-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>encode-password</name>
-                                    <application>org.opends.server.tools.EncodePassword</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-5-6-other.xml</trailingSectionPath>
-                                        <trailingSectionPath>encode-password-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>export-ldif</name>
-                                    <application>org.opends.server.tools.ExportLDIF</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>export-ldif-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>import-ldif</name>
-                                    <application>org.opends.server.tools.ImportLDIF</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>export-ldif-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>ldapcompare</name>
-                                    <application>org.opends.server.tools.LDAPCompare</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>ldapcompare-exit-codes.xml</trailingSectionPath>
-                                        <trailingSectionPath>files.xml</trailingSectionPath>
-                                        <trailingSectionPath>ldapcompare-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>ldapdelete</name>
-                                    <application>org.opends.server.tools.LDAPDelete</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
-                                        <trailingSectionPath>files.xml</trailingSectionPath>
-                                        <trailingSectionPath>ldapdelete-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>ldapmodify</name>
-                                    <application>org.opends.server.tools.LDAPModify</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
-                                        <trailingSectionPath>files.xml</trailingSectionPath>
-                                        <trailingSectionPath>ldapmodify-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>ldappasswordmodify</name>
-                                    <application>org.opends.server.tools.LDAPPasswordModify</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
-                                        <trailingSectionPath>files.xml</trailingSectionPath>
-                                        <trailingSectionPath>ldappasswordmodify-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>ldapsearch</name>
-                                    <application>org.opends.server.tools.LDAPSearch</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>filters.xml</trailingSectionPath>
-                                        <trailingSectionPath>attributes.xml</trailingSectionPath>
-                                        <trailingSectionPath>exit-codes-0-ldap-89.xml</trailingSectionPath>
-                                        <trailingSectionPath>files.xml</trailingSectionPath>
-                                        <trailingSectionPath>ldapsearch-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>ldif-diff</name>
-                                    <application>org.opends.server.tools.LDIFDiff</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-5-6-other.xml</trailingSectionPath>
-                                        <trailingSectionPath>ldif-diff-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>ldifmodify</name>
-                                    <application>org.opends.server.tools.LDIFModify</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>ldifmodify-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>ldifsearch</name>
-                                    <application>org.opends.server.tools.LDIFSearch</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>ldifsearch-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>list-backends</name>
-                                    <application>org.opends.server.tools.ListBackends</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>list-backends-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>make-ldif</name>
-                                    <application>org.opends.server.tools.makeldif.MakeLDIF</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>make-ldif-examples.xml</trailingSectionPath>
-                                        <trailingSectionPath>make-ldif-see-also.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>manage-account</name>
-                                    <application>org.opends.server.tools.ManageAccount</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-89.xml</trailingSectionPath>
-                                        <trailingSectionPath>manage-account-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>manage-tasks</name>
-                                    <application>org.opends.server.tools.ManageTasks</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>manage-tasks-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>rebuild-index</name>
-                                    <application>org.opends.server.tools.RebuildIndex</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>rebuild-index-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>restore</name>
-                                    <application>org.opends.server.tools.RestoreDB</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>restore-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>setup</name>
-                                    <application>org.opends.quicksetup.installer.SetupLauncher</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>setup-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>start-ds</name>
-                                    <application>org.opends.server.core.DirectoryServer</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>start-ds-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>status</name>
-                                    <application>org.opends.server.tools.status.StatusCli</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>status-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>stop-ds</name>
-                                    <application>org.opends.server.tools.StopDS</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>stop-ds-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>uninstall</name>
-                                    <application>org.opends.guitools.uninstaller.UninstallLauncher</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>exit-codes-0-gt0.xml</trailingSectionPath>
-                                        <trailingSectionPath>uninstall-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>upgrade</name>
-                                    <application>org.opends.server.tools.upgrade.UpgradeCli</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>upgrade-exit-codes.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-
-                                <tool>
-                                    <name>verify-index</name>
-                                    <application>org.opends.server.tools.VerifyIndex</application>
-                                    <trailingSectionPaths>
-                                        <trailingSectionPath>verify-index-exit-codes.xml</trailingSectionPath>
-                                        <trailingSectionPath>verify-index-examples.xml</trailingSectionPath>
-                                    </trailingSectionPaths>
-                                </tool>
-                            </tools>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <!-- Format man pages -->
-            <plugin>
-                <groupId>org.forgerock.commons</groupId>
-                <artifactId>forgerock-doc-maven-plugin</artifactId>
-                <version>${forgerock-doc-plugin.version}</version>
-                <configuration>
-                    <projectName>OpenDJ</projectName>
-                    <projectVersion>${project.version}</projectVersion>
-                    <releaseVersion>${project.version}</releaseVersion>
-                    <googleAnalyticsId>UA-23412190-8</googleAnalyticsId>
-                    <formats combine.self="override">
-                        <format>man</format>
-                    </formats>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>build-man-pages</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>process</goal>
-                            <goal>build</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <!-- Generate Artefacts -->
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>man-pages-sources</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/man-page-sources-assembly.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-
-                    <execution>
-                        <id>man-pages</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/man-pages-assembly.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git a/opendj-packages/opendj-deb/pom.xml b/opendj-packages/opendj-deb/pom.xml
index cc61bc3..7b354df 100644
--- a/opendj-packages/opendj-deb/pom.xml
+++ b/opendj-packages/opendj-deb/pom.xml
@@ -78,7 +78,7 @@
                                 <artifactItems>
                                     <artifactItem>
                                         <groupId>org.forgerock.opendj</groupId>
-                                        <artifactId>opendj-man-pages</artifactId>
+                                        <artifactId>opendj-doc-generated-ref</artifactId>
                                         <version>${project.version}</version>
                                         <outputDirectory>${project.build.directory}/dependency/man</outputDirectory>
                                         <classifier>server-man-pages</classifier>
diff --git a/opendj-packages/opendj-rpm/pom.xml b/opendj-packages/opendj-rpm/pom.xml
index 4807208..127b4c7 100644
--- a/opendj-packages/opendj-rpm/pom.xml
+++ b/opendj-packages/opendj-rpm/pom.xml
@@ -78,7 +78,7 @@
                                 <artifactItems>
                                     <artifactItem>
                                         <groupId>org.forgerock.opendj</groupId>
-                                        <artifactId>opendj-man-pages</artifactId>
+                                        <artifactId>opendj-doc-generated-ref</artifactId>
                                         <version>${project.version}</version>
                                         <outputDirectory>${project.build.directory}/dependency/man</outputDirectory>
                                         <classifier>server-man-pages</classifier>
diff --git a/opendj-server-legacy/pom.xml b/opendj-server-legacy/pom.xml
index 79b6f66..3d263da 100644
--- a/opendj-server-legacy/pom.xml
+++ b/opendj-server-legacy/pom.xml
@@ -317,19 +317,6 @@
                 		<ignore></ignore>
                 	</action>
                 </pluginExecution>
-                <pluginExecution>
-                	<pluginExecutionFilter>
-                		<groupId>org.forgerock.opendj</groupId>
-                		<artifactId>opendj-doc-maven-plugin</artifactId>
-                		<versionRange>[4.0.0-SNAPSHOT,)</versionRange>
-                		<goals>
-                			<goal>generate-config-ref</goal>
-                		</goals>
-                	</pluginExecutionFilter>
-                	<action>
-                		<ignore></ignore>
-                	</action>
-                </pluginExecution>
               </pluginExecutions>
             </lifecycleMappingMetadata>
           </configuration>
@@ -1423,169 +1410,6 @@
         <docGuideAdminUrl>https://backstage.forgerock.com/#!/docs/opendj/${project.version}/admin-guide</docGuideAdminUrl>
       </properties>
     </profile>
-
-    <profile>
-      <!--
-        Build the configuration reference, reference documentation source files,
-        and assemble artifacts from the results.
-        The artifacts are used when preparing the product documentation.
-
-        This profile is active without being specified explicitly.
-        To deactivate this profile, use an exclamation point as in `-P!docs`.
-      -->
-      <id>docs</id>
-
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
-
-      <build>
-        <plugins>
-          <plugin>
-            <artifactId>maven-dependency-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>unpack-source-dependencies</id>
-                <phase>prepare-package</phase>
-                <goals>
-                  <goal>unpack</goal>
-                </goals>
-                <configuration>
-                  <artifactItems>
-                    <artifactItem>
-                      <groupId>org.forgerock.opendj</groupId>
-                      <artifactId>opendj-core</artifactId>
-                      <version>${project.version}</version>
-                      <classifier>sources</classifier>
-                    </artifactItem>
-                  </artifactItems>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-
-          <plugin>
-            <groupId>org.forgerock.opendj</groupId>
-            <artifactId>opendj-doc-maven-plugin</artifactId>
-            <!--
-              Configuration reference generation requires
-              that opendj-config be on the runtime classpath for the plugin.
-              It is not enough to declare it as a dependency of this module.
-            -->
-            <dependencies>
-              <dependency>
-                <groupId>org.forgerock.opendj</groupId>
-                <artifactId>opendj-config</artifactId>
-                <version>${project.version}</version>
-              </dependency>
-            </dependencies>
-            <executions>
-              <execution>
-                <id>generate-configuration-reference-doc</id>
-                <phase>compile</phase>
-                <goals>
-                  <goal>generate-config-ref</goal>
-                </goals>
-              </execution>
-
-              <execution>
-                <id>generate-global-acis-table-for-doc</id>
-                <phase>prepare-package</phase>
-                <goals>
-                  <goal>generate-global-acis-table</goal>
-                </goals>
-              </execution>
-
-              <execution>
-                <id>generate-schema-reference-doc</id>
-                <phase>prepare-package</phase>
-                <goals>
-                  <goal>generate-schema-ref</goal>
-                </goals>
-              </execution>
-
-              <execution>
-                <id>generate-log-reference-doc</id>
-                <goals>
-                  <goal>generate-xml-messages-doc</goal>
-                </goals>
-                <phase>prepare-package</phase>
-                <configuration>
-                  <messagesDirectory>${basedir}/src/messages/org/opends/messages</messagesDirectory>
-                  <outputDirectory>${project.build.directory}/docbkx-sources/shared</outputDirectory>
-                  <messageFileNames>
-                    <!-- for xxx_yyy.properties generates a log-ref-xxx-yyy.xml file -->
-                    <messageFileName>admin</messageFileName>
-                    <messageFileName>backend</messageFileName>
-                    <messageFileName>config</messageFileName>
-                    <messageFileName>core</messageFileName>
-                    <messageFileName>extension</messageFileName>
-                    <messageFileName>logger</messageFileName>
-                    <messageFileName>plugin</messageFileName>
-                    <messageFileName>protocol</messageFileName>
-                    <messageFileName>replication</messageFileName>
-                    <messageFileName>schema</messageFileName>
-                    <messageFileName>task</messageFileName>
-                    <messageFileName>tool</messageFileName>
-                    <messageFileName>utility</messageFileName>
-
-                    <!-- Ignore following message files as we document only serious errors. -->
-                    <!-- <messageFileName>access_control</messageFileName> -->
-                    <!-- <messageFileName>admin_tool</messageFileName> -->
-                    <!-- <messageFileName>external</messageFileName> -->
-                    <!-- <messageFileName>quicksetup.properties</messageFileName> -->
-                    <!-- <messageFileName>runtime_information.properties</messageFileName> -->
-                    <!-- <messageFileName>version.properties</messageFileName> -->
-                  </messageFileNames>
-                </configuration>
-              </execution>
-
-              <execution>
-                <id>generate-result-code-doc</id>
-                <phase>prepare-package</phase>
-                <goals>
-                  <goal>generate-result-code-doc</goal>
-                </goals>
-                <configuration>
-                  <resultCodeSource>${project.build.directory}/dependency/org/forgerock/opendj/ldap/ResultCode.java</resultCodeSource>
-                  <xmlFile>${project.build.directory}/docbkx-sources/shared/appendix-ldap-result-codes.xml</xmlFile>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-
-          <plugin>
-            <artifactId>maven-assembly-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>config-ref</id>
-                <phase>package</phase>
-                <goals>
-                  <goal>single</goal>
-                </goals>
-                <configuration>
-                  <descriptors>
-                    <descriptor>src/main/assembly/config-ref-assembly.xml</descriptor>
-                  </descriptors>
-                </configuration>
-              </execution>
-              <execution>
-                <id>generated-doc-sources</id>
-                <phase>package</phase>
-                <goals>
-                  <goal>single</goal>
-                </goals>
-                <configuration>
-                  <descriptors>
-                    <descriptor>src/main/assembly/generated-doc-sources-assembly.xml</descriptor>
-                  </descriptors>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
   </profiles>
 
 </project>
diff --git a/opendj-server-legacy/src/main/assembly/config-ref-assembly.xml b/opendj-server-legacy/src/main/assembly/config-ref-assembly.xml
deleted file mode 100644
index af59bb7..0000000
--- a/opendj-server-legacy/src/main/assembly/config-ref-assembly.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<!--
-  The contents of this file are subject to the terms of the Common Development and
-  Distribution License (the License). You may not use this file except in compliance with the
-  License.
-
-  You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
-  specific language governing permission and limitations under the License.
-
-  When distributing Covered Software, include this CDDL Header Notice in each file and include
-  the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
-  Header, with the fields enclosed by brackets [] replaced by your own identifying
-  information: "Portions Copyright [year] [name of copyright owner]".
-
-  Copyright 2015 ForgeRock AS.
--->
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
-                              http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-  <id>config-ref</id>
-
-  <formats>
-    <format>jar</format>
-  </formats>
-
-  <includeBaseDirectory>false</includeBaseDirectory>
-
-  <fileSets>
-    <fileSet>
-      <directory>${project.build.directory}/site/configref</directory>
-      <outputDirectory />
-    </fileSet>
-  </fileSets>
-</assembly>
diff --git a/pom.xml b/pom.xml
index f08767e..d500c93 100644
--- a/pom.xml
+++ b/pom.xml
@@ -229,6 +229,7 @@
         <module>opendj-server-legacy</module>
         <module>opendj-dsml-servlet</module>
         <module>opendj-openidm-account-change-notification-handler</module>
+        <module>opendj-doc-generated-ref</module>
     </modules>
 
     <build>
@@ -538,13 +539,6 @@
 
     <profiles>
         <profile>
-            <id>docs</id>
-            <modules>
-                <module>opendj-man-pages</module>
-            </modules>
-        </profile>
-
-        <profile>
             <id>packages</id>
             <modules>
                 <module>opendj-packages</module>

--
Gitblit v1.10.0