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

Mark Craig
03.52.2015 08596e88b00966695244cc6e70f3467403f03c62
CR-6570 OPENDJ-1898 Move to single doc gen plugin

This patch brings the doc generation plugins together
in a single module, and adapts the implementation
of the log ref generation plugin to use a FreeMarker template
as is already in use in other plugins.

This patch also uses sections in the log ref.
Sections, rather than naked variablelists,
make the log ref easier to navigate.
1 files deleted
3 files added
6 files renamed
4 files modified
1154 ■■■■ changed files
opendj-doc-maven-plugin/pom.xml 28 ●●●●● patch | view | raw | blame | history
opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/CommandLineTool.java 2 ●●● patch | view | raw | blame | history
opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateMessageFileMojo.java 418 ●●●●● patch | view | raw | blame | history
opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateRefEntriesMojo.java 2 ●●● patch | view | raw | blame | history
opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateSchemaDocMojo.java patch | view | raw | blame | history
opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/package-info.java patch | view | raw | blame | history
opendj-doc-maven-plugin/src/main/resources/org/forgerock/opendj/maven/doc/docs.properties 76 ●●●●● patch | view | raw | blame | history
opendj-doc-maven-plugin/src/main/resources/templates/log-message-reference.ftl 66 ●●●●● patch | view | raw | blame | history
opendj-doc-maven-plugin/src/main/resources/templates/sec-locales-subtypes.ftl patch | view | raw | blame | history
opendj-ldap-toolkit/pom.xml 2 ●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/java/org/forgerock/opendj/maven/GenerateMessageFileMojo.java 537 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/pom.xml 19 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/docbkx/reference/index.xml 2 ●●● patch | view | raw | blame | history
pom.xml 2 ●●● patch | view | raw | blame | history
opendj-doc-maven-plugin/pom.xml
File was renamed from opendj-doc-plugin/pom.xml
@@ -36,7 +36,7 @@
    <version>3.0.0-SNAPSHOT</version>
  </parent>
  <artifactId>opendj-doc-plugin</artifactId>
  <artifactId>opendj-doc-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <name>OpenDJ Doc Helper Maven Plugin</name>
@@ -55,6 +55,10 @@
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.forgerock.commons</groupId>
      <artifactId>i18n-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.freemarker</groupId>
      <artifactId>freemarker</artifactId>
      <version>2.3.21</version>
@@ -71,4 +75,26 @@
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.forgerock.commons</groupId>
        <artifactId>i18n-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>generate-messages</goal>
            </goals>
            <configuration>
              <messageFiles>
                <messageFile>org/forgerock/opendj/maven/doc/docs.properties</messageFile>
              </messageFiles>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/CommandLineTool.java
File was renamed from opendj-maven-plugin/src/main/java/org/forgerock/opendj/maven/CommandLineTool.java
@@ -23,7 +23,7 @@
 *
 *      Copyright 2015 ForgeRock AS.
 */
package org.forgerock.opendj.maven;
package org.forgerock.opendj.maven.doc;
import java.util.List;
opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateMessageFileMojo.java
New file
@@ -0,0 +1,418 @@
/*
 * 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 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2015 ForgeRock AS.
 */
package org.forgerock.opendj.maven.doc;
import static org.apache.maven.plugins.annotations.LifecyclePhase.*;
import static org.forgerock.opendj.maven.doc.DocsMessages.*;
import static org.forgerock.util.Utils.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
import freemarker.template.Configuration;
import freemarker.template.TemplateException;
import freemarker.template.TemplateExceptionHandler;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.forgerock.i18n.LocalizableMessage;
/**
 * Generates an XML file of log messages found in properties files.
 */
@Mojo(name = "generate-xml-messages-doc", defaultPhase = PRE_SITE)
public class GenerateMessageFileMojo extends AbstractMojo {
    /**
     * The Maven Project.
     */
    @Parameter(property = "project", readonly = true, required = true)
    private MavenProject project;
    /**
     * 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.
     * This path must be relative to ${project.build.directory}.
     */
    @Parameter(required = true)
    private String outputDirectory;
    /**
     * A list which contains all file names, the extension is not needed.
     */
    @Parameter(required = true)
    private List<String> messageFileNames;
    /**
     * One-line descriptions for log reference categories.
     */
    private static final HashMap<String, LocalizableMessage> CATEGORY_DESCRIPTIONS =
            new HashMap<String, LocalizableMessage>();
    static {
        CATEGORY_DESCRIPTIONS.put("ACCESS_CONTROL", CATEGORY_ACCESS_CONTROL.get());
        CATEGORY_DESCRIPTIONS.put("ADMIN", CATEGORY_ADMIN.get());
        CATEGORY_DESCRIPTIONS.put("ADMIN_TOOL", CATEGORY_ADMIN_TOOL.get());
        CATEGORY_DESCRIPTIONS.put("BACKEND", CATEGORY_BACKEND.get());
        CATEGORY_DESCRIPTIONS.put("CONFIG", CATEGORY_CONFIG.get());
        CATEGORY_DESCRIPTIONS.put("CORE", CATEGORY_CORE.get());
        CATEGORY_DESCRIPTIONS.put("DSCONFIG", CATEGORY_DSCONFIG.get());
        CATEGORY_DESCRIPTIONS.put("EXTENSIONS", CATEGORY_EXTENSIONS.get());
        CATEGORY_DESCRIPTIONS.put("JEB", CATEGORY_JEB.get());
        CATEGORY_DESCRIPTIONS.put("LOG", CATEGORY_LOG.get());
        CATEGORY_DESCRIPTIONS.put("PLUGIN", CATEGORY_PLUGIN.get());
        CATEGORY_DESCRIPTIONS.put("PROTOCOL", CATEGORY_PROTOCOL.get());
        CATEGORY_DESCRIPTIONS.put("QUICKSETUP", CATEGORY_QUICKSETUP.get());
        CATEGORY_DESCRIPTIONS.put("RUNTIME_INFORMATION", CATEGORY_RUNTIME_INFORMATION.get());
        CATEGORY_DESCRIPTIONS.put("SCHEMA", CATEGORY_SCHEMA.get());
        CATEGORY_DESCRIPTIONS.put("SYNC", CATEGORY_SYNC.get());
        CATEGORY_DESCRIPTIONS.put("TASK", CATEGORY_TASK.get());
        CATEGORY_DESCRIPTIONS.put("THIRD_PARTY", CATEGORY_THIRD_PARTY.get());
        CATEGORY_DESCRIPTIONS.put("TOOLS", CATEGORY_TOOLS.get());
        CATEGORY_DESCRIPTIONS.put("USER_DEFINED", CATEGORY_USER_DEFINED.get());
        CATEGORY_DESCRIPTIONS.put("UTIL", CATEGORY_UTIL.get());
        CATEGORY_DESCRIPTIONS.put("VERSION", CATEGORY_VERSION.get());
    }
    /** Message giving formatting rules for string keys. */
    public static final String KEY_FORM_MSG = ".\n\nOpenDJ message property keys must be of the form\n\n"
            + "\t\'[CATEGORY]_[SEVERITY]_[DESCRIPTION]_[ORDINAL]\'\n\n";
    private static final String ERROR_SEVERITY_IDENTIFIER_STRING = "ERR_";
    /** FreeMarker template configuration. */
    private Configuration configuration;
    private Configuration getConfiguration() {
        if (configuration == null) {
            configuration = new Configuration(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS);
            configuration.setClassForTemplateLoading(GenerateSchemaDocMojo.class, "/templates");
            configuration.setDefaultEncoding("UTF-8");
            configuration.setTemplateExceptionHandler(TemplateExceptionHandler.DEBUG_HANDLER);
        }
        return configuration;
    }
    /**
     * Writes the result of applying the FreeMarker template to the data.
     * @param file                  The file to write to.
     * @param template              The name of a file in {@code resources/templates/}.
     * @param map                   The data to use in the template.
     * @throws IOException          Failed to write to the file.
     * @throws TemplateException    Failed to load the template.
     */
    private void writeLogRef(final File file, final String template, final Map<String, Object> map)
            throws IOException, TemplateException {
        // FreeMarker requires a configuration to find the template.
        configuration = getConfiguration();
        // FreeMarker takes the data and a Writer to process the template.
        Writer writer = null;
        try {
            writer = new PrintWriter(file);
            configuration.getTemplate(template).process(map, writer);
        } finally {
            closeSilently(writer);
        }
    }
    /**
     * Represents a log reference entry for an individual message.
     */
    private static class MessageRefEntry implements Comparable<MessageRefEntry> {
        private Integer ordinal;
        private String xmlId;
        private String formatString;
        /**
         * Build log reference entry for an log message.
         */
        public MessageRefEntry(final String msgPropKey, final Integer ordinal, final String formatString) {
            this.formatString = formatString;
            this.ordinal = ordinal;
            xmlId = getXmlId(msgPropKey);
        }
        private String getXmlId(final String messagePropertyKey) {
            // XML IDs must be unique, must begin with a letter ([A-Za-z]),
            // and may be followed by any number of letters, digits ([0-9]),
            // hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
            final String invalidChars = "[^A-Za-z0-9\\-_:\\.]";
            return messagePropertyKey.replaceAll(invalidChars, "-");
        }
        /**
         * Returns a map of this log reference entry, suitable for use with FreeMarker.
         * This implementation copies the message string verbatim.
         * @return A map of this log reference entry, suitable for use with FreeMarker.
         */
        public Map<String, Object> toMap() {
            Map<String, Object> map = new HashMap<String, Object>();
            String id = (ordinal != null) ? ordinal.toString() : MESSAGE_NO_ORDINAL.get().toString();
            map.put("xmlId", "log-ref-" + xmlId);
            map.put("id", MESSAGE_ORDINAL_ID.get(id));
            map.put("severity", MESSAGE_SEVERITY.get(ERROR_SEVERITY_PRINTABLE.get()));
            map.put("message", MESSAGE_MESSAGE.get(formatString));
            return map;
        }
        /**
         * Compare message entries by unique identifier.
         *
         * @return See {@link java.lang.Comparable#compareTo(Object)}.
         */
        @Override
        public int compareTo(MessageRefEntry mre) {
            if (this.ordinal != null && mre.ordinal != null) {
                return this.ordinal.compareTo(mre.ordinal);
            }
            return 0;
        }
    }
    /** Represents a log reference list of messages for a category. */
    private static class MessageRefCategory {
        private String category;
        private TreeSet<MessageRefEntry> messages;
        MessageRefCategory(final String category, final TreeSet<MessageRefEntry> messages) {
            this.category = category;
            this.messages = messages;
        }
        /**
         * Returns a map of this log reference category, suitable for use with FreeMarker.
         * @return A map of this log reference category, suitable for use with FreeMarker.
         */
        public Map<String, Object> toMap() {
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("id", category);
            map.put("category", MESSAGE_CATEGORY.get(category));
            List<Map<String, Object>> messageEntries = new LinkedList<Map<String, Object>>();
            for (MessageRefEntry entry : messages) {
                messageEntries.add(entry.toMap());
            }
            map.put("entries", messageEntries);
            return map;
        }
    }
    private static class MessagePropertyKey implements Comparable<MessagePropertyKey> {
        private String description;
        private Integer ordinal;
        /**
         * Creates a message property key from a string value.
         *
         * @param key
         *            from properties file
         * @return MessagePropertyKey created from string
         */
        public static MessagePropertyKey parseString(String key) {
            int li = key.lastIndexOf("_");
            if (li == -1) {
                throw new IllegalArgumentException("Incorrectly formatted key " + key);
            }
            final String description = key.substring(0, li).toUpperCase();
            Integer ordinal = null;
            try {
                String ordString = key.substring(li + 1);
                ordinal = Integer.parseInt(ordString);
            } catch (Exception nfe) {
                // Ignore exception, the message has no ordinal.
            }
            return new MessagePropertyKey(description, ordinal);
        }
        /**
         * Creates a parameterized instance.
         *
         * @param description
         *            of this key
         * @param ordinal
         *            of this key
         */
        public MessagePropertyKey(String description, Integer ordinal) {
            this.description = description;
            this.ordinal = ordinal;
        }
        /**
         * Gets the ordinal of this key.
         *
         * @return ordinal of this key
         */
        public Integer getOrdinal() {
            return this.ordinal;
        }
        /** {@inheritDoc} */
        @Override
        public String toString() {
            if (ordinal != null) {
                return description + "_" + ordinal;
            }
            return description;
        }
        /** {@inheritDoc} */
        @Override
        public int compareTo(MessagePropertyKey k) {
            if (ordinal == k.ordinal) {
                return description.compareTo(k.description);
            } else {
                return ordinal.compareTo(k.ordinal);
            }
        }
    }
    /**
     * For maven exec plugin execution. Generates for all included message files
     * (sample.properties), a xml log ref file (log-ref-sample.xml)
     *
     * @throws MojoExecutionException
     *          if a problem occurs
     * @throws MojoFailureException
     *          if a problem occurs
     */
    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        String projectBuildDir = project.getBuild().getDirectory();
        if (!outputDirectory.contains(projectBuildDir)) {
            String errorMsg = String.format("outputDirectory parameter (%s) must be included "
                    + "in ${project.build.directory} (%s)", outputDirectory, projectBuildDir);
            getLog().error(errorMsg);
            throw new MojoExecutionException(errorMsg);
        }
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("year", new SimpleDateFormat("yyyy").format(new Date()));
        map.put("lang", locale);
        map.put("title", LOG_REF_TITLE.get());
        map.put("indexterm", LOG_REF_INDEXTERM.get());
        map.put("intro", LOG_REF_INTRO.get());
        List<Map<String, Object>> categories = new LinkedList<Map<String, Object>>();
        for (String category : messageFileNames) {
            File source = new File(messagesDirectory, category + ".properties");
            categories.add(getCategoryMap(source, category.toUpperCase()));
        }
        map.put("categories", categories);
        File file = new File(outputDirectory, "log-message-reference.xml");
        try {
            createOutputDirectory();
            writeLogRef(file, "log-message-reference.ftl", map);
        } catch (Exception e) {
            throw new MojoFailureException(e.getMessage(), e);
        }
    }
    private void createOutputDirectory() throws IOException {
        File outputDir = new File(outputDirectory);
        if (outputDir != null && !outputDir.exists()) {
            if (!outputDir.mkdirs()) {
                throw new IOException("Failed to create output directory.");
            }
        }
    }
    private Map<String, Object> getCategoryMap(File source, String globalCategory) throws MojoExecutionException {
        Properties properties = new Properties();
        try {
            properties.load(new FileInputStream(source));
            Map<MessagePropertyKey, String> errorMessages = loadErrorProperties(properties);
            TreeSet<MessageRefEntry> messageRefEntries = new TreeSet<MessageRefEntry>();
            Set<Integer> usedOrdinals = new HashSet<Integer>();
            for (MessagePropertyKey msgKey : errorMessages.keySet()) {
                String formatString = errorMessages.get(msgKey).replaceAll("<", "&lt;");
                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);
                }
                usedOrdinals.add(ordinal);
                messageRefEntries.add(new MessageRefEntry(msgKey.toString(), ordinal, formatString));
            }
            return messageRefEntries.isEmpty()
                    ? new HashMap<String, Object>()
                    : new MessageRefCategory(globalCategory, messageRefEntries).toMap();
        } catch (Exception e) {
            throw new MojoExecutionException(e.getMessage(), e);
        }
    }
    private Map<MessagePropertyKey, String> loadErrorProperties(Properties properties) throws Exception {
        Map<MessagePropertyKey, String> errorMessage = new TreeMap<MessagePropertyKey, String>();
        for (Object propO : properties.keySet()) {
            String propKey = propO.toString();
            try {
                // Document only ERROR messages.
                if (propKey.startsWith(ERROR_SEVERITY_IDENTIFIER_STRING)) {
                    MessagePropertyKey key = MessagePropertyKey.parseString(propKey);
                    String formatString = properties.getProperty(propKey);
                    errorMessage.put(key, formatString);
                }
            } catch (IllegalArgumentException iae) {
                throw new Exception("invalid property key " + propKey + ": " + iae.getMessage() + KEY_FORM_MSG, iae);
            }
        }
        return errorMessage;
    }
}
opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateRefEntriesMojo.java
File was renamed from opendj-maven-plugin/src/main/java/org/forgerock/opendj/maven/GenerateRefEntriesMojo.java
@@ -23,7 +23,7 @@
 *
 *      Copyright 2015 ForgeRock AS.
 */
package org.forgerock.opendj.maven;
package org.forgerock.opendj.maven.doc;
import org.apache.maven.artifact.DependencyResolutionRequiredException;
import org.apache.maven.plugin.AbstractMojo;
opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateSchemaDocMojo.java
opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/package-info.java
opendj-doc-maven-plugin/src/main/resources/org/forgerock/opendj/maven/doc/docs.properties
New file
@@ -0,0 +1,76 @@
#
# 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.
#
#
# Documentation messages
#
CATEGORY_ACCESS_CONTROL=Access Control.
CATEGORY_ADMIN=the administration framework.
CATEGORY_ADMIN_TOOL=the tool like the offline installer and uninstaller.
CATEGORY_BACKEND=generic backends.
CATEGORY_CONFIG=configuration handling.
CATEGORY_CORE=the core server.
CATEGORY_DSCONFIG=the dsconfig administration tool.
CATEGORY_EXTENSIONS=server extensions (for example, extended operations, \
  SASL mechanisms, password storage schemes, password validators, and so on).
CATEGORY_JEB=the JE backend.
CATEGORY_LOG=the server loggers.
CATEGORY_PLUGIN=plugin processing.
CATEGORY_PROTOCOL=connection and protocol handling (for example, ASN.1 and LDAP).
CATEGORY_QUICKSETUP=quicksetup tools.
CATEGORY_RUNTIME_INFORMATION=the runtime information.
CATEGORY_SCHEMA=the server schema elements.
CATEGORY_SYNC=replication.
CATEGORY_TASK=tasks.
CATEGORY_THIRD_PARTY=third-party (including user-defined) modules.
CATEGORY_TOOLS=tools.
CATEGORY_USER_DEFINED=user-defined modules.
CATEGORY_UTIL=the general server utilities.
CATEGORY_VERSION=version information.
MESSAGE_CATEGORY=Log Message Category: %s
MESSAGE_ORDINAL_ID=ID: %s
MESSAGE_NO_ORDINAL=N/A
MESSAGE_SEVERITY=Severity: %s
MESSAGE_MESSAGE=Message: %s
ERROR_SEVERITY_PRINTABLE=ERROR
LOG_REF_TITLE=Log Message Reference
LOG_REF_INDEXTERM=Logs
LOG_REF_INTRO=The section on                                    \
  <link                                                         \
   xlink:href="admin-guide#logging"                             \
   xlink:role="http://docbook.org/xlink/role/olink"             \
   xlink:show="new"                                             \
  ><citetitle>Server Logs</citetitle></link> describes logs.    \
  Access and audit logs concern client operations               \
  rather than OpenDJ directory server and tools,                \
  and so are not listed here.                                   \
  Instead, this appendix covers severe and fatal error messages \
  for the directory server and its tools,                       \
  such as those logged in                                       \
  <filename>/path/to/opendj/logs/errors</filename>, and         \
  <filename>/path/to/opendj/logs/replication</filename>.
opendj-doc-maven-plugin/src/main/resources/templates/log-message-reference.ftl
New file
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ! CCPL HEADER START
  !
  ! This work is licensed under the Creative Commons
  ! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
  ! To view a copy of this license, visit
  ! http://creativecommons.org/licenses/by-nc-nd/3.0/
  ! or send a letter to Creative Commons, 444 Castro Street,
  ! Suite 900, Mountain View, California, 94041, USA.
  !
  ! You can also obtain a copy of the license at
  ! trunk/opendj/legal-notices/CC-BY-NC-ND.txt.
  ! See the License for the specific language governing permissions
  ! and limitations under the License.
  !
  ! If applicable, add the following below this CCPL HEADER, with the fields
  ! enclosed by brackets "[]" replaced with your own identifying information:
  !      Portions Copyright [yyyy] [name of copyright owner]
  !
  ! CCPL HEADER END
  !
  !      Copyright 2012-${year} ForgeRock AS.
  !
-->
<appendix xml:id="appendix-log-messages"
          xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="${lang}"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://docbook.org/ns/docbook
                              http://docbook.org/xml/5.0/xsd/docbook.xsd"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:xinclude="http://www.w3.org/2001/XInclude">
 <title>${title}</title>
 <indexterm>
  <primary>${indexterm}</primary>
 </indexterm>
 <para>
  ${intro}
 </para>
 <#list categories as section>
 <section xml:id="${section.id}">
  <title>${section.category}</title>
  <variablelist>
  <#list section.entries as entry>
   <varlistentry xml:id="log-ref-${entry.xmlId}">
    <term>${entry.id}</term>
    <listitem>
     <para>
      ${entry.severity}
     </para>
     <para>
      ${entry.message}
     </para>
    </listitem>
   </varlistentry>
  </#list>
  </variablelist>
 </section>
 </#list>
</appendix>
opendj-doc-maven-plugin/src/main/resources/templates/sec-locales-subtypes.ftl
opendj-ldap-toolkit/pom.xml
@@ -100,7 +100,7 @@
      </plugin>
      <plugin>
        <groupId>org.forgerock.opendj</groupId>
        <artifactId>opendj-maven-plugin</artifactId>
        <artifactId>opendj-doc-maven-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
          <execution>
opendj-maven-plugin/src/main/java/org/forgerock/opendj/maven/GenerateMessageFileMojo.java
File was deleted
opendj-server-legacy/pom.xml
@@ -526,8 +526,15 @@
              <outputFile>schema.ldif.${buildRevision}</outputFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
          <!-- Generates man page sources -->
      <plugin>
        <groupId>org.forgerock.opendj</groupId>
        <artifactId>opendj-doc-maven-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
          <execution>
             <id>generate-doc</id>
             <goals>
@@ -1834,7 +1841,7 @@
        <plugins>
          <plugin>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-doc-plugin</artifactId>
            <artifactId>opendj-doc-maven-plugin</artifactId>
            <version>${project.version}</version>
            <executions>
              <execution>
@@ -1844,14 +1851,7 @@
                  <goal>generate-schema-ref</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-maven-plugin</artifactId>
            <version>${project.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>generate-xml-messages-doc</goal>
@@ -1859,8 +1859,7 @@
                <phase>prepare-package</phase>
                <configuration>
                  <messagesDirectory>${basedir}/src/messages/org/opends/messages</messagesDirectory>
                  <outputDirectory>${project.build.directory}/docgen/logref</outputDirectory>
                  <logMessageReferenceFilePath>${basedir}/resource/log-message-reference.xml</logMessageReferenceFilePath>
                  <outputDirectory>${project.build.directory}/docbkx-sources/reference</outputDirectory>
                  <messageFileNames>
                    <!-- for xxx_yyy.properties generates a log-ref-xxx-yyy.xml file -->
                    <messageFileName>admin</messageFileName>
opendj-server-legacy/src/main/docbkx/reference/index.xml
@@ -201,7 +201,7 @@
 <xinclude:include href='appendix-extended-ops.xml' />
 <xinclude:include href='appendix-l10n.xml' />
 <xinclude:include href='appendix-interface-stability.xml' />
 <xinclude:include href='${project.build.directory}/docgen/logref/log-message-reference.xml'>
 <xinclude:include href='log-message-reference.xml'>
  <xinclude:fallback>
   <appendix>
    <title>Log Message Reference Missing</title>
pom.xml
@@ -93,7 +93,7 @@
    <module>opendj-maven-plugin</module>
    <module>opendj-copyright-maven-plugin</module>
    <module>opendj-svn-property-check-maven-plugin</module>
    <module>opendj-doc-plugin</module>
    <module>opendj-doc-maven-plugin</module>
    <module>opendj-core</module>
    <module>opendj-grizzly</module>
    <module>opendj-config</module>