<?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.
  ~ Portions Copyright 2024-2025 3A Systems LLC.
  -->
<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.openidentityplatform.opendj</groupId>
        <version>5.1.1</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>
        <docTargetVersion>${project.version}</docTargetVersion>
        <sdkDocTargetVersion>${project.version}</sdkDocTargetVersion>
    </properties>


    <build><finalName>${project.groupId}.${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-source-dependencies</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
							<ignorePermissions>true</ignorePermissions>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.openidentityplatform.opendj</groupId>
                                    <artifactId>opendj-core</artifactId>
                                    <version>${project.version}</version>
                                    <classifier>sources</classifier>
                                </artifactItem>

                                <artifactItem>
                                    <groupId>org.openidentityplatform.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.openidentityplatform.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.openidentityplatform.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}/asciidoc/source/partials</outputDirectory>
                            <messageFileNames>
                                <!--
                                  For each .properties with messages of at least error severity,
                                  generate a section in the log message reference listing the messages.
                                -->
                                <messageFileName>access_control</messageFileName>
                                <messageFileName>admin</messageFileName>
                                <messageFileName>admin_tool</messageFileName>
                                <messageFileName>backend</messageFileName>
                                <messageFileName>config</messageFileName>
                                <messageFileName>core</messageFileName>
                                <messageFileName>extension</messageFileName>
                                <messageFileName>external</messageFileName>
                                <messageFileName>logger</messageFileName>
                                <messageFileName>plugin</messageFileName>
                                <messageFileName>protocol</messageFileName>
                                <messageFileName>quickSetup</messageFileName>
                                <messageFileName>replication</messageFileName>
                                <messageFileName>runtime</messageFileName>
                                <messageFileName>schema</messageFileName>
                                <messageFileName>task</messageFileName>
                                <messageFileName>tool</messageFileName>
                                <messageFileName>utility</messageFileName>
                                <messageFileName>version</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}/asciidoc/source/partials/appendix-ldap-result-codes.adoc
                            </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}/asciidoc/source/man-pages</outputDir>
                            <tools>

                                <tool>
                                    <name>base64</name>
                                    <application>com.forgerock.opendj.ldap.tools.Base64</application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                        <trailingSectionPath>_base64-examples.adoc</trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>

                                <tool>
                                    <name>ldapcompare</name>
                                    <application>com.forgerock.opendj.ldap.tools.LDAPCompare</application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_ldapcompare-exit-codes.adoc</trailingSectionPath>
                                        <trailingSectionPath>_files.adoc</trailingSectionPath>
                                        <trailingSectionPath>_ldapcompare-examples.adoc</trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>

                                <tool>
                                    <name>ldapdelete</name>
                                    <application>com.forgerock.opendj.ldap.tools.LDAPDelete</application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_exit-codes-0-ldap-89.adoc</trailingSectionPath>
                                        <trailingSectionPath>_files.adoc</trailingSectionPath>
                                        <trailingSectionPath>_ldapdelete-examples.adoc</trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>

                                <tool>
                                    <name>ldapmodify</name>
                                    <application>com.forgerock.opendj.ldap.tools.LDAPModify</application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_exit-codes-0-ldap-89.adoc</trailingSectionPath>
                                        <trailingSectionPath>_files.adoc</trailingSectionPath>
                                        <trailingSectionPath>_ldapmodify-examples.adoc</trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>

                                <tool>
                                    <name>ldappasswordmodify</name>
                                    <application>com.forgerock.opendj.ldap.tools.LDAPPasswordModify
                                    </application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_exit-codes-0-ldap-89.adoc</trailingSectionPath>
                                        <trailingSectionPath>_files.adoc</trailingSectionPath>
                                        <trailingSectionPath>_ldappasswordmodify-examples.adoc
                                        </trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>

                                <tool>
                                    <name>ldapsearch</name>
                                    <application>com.forgerock.opendj.ldap.tools.LDAPSearch</application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_filters.adoc</trailingSectionPath>
                                        <trailingSectionPath>_attributes.adoc</trailingSectionPath>
                                        <trailingSectionPath>_exit-codes-0-ldap-89.adoc</trailingSectionPath>
                                        <trailingSectionPath>_files.adoc</trailingSectionPath>
                                        <trailingSectionPath>_ldapsearch-examples.adoc</trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>

                                <tool>
                                    <name>ldifdiff</name>
                                    <application>com.forgerock.opendj.ldap.tools.LDIFDiff</application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_ldifdiff-exit-codes.adoc</trailingSectionPath>
                                        <trailingSectionPath>_ldifdiff-examples.adoc</trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>

                                <tool>
                                    <name>ldifmodify</name>
                                    <application>com.forgerock.opendj.ldap.tools.LDIFModify</application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                        <trailingSectionPath>_ldifmodify-examples.adoc</trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>

                                <tool>
                                    <name>ldifsearch</name>
                                    <application>com.forgerock.opendj.ldap.tools.LDIFSearch</application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                        <trailingSectionPath>_ldifsearch-examples.adoc</trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>

                                <tool>
                                    <name>makeldif</name>
                                    <application>com.forgerock.opendj.ldap.tools.MakeLDIF</application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_exit-codes-0-1.adoc</trailingSectionPath>
                                        <trailingSectionPath>_makeldif-examples.adoc</trailingSectionPath>
                                        <trailingSectionPath>_makeldif-see-also.adoc</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>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>man-pages</id>
            <activation>
            		<os>
                        <family>unix</family>
                        <name>Linux</name>
                    </os>
            	</activation>
            <build><finalName>${project.groupId}.${project.artifactId}</finalName>
                <plugins>
                    <plugin>
                        <groupId>org.openidentityplatform.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}/asciidoc/source/man-pages</outputDir>
                                    <tools>
                                        <tool>
                                            <name>backendstat</name>
                                            <application>org.opends.server.backends.pluggable.BackendStat</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_backendstat-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>backup</name>
                                            <application>org.opends.server.tools.BackUpDB</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-1.adoc</trailingSectionPath>
                                                <trailingSectionPath>_backup-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>control-panel</name>
                                            <application>org.opends.guitools.controlpanel.ControlPanelLauncher
                                            </application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_control-panel-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>create-rc-script</name>
                                            <application>org.opends.server.tools.CreateRCScript</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_create-rc-script-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>dsconfig</name>
                                            <application>org.forgerock.opendj.config.dsconfig.DSConfig</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_dsconfig-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>dsreplication</name>
                                            <application>org.opends.server.tools.dsreplication.ReplicationCliMain
                                            </application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_dsreplication-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>encode-password</name>
                                            <application>org.opends.server.tools.EncodePassword</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-5-6-other.adoc</trailingSectionPath>
                                                <trailingSectionPath>_encode-password-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>export-ldif</name>
                                            <application>org.opends.server.tools.ExportLDIF</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_export-ldif-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>import-ldif</name>
                                            <application>org.opends.server.tools.ImportLDIF</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_import-ldif-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>list-backends</name>
                                            <application>org.opends.server.tools.ListBackends</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_list-backends-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>manage-account</name>
                                            <application>org.opends.server.tools.ManageAccount</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-89.adoc</trailingSectionPath>
                                                <trailingSectionPath>_manage-account-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>manage-tasks</name>
                                            <application>org.opends.server.tools.ManageTasks</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_manage-tasks-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>rebuild-index</name>
                                            <application>org.opends.server.tools.RebuildIndex</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_rebuild-index-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>restore</name>
                                            <application>org.opends.server.tools.RestoreDB</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_restore-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>setup</name>
                                            <application>org.opends.quicksetup.installer.SetupLauncher</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_setup-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>start-ds</name>
                                            <application>org.opends.server.core.DirectoryServer</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_start-ds-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>status</name>
                                            <application>org.opends.server.tools.status.StatusCli</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_status-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>stop-ds</name>
                                            <application>org.opends.server.tools.StopDS</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_stop-ds-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>uninstall</name>
                                            <application>org.opends.guitools.uninstaller.UninstallLauncher</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_exit-codes-0-gt0.adoc</trailingSectionPath>
                                                <trailingSectionPath>_uninstall-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>upgrade</name>
                                            <application>org.opends.server.tools.upgrade.UpgradeCli</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_upgrade-exit-codes.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>

                                        <tool>
                                            <name>verify-index</name>
                                            <application>org.opends.server.tools.VerifyIndex</application>
                                            <trailingSectionPaths>
                                                <trailingSectionPath>_verify-index-exit-codes.adoc</trailingSectionPath>
                                                <trailingSectionPath>_verify-index-examples.adoc</trailingSectionPath>
                                            </trailingSectionPaths>
                                        </tool>
                                    </tools>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctor-maven-plugin</artifactId>
                        <version>2.2.6</version>
                        <executions>
                            <execution>
                                <id>generate-manpage-doc</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>process-asciidoc</goal>
                                </goals>
                                <configuration>
                                    <requires>
                                        <require>${project.basedir}/src/main/resources/asciidoc/extensions/nested-open-block.rb</require>
                                    </requires>
                                    <backend>manpage</backend>
                                    <sourceDirectory>${project.build.directory}/asciidoc/source/man-pages</sourceDirectory>
                                    <outputDirectory>${project.build.directory}/asciidoc/man-pages</outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Format man pages -->
                    <plugin>
                        <groupId>org.openidentityplatform.commons</groupId>
                        <artifactId>doc-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>build-man-pages-asciidoc</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>asciidoc-pre-process</goal>
                                    <goal>antora</goal>
                                    <goal>asciidoc-to-pdf</goal>
                                </goals>
                                <configuration>
                                    <documents>
                                        <document>install-guide</document>
                                        <document>admin-guide</document>
                                        <document>server-dev-guide</document>
                                        <document>reference</document>
                                    </documents>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <projectName>OpenDJ</projectName>
                            <projectVersion>${project.version}</projectVersion>
                            <releaseVersion>${project.version}</releaseVersion>
                        </configuration>
                    </plugin>

                    <!-- Generate Artifacts -->
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <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>

                            <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>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-man-pages</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <target>
                                        <copy todir="${project.build.directory}/asciidoc/source/man-pages">
                                            <fileset dir="${basedir}/src/main/asciidoc/man-pages" includes="**/*" />
                                        </copy>
                                        <copy todir="${project.build.directory}/asciidoc/source/partials">
                                            <fileset dir="${basedir}/src/main/asciidoc/man-pages" includes="**/*" />
                                            <fileset dir="${project.build.directory}/asciidoc/source/man-pages" includes="**/*" />
                                        </copy>
                                        <delete>
                                            <fileset dir="${project.build.directory}/asciidoc/source/man-pages" includes="man-*-subcommands-ref*" />
                                        </delete>
                                    </target>
                                </configuration>
                            </execution>
                            <execution>
                                <id>zip-docs</id>
                                <phase>package</phase>
                                <configuration>
                                    <target>
                                        <property name="compress_formats" value="pdf" />
                                        <property name="project_name" value="${project.name}" />
                                        <ant antfile="${basedir}/src/main/ant/zip.xml">
                                            <target name="docs" />
                                        </ant>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                        <dependencies>
                            <dependency>
                                <groupId>ant-contrib</groupId>
                                <artifactId>ant-contrib</artifactId>
                                <version>${ant.contrib.version}</version>
                                <exclusions>
                                    <exclusion>
                                        <groupId>ant</groupId>
                                        <artifactId>ant</artifactId>
                                    </exclusion>
                                </exclusions>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
