mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Mark Craig
29.24.2015 16cd0b700bf132f7988ee61beadf685c3320eb47
CR-7759 OPENDJ-2195 Move hand-written server docs

Hand-written docs depend on generated doc sources.
In order to move the hand-written docs out of the project,
the sources generated from project code must be in artifacts.

This initial patch creates the artifacts for man pages
and other generated documentation.
4 files added
3 files modified
459 ■■■■ changed files
opendj-server-legacy/pom.xml 277 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/assembly/config-ref-assembly.xml 44 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/assembly/generated-doc-sources-assembly.xml 44 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/assembly/man-page-sources-assembly.xml 44 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/assembly/man-pages-assembly.xml 44 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/docbkx/reference/index.xml 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/svr4/OpenDJ/layout.xml 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/pom.xml
@@ -1846,6 +1846,57 @@
              </execution>
            </executions>
          </plugin>
          <!-- Format man pages -->
          <plugin>
            <groupId>org.forgerock.commons</groupId>
            <artifactId>forgerock-doc-maven-plugin</artifactId>
            <configuration>
              <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>
          <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>
    </profile>
@@ -1857,26 +1908,41 @@
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>enforce-man-pages-exist</id>
                <id>unpack-source-dependencies</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>enforce</goal>
                  <goal>unpack</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireFilesExist>
                      <files>
                        <file>${project.build.directory}/docbkx-sources/man-pages/man-dsconfig.xml</file>
                      </files>
                      <message>
                        Man pages not found. You must build with -P man-pages.
                      </message>
                    </requireFilesExist>
                  </rules>
                  <fail>true</fail>
                  <artifactItems>
                    <artifactItem>
                      <groupId>org.forgerock.opendj</groupId>
                      <artifactId>opendj-core</artifactId>
                      <version>${project.version}</version>
                      <classifier>sources</classifier>
                    </artifactItem>
                  </artifactItems>
                </configuration>
              </execution>
              <execution>
                <id>unpack-doc-dependencies</id>
                <phase>pre-site</phase>
                <goals>
                  <goal>unpack</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>org.forgerock.opendj</groupId>
                      <artifactId>opendj-server-legacy</artifactId>
                      <version>${project.version}</version>
                      <classifier>server-man-page-sources</classifier>
                      <outputDirectory>${project.build.directory}/docbkx-sources/man-pages</outputDirectory>
                    </artifactItem>
                  </artifactItems>
                </configuration>
              </execution>
            </executions>
@@ -1931,7 +1997,7 @@
                <phase>prepare-package</phase>
                <configuration>
                  <messagesDirectory>${basedir}/src/messages/org/opends/messages</messagesDirectory>
                  <outputDirectory>${project.build.directory}/docbkx-sources/reference</outputDirectory>
                  <outputDirectory>${project.build.directory}/docbkx-sources/shared</outputDirectory>
                  <messageFileNames>
                    <!-- for xxx_yyy.properties generates a log-ref-xxx-yyy.xml file -->
                    <messageFileName>admin</messageFileName>
@@ -1961,13 +2027,43 @@
              <execution>
                <id>generate-result-code-doc</id>
                <phase>pre-site</phase>
                <phase>prepare-package</phase>
                <goals>
                  <goal>generate-result-code-doc</goal>
                </goals>
                <configuration>
                  <resultCodeSource>../opendj-core/src/main/java/org/forgerock/opendj/ldap/ResultCode.java</resultCodeSource>
                  <xmlFile>${project.build.directory}/docbkx-sources/reference/appendix-ldap-result-codes.xml</xmlFile>
                  <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>
@@ -2017,58 +2113,35 @@
          <deb.docprefix>/usr/share/doc/${lowerCaseProductName}</deb.docprefix>
          <deb.release>1</deb.release>
          <deb.maintainer>opendj@forgerock.org</deb.maintainer>
          <manpage.dir>${project.build.directory}/docbkx/manpages/reference</manpage.dir>
          <manpage.dir>${project.build.directory}/dependency/man</manpage.dir>
        </properties>
        <build>
          <plugins>
            <plugin>
              <artifactId>maven-enforcer-plugin</artifactId>
              <artifactId>maven-dependency-plugin</artifactId>
              <executions>
                <execution>
                  <id>enforce-man-pages-exist</id>
                  <id>unpack-man-pages</id>
                  <phase>prepare-package</phase>
                  <goals>
                    <goal>enforce</goal>
                    <goal>unpack</goal>
                  </goals>
                  <configuration>
                    <rules>
                      <requireFilesExist>
                        <files>
                          <file>${project.build.directory}/docbkx-sources/man-pages/man-dsconfig.xml</file>
                        </files>
                        <message>
                          Man pages not found. You must build with -P man-pages.
                        </message>
                      </requireFilesExist>
                    </rules>
                    <fail>true</fail>
                    <artifactItems>
                      <artifactItem>
                        <groupId>org.forgerock.opendj</groupId>
                        <artifactId>opendj-server-legacy</artifactId>
                        <version>${project.version}</version>
                        <classifier>server-man-pages</classifier>
                        <outputDirectory>${project.build.directory}/dependency/man</outputDirectory>
                      </artifactItem>
                    </artifactItems>
                  </configuration>
                </execution>
              </executions>
            </plugin>
            <!-- Format man pages -->
            <plugin>
                <groupId>org.forgerock.commons</groupId>
                <artifactId>forgerock-doc-maven-plugin</artifactId>
                <configuration>
                    <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>
            <!-- Filter deb install and remove scripts -->
            <plugin>
              <artifactId>maven-resources-plugin</artifactId>
@@ -2249,52 +2322,29 @@
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>enforce-man-pages-exist</id>
                <id>unpack-man-pages</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>enforce</goal>
                  <goal>unpack</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireFilesExist>
                      <files>
                        <file>${project.build.directory}/docbkx-sources/man-pages/man-dsconfig.xml</file>
                      </files>
                      <message>
                        Man pages not found. You must build with -P man-pages.
                      </message>
                    </requireFilesExist>
                  </rules>
                  <fail>true</fail>
                  <artifactItems>
                    <artifactItem>
                      <groupId>org.forgerock.opendj</groupId>
                      <artifactId>opendj-server-legacy</artifactId>
                      <version>${project.version}</version>
                      <classifier>server-man-pages</classifier>
                      <outputDirectory>${project.build.directory}/dependency/man</outputDirectory>
                    </artifactItem>
                  </artifactItems>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- Format man pages -->
          <plugin>
            <groupId>org.forgerock.commons</groupId>
            <artifactId>forgerock-doc-maven-plugin</artifactId>
            <configuration>
              <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>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>rpm-maven-plugin</artifactId>
@@ -2411,7 +2461,7 @@
                  <directory>${rpm.prefix}/share/man</directory>
                  <sources>
                    <source>
                      <location>${project.build.directory}/docbkx/manpages/reference</location>
                      <location>${project.build.directory}/dependency/man</location>
                      <includes>
                        <include>**/*.*</include>
                      </includes>
@@ -2486,52 +2536,29 @@
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>enforce-man-pages-exist</id>
                <id>unpack-man-pages</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>enforce</goal>
                  <goal>unpack</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireFilesExist>
                      <files>
                        <file>${project.build.directory}/docbkx-sources/man-pages/man-dsconfig.xml</file>
                      </files>
                      <message>
                        Man pages not found. You must build with -P man-pages.
                      </message>
                    </requireFilesExist>
                  </rules>
                  <fail>true</fail>
                  <artifactItems>
                    <artifactItem>
                      <groupId>org.forgerock.opendj</groupId>
                      <artifactId>opendj-server-legacy</artifactId>
                      <version>${project.version}</version>
                      <classifier>server-man-pages</classifier>
                      <outputDirectory>${project.build.directory}/dependency/man</outputDirectory>
                    </artifactItem>
                  </artifactItems>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- Format man pages -->
          <plugin>
            <groupId>org.forgerock.commons</groupId>
            <artifactId>forgerock-doc-maven-plugin</artifactId>
            <configuration>
              <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>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
opendj-server-legacy/src/main/assembly/config-ref-assembly.xml
New file
@@ -0,0 +1,44 @@
<!--
  ! CDDL HEADER START
  !
  ! The contents of this file are subject to the terms of the
  ! Common Development and Distribution License, Version 1.0 only
  ! (the "License").  You may not use this file except in compliance
  ! with the License.
  !
  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
  ! or http://forgerock.org/license/CDDLv1.0.html.
  ! See the License for the specific language governing permissions
  ! and limitations under the License.
  !
  ! When distributing Covered Code, include this CDDL HEADER in each
  ! file and include the License file at
  ! legal-notices/CDDLv1_0.txt.  If applicable,
  ! add the following below this CDDL HEADER, with the fields enclosed
  ! by brackets "[]" replaced with your own identifying information:
  !      Portions Copyright [yyyy] [name of copyright owner]
  !
  ! CDDL HEADER END
  !
  !      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>
opendj-server-legacy/src/main/assembly/generated-doc-sources-assembly.xml
New file
@@ -0,0 +1,44 @@
<!--
  ! CDDL HEADER START
  !
  ! The contents of this file are subject to the terms of the
  ! Common Development and Distribution License, Version 1.0 only
  ! (the "License").  You may not use this file except in compliance
  ! with the License.
  !
  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
  ! or http://forgerock.org/license/CDDLv1.0.html.
  ! See the License for the specific language governing permissions
  ! and limitations under the License.
  !
  ! When distributing Covered Code, include this CDDL HEADER in each
  ! file and include the License file at
  ! legal-notices/CDDLv1_0.txt.  If applicable,
  ! add the following below this CDDL HEADER, with the fields enclosed
  ! by brackets "[]" replaced with your own identifying information:
  !      Portions Copyright [yyyy] [name of copyright owner]
  !
  ! CDDL HEADER END
  !
  !      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>generated-doc-sources</id>
  <formats>
    <format>jar</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>${project.build.directory}/docbkx-sources/shared</directory>
      <outputDirectory />
    </fileSet>
  </fileSets>
</assembly>
opendj-server-legacy/src/main/assembly/man-page-sources-assembly.xml
New file
@@ -0,0 +1,44 @@
<!--
  ! CDDL HEADER START
  !
  ! The contents of this file are subject to the terms of the
  ! Common Development and Distribution License, Version 1.0 only
  ! (the "License").  You may not use this file except in compliance
  ! with the License.
  !
  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
  ! or http://forgerock.org/license/CDDLv1.0.html.
  ! See the License for the specific language governing permissions
  ! and limitations under the License.
  !
  ! When distributing Covered Code, include this CDDL HEADER in each
  ! file and include the License file at
  ! legal-notices/CDDLv1_0.txt.  If applicable,
  ! add the following below this CDDL HEADER, with the fields enclosed
  ! by brackets "[]" replaced with your own identifying information:
  !      Portions Copyright [yyyy] [name of copyright owner]
  !
  ! CDDL HEADER END
  !
  !      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>server-man-page-sources</id>
  <formats>
    <format>jar</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>${project.build.directory}/docbkx-sources/man-pages</directory>
      <outputDirectory />
    </fileSet>
  </fileSets>
</assembly>
opendj-server-legacy/src/main/assembly/man-pages-assembly.xml
New file
@@ -0,0 +1,44 @@
<!--
  ! CDDL HEADER START
  !
  ! The contents of this file are subject to the terms of the
  ! Common Development and Distribution License, Version 1.0 only
  ! (the "License").  You may not use this file except in compliance
  ! with the License.
  !
  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
  ! or http://forgerock.org/license/CDDLv1.0.html.
  ! See the License for the specific language governing permissions
  ! and limitations under the License.
  !
  ! When distributing Covered Code, include this CDDL HEADER in each
  ! file and include the License file at
  ! legal-notices/CDDLv1_0.txt.  If applicable,
  ! add the following below this CDDL HEADER, with the fields enclosed
  ! by brackets "[]" replaced with your own identifying information:
  !      Portions Copyright [yyyy] [name of copyright owner]
  !
  ! CDDL HEADER END
  !
  !      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>server-man-pages</id>
  <formats>
    <format>jar</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>${project.build.directory}/docbkx/manpages/reference</directory>
      <outputDirectory />
    </fileSet>
  </fileSets>
</assembly>
opendj-server-legacy/src/main/docbkx/reference/index.xml
@@ -194,7 +194,7 @@
 <xinclude:include href="../shared/glossary.xml" />
 <xinclude:include href="appendix-rest2ldap.xml" />
 <xinclude:include href="appendix-ldap-result-codes.xml">
 <xinclude:include href="../shared/appendix-ldap-result-codes.xml">
  <xinclude:fallback>
   <appendix>
    <title>LDAP Result Codes Missing</title>
@@ -209,7 +209,7 @@
 <xinclude:include href='appendix-extended-ops.xml' />
 <xinclude:include href='appendix-l10n.xml' />
 <xinclude:include href='appendix-interface-stability.xml' />
 <xinclude:include href='log-message-reference.xml'>
 <xinclude:include href='../shared/log-message-reference.xml'>
  <xinclude:fallback>
   <appendix>
    <title>Log Message Reference Missing</title>
opendj-server-legacy/src/svr4/OpenDJ/layout.xml
@@ -77,7 +77,7 @@
    <!-- Add man pages -->
    <copy todir="${svr4.layout.pkg.dir}/man">
      <fileset dir="${project.build.directory}/docbkx/manpages/reference" />
      <fileset dir="${project.build.directory}/dependency/man" />
    </copy>
  </target>