<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2010 eXo Platform SAS.

    This is free software; you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as
    published by the Free Software Foundation; either version 2.1 of
    the License, or (at your option) any later version.

    This software is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this software; if not, write to the Free
    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
    02110-1301 USA, or see the FSF site: http://www.fsf.org.

-->
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.exoplatform.platform</groupId>
    <artifactId>exo.platform.doc.user</artifactId>
    <version>3.5.5</version>
  </parent>

  <artifactId>exo.platform.doc.user.platform</artifactId>
  <packaging>pom</packaging>
  <name>eXo Platform - User Guide</name>

  <profiles>
    <profile>
      <id>distrib</id>
      <properties>
        <wikbook.source>${project.build.directory}/wikbook-src</wikbook.source>
        <docbook.source>${project.build.directory}/docbook-src</docbook.source>
      </properties>

      <dependencies>
        <dependency>
          <groupId>org.exoplatform.doc</groupId>
          <artifactId>doc-style</artifactId>
          <version>${doc-style.version}</version>
          <type>jar</type>
        </dependency>
      </dependencies>

      <build>
        <plugins>
          <!--
          1) Download the user guides of all products
          -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>${maven-dependency-plugin.version}</version>
            <executions>
              <execution>
                <id>a-unpack</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>unpack</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <!-- eXo Doc Style -->
                    <artifactItem>
                      <groupId>org.exoplatform.doc</groupId>
                      <artifactId>doc-style</artifactId>
                      <version>${doc-style.version}</version>
                      <outputDirectory>${docbook.source}</outputDirectory>
                      <includes>**</includes>
                      <excludes>META-INF/**</excludes>
                    </artifactItem>
                    <!-- GateIn -->
                    <artifactItem>
                      <groupId>org.gatein.doc</groupId>
                      <artifactId>gatein-user-guide-en</artifactId>
                      <version>${org.exoplatform.portal.version}</version>
                      <classifier>sources</classifier>
                      <type>zip</type>
                      <outputDirectory>${docbook.source}</outputDirectory>
                      <includes>**</includes>
                    </artifactItem>
                    <!-- WebOS -->
                    <artifactItem>
                      <groupId>org.exoplatform.webos</groupId>
                      <artifactId>webos-doc-user-guide</artifactId>
                      <version>${org.exoplatform.webos.version}</version>
                      <classifier>sources</classifier>
                      <outputDirectory>${wikbook.source}/webos/</outputDirectory>
                      <includes>**</includes>
                    </artifactItem>
                    <!-- Content -->
                    <artifactItem>
                      <groupId>org.exoplatform.ecms</groupId>
                      <artifactId>exo-ecms-docs-userguide</artifactId>
                      <version>${org.exoplatform.ecms.version}</version>
                      <classifier>sources</classifier>
                      <outputDirectory>${docbook.source}/ecms/</outputDirectory>
                      <includes>**</includes>
                    </artifactItem>
                    <!-- Collaboration -->
                    <artifactItem>
                      <groupId>org.exoplatform.platform</groupId>
                      <artifactId>exo.platform.doc.user.collaboration</artifactId>
                      <version>${project.version}</version>
                      <classifier>sources</classifier>
                      <outputDirectory>${wikbook.source}/collaboration</outputDirectory>
                      <includes>**</includes>
                    </artifactItem>
                    <!-- Knowledge -->
                    <artifactItem>
                      <groupId>org.exoplatform.platform</groupId>
                      <artifactId>exo.platform.doc.user.knowledge</artifactId>
                      <version>${project.version}</version>
                      <classifier>sources</classifier>
                      <outputDirectory>${wikbook.source}/knowledge/</outputDirectory>
                      <includes>**</includes>
                    </artifactItem>
                    <!-- Social -->
                    <artifactItem>
                      <groupId>org.exoplatform.platform</groupId>
                      <artifactId>exo.platform.doc.user.social</artifactId>
                      <version>${project.version}</version>
                      <classifier>sources</classifier>
                      <outputDirectory>${wikbook.source}/social/</outputDirectory>
                      <includes>**</includes>
                    </artifactItem>
                  </artifactItems>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!--
          2) Copy the resources, Wikbook and Docbook sources to target
          -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>${maven-resources-plugin.version}</version>
            <executions>
              <execution>
                <id>b-copy-resources</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${project.build.directory}/</outputDirectory>
                  <resources>
                    <resource>
                      <directory>src/main/resources</directory>
                      <excludes>
                        <exclude>docbook-src/css/**</exclude>
                        <exclude>docbook-src/xsl/**</exclude>
                      </excludes>
                    </resource>
                  </resources>
                </configuration>
              </execution>
              <execution>
                <id>c-copy-images</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>${docbook.source}/images</outputDirectory>
                  <resources>
                    <resource>
                      <directory>${project.build.directory}/images</directory>
                    </resource>
                    <resource>
                      <directory>${wikbook.source}/webos/images</directory>
                    </resource>
                    <resource>
                      <directory>${docbook.source}/gatein/images</directory>
                    </resource>
                    <resource>
                      <directory>${docbook.source}/ecms/images</directory>
                    </resource>
                    <resource>
                      <directory>${wikbook.source}/collaboration/images</directory>
                    </resource>
                    <resource>
                      <directory>${wikbook.source}/knowledge/images</directory>
                    </resource>
                    <resource>
                      <directory>${wikbook.source}/social/images</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <!--
          3) The Wikbook Maven plugin generates the Docbook document from the Wikbook source
          -->
          <plugin>
            <groupId>org.wikbook</groupId>
            <artifactId>wikbook.maven</artifactId>
            <version>${version.wikbook.plugin}</version>
            <executions>
              <execution>
                <id>e-generate-docbook</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>transform</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <bookId>UserGuide</bookId>
              <sourceDirectory>${wikbook.source}</sourceDirectory>
              <sourceFileName>book.wiki</sourceFileName>
              <destinationDirectory>${docbook.source}</destinationDirectory>
              <destinationFileName>index.xml</destinationFileName>
              <beforeBookBodyXML><![CDATA[
                 <xi:include href="bookinfo.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />                 
           ]]></beforeBookBodyXML>
              <syntaxId>confluence/1.0</syntaxId>
            </configuration>
          </plugin>

          <!--
          4) Include GateIn and eXo Content Docbook files
          -->
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>f-include-ecms</id>
                <phase>generate-sources</phase>
                <configuration>
                  <target>
                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[<title>Retrieve account and password</title>]]></replacetoken>
                      <replacevalue><![CDATA[<title>Retrieve account and password</title>
<xi:include href="gatein/modules/account/Account_and_Password_Retrieval.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>
                    </replace>
                    <!-- Gatein Userguide/Manage account replace files-->
                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[<title>Manage accounts</title>]]></replacetoken>
                      <replacevalue><![CDATA[<title>Manage accounts</title>
<xi:include href="gatein/modules/account/Introduction_Account.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="gatein/modules/account/Register_New_Accounts.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="gatein/modules/account/Sign_in_and_Sign_out.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="gatein/modules/account/Change_Account_Settings.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="gatein/modules/account/Account_and_Password_Retrieval.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>
                    </replace>
                    <!-- Gatein Userguide/Manage account/ replace IDs -->
                    <replace file="${docbook.source}/gatein/modules/account/Register_New_Accounts.xml">
                      <replacetoken><![CDATA[<section id="sect-User_Guide-Register_New_Accounts">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Get_started.Account.Register_new_account">]]></replacevalue>
                    </replace>
                    <replace file="${docbook.source}/gatein/modules/account/Sign_in_and_Sign_out.xml">
                      <replacetoken><![CDATA[<section id="sect-User_Guide-Sign_In_and_Sign_Out">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Get_started.Account.Sign_in_and_sign_out">]]></replacevalue>
                    </replace>
                    <replace file="${docbook.source}/gatein/modules/account/Change_Account_Settings.xml">
                      <replacetoken><![CDATA[<section id="sect-User_Guide-Change_Account_Settings">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Get_started.Account.Change_Account_Settings">]]></replacevalue>
                    </replace>
                    <replace file="${docbook.source}/gatein/modules/account/Account_and_Password_Retrieval.xml">
                      <replacetoken>
                        <![CDATA[<section id="sect-User_Guide-Account_and_Password_Retrieval">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Get_started.Account.Retreive_Account_and_Password">]]></replacevalue>
                    </replace>
                    <!-- Gatein Userguide/Manage Organization replace files & IDs-->
                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[<section id="Platform_User_Guide.Manage_Organization.Add_user">
      <title>Add a user</title>
    </section>]]></replacetoken>
                      <replacevalue><![CDATA[<xi:include href="gatein/modules/portal/Add_user.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/gatein/modules/portal/Add_user.xml">
                      <replacetoken><![CDATA[<section id="sect-User_Guide-User_Management-Add_a_user">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Manage_Organization.Add_user">]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[<section id="Platform_User_Guide.Manage_Organization.Manage_users">
      <title>Manage users</title>
    </section>]]></replacetoken>
                      <replacevalue><![CDATA[<xi:include href="gatein/modules/portal/Manage_users.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/gatein/modules/portal/Manage_users.xml">
                      <replacetoken>
                        <![CDATA[<section id="sect-User_Guide-User_Management-Manage_users">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Manage_Organization.Manage_users">]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[<section id="Platform_User_Guide.Manage_Organization.Manage_groups">
      <title>Manage groups</title>
    </section>]]></replacetoken>
                      <replacevalue><![CDATA[<xi:include href="gatein/modules/portal/Manage_groups.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/gatein/modules/portal/Manage_groups.xml">
                      <replacetoken>
                        <![CDATA[<section id="sect-User_Guide-User_Management-Manage_groups">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Manage_Organization.Manage_groups">]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[<section id="Platform_User_Guide.Manage_Organization.Manage_memberships">
      <title>Manage memberships</title>
    </section>]]></replacetoken>
                      <replacevalue><![CDATA[<xi:include href="gatein/modules/portal/Manage_memberships.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/gatein/modules/portal/Manage_memberships.xml">
                      <replacetoken>
                        <![CDATA[<section id="sect-User_Guide-User_Management-Manage_memberships">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Manage_Organization.Manage_memberships">]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[<section id="Platform_User_Guide.Manage_Your_Portals.Manage_Permission">
      <title>Manage permissions</title>
    </section>]]></replacetoken>
                      <replacevalue><![CDATA[<xi:include href="gatein/modules/portal/Manage_Permission.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/gatein/modules/portal/Manage_Permission.xml">
                      <replacetoken><![CDATA[<section id="sect-User_Guide-Manage_Permissions">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Manage_Your_Portals.Manage_Permission">]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[<section id="Platform_User_Guide.Manage_Your_Portals.Manage_sites">
      <title>Manage sites</title>
    </section>]]></replacetoken>
                      <replacevalue><![CDATA[<xi:include href="gatein/modules/portal/Manage_Portals.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/gatein/modules/portal/Manage_Portals.xml">
                      <replacetoken><![CDATA[<section id="sect-User_Guide-Manage_Portals">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Manage_Your_Portals.Manage_sites">]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[<section id="Platform_User_Guide.Manage_Your_Portals.Manage_Navigation_Nodes">
      <title>Manage navigation nodes</title>
    </section>]]></replacetoken>
                      <replacevalue><![CDATA[<xi:include href="gatein/modules/portal/Manage_Navigation_Nodes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/gatein/modules/portal/Manage_Navigation_Nodes.xml">
                      <replacetoken><![CDATA[<section id="sect-User_Guide-Manage_Navigation_Nodes">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Manage_Your_Portals.Manage_Navigation_Nodes">]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[<section id="Platform_User_Guide.Manage_Your_Portals.Manage_Pages">
      <title>Manage pages</title>
    </section>]]></replacetoken>
                      <replacevalue><![CDATA[<xi:include href="gatein/modules/portal/Manage_Pages.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/gatein/modules/portal/Manage_Pages.xml">
                      <replacetoken><![CDATA[<section id="sect-User_Guide-Manage_Pages">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Manage_Your_Portals.Manage_Pages">]]></replacevalue>
                    </replace>
                    <!-- Include Manage Applications chapter | GateIn userguide -->
                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[<title>Manage applications</title>]]></replacetoken>
                      <replacevalue><![CDATA[<title>Manage applications</title>
<xi:include href="gatein/modules/gadgetsAdmin/Introduction_Manage_applications.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>

		  </replace>
		  
       <replace file="${docbook.source}/index.xml">
	   
       <replacetoken><![CDATA[<title>Inside a portal</title>]]></replacetoken>
				  <replacevalue><![CDATA[<title>Inside a portal</title>
<xi:include href="gatein/modules/GadgetsAdmin.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="gatein/modules/portletsUser/Dashboard_Portlet.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />]]></replacevalue>
                    </replace>

                <replace file="${docbook.source}/gatein/modules/GadgetsAdmin.xml">
                  <replacetoken><![CDATA[<chapter id="chap-User_Guide-Gadgets_Administration">]]></replacetoken>
                  <replacevalue><![CDATA[<section id="chap-UserGuide-Gadgets_Administration">]]></replacevalue>
                </replace>

                <replace file="${docbook.source}/gatein/modules/GadgetsAdmin.xml">
                  <replacetoken><![CDATA[</chapter>]]></replacetoken>
                  <replacevalue><![CDATA[</section>]]></replacevalue>
                </replace>


 <replace file="${docbook.source}/index.xml">
   <replacetoken><![CDATA[<section id="Platform_User_Guide.Organize_Content.Structure_Content">
      <title>Structure content</title>
    </section>]]></replacetoken>
                      <replacevalue><![CDATA[<xi:include href="ecms/modules/Basics/SitesExplorer/Structure_content.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/ecms/modules/Basics/SitesExplorer/Structure_content.xml">
                      <replacetoken><![CDATA[<section id="sect-User_Guide-Structure_content">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Organize_Content.Structure_Content">]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[<title>Manage content</title>]]></replacetoken>
                      <replacevalue><![CDATA[<title>Manage content</title>
<xi:include href="ecms/modules/Basics/Introdution_Manage_content.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />				  
<xi:include href="ecms/modules/Basics/Contribute_Content.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ecms/modules/Basics/Content_By_Query.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ecms/modules/Basics/Content_Inside_Categories.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ecms/modules/Basics/SitesExplorer/Manage_Content.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ecms/modules/Basics/Webdav.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ecms/modules/Basics/FastContentCreator.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ecms/modules/Basics/FormGenerator.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ecms/modules/Basics/CLV_template.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ecms/modules/Basics/Categories.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ecms/modules/Basics/SEO_management.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ecms/modules/Basics/SearchPorlet.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ecms/modules/Basics/Print.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[<section id="Platform_User_Guide.Organize_Content.Newsletter">
      <title>Manage newsletters</title>
    </section>]]></replacetoken>
                      <replacevalue><![CDATA[<xi:include href="ecms/modules/Basics/Newsletters.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
]]></replacevalue>
                    </replace>

                    <replace file="${docbook.source}/ecms/modules/Basics/Newsletters.xml">
                      <replacetoken><![CDATA[<section id="sect-User_Guide-Newsletters">]]></replacetoken>
                      <replacevalue>
                        <![CDATA[<section id="Platform_User_Guide.Organize_Content.Newsletter">]]></replacevalue>
                    </replace>
                    <replace file="${docbook.source}/index.xml">
                      <replacetoken><![CDATA[RoleNotInToc"]]></replacetoken>
                      <replacevalue><![CDATA[" role="NotInToc"]]></replacevalue>
                    </replace>
                  </target>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!--
          5) Process all the XML files to generate HTML and PDF formats
          -->

          <plugin>
            <groupId>org.jboss.maven.plugins</groupId>
            <artifactId>maven-jdocbook-plugin</artifactId>
            <version>${maven-jdocbook-plugin.version}</version>
            <extensions>true</extensions>
            <dependencies>
              <dependency>
                <groupId>org.exoplatform.doc</groupId>
                <artifactId>exo-docbook-xslt</artifactId>
                <version>1</version>
              </dependency>
            </dependencies>
            <executions>
              <execution>
                <id>g-jdocbook-resources</id>
                <phase>process-resources</phase>
                <goals>
                  <goal>resources</goal>
                </goals>
              </execution>
              <execution>
                <id>h-generate-docs</id>
                <goals>
                  <goal>generate</goal>
                </goals>
                <phase>compile</phase>
              </execution>
            </executions>
            <configuration>
              <sourceDirectory>${docbook.source}</sourceDirectory>
              <sourceDocumentName>index.xml</sourceDocumentName>
              <imageResource>
                <directory>${docbook.source}</directory>
                <includes>
                  <include>images/**</include>
                  <include>background/**</include>
                </includes>
              </imageResource>
              <cssResource>
                <directory>${docbook.source}</directory>
                <includes>
                  <include>css/**</include>
                </includes>
              </cssResource>
              <formats>
                <format>
                  <formatName>pdf</formatName>
                  <stylesheetResource>file:${docbook.source}/xsl/pdf.xsl</stylesheetResource>
                  <finalName>index.pdf</finalName>
                </format>
                <format>
                  <formatName>html</formatName>
                  <stylesheetResource>file:${docbook.source}/xsl/xhtml.xsl</stylesheetResource>
                  <finalName>index.html</finalName>
                </format>
              </formats>
              <options>
                <xincludeSupported>true</xincludeSupported>
                <xmlTransformerType>saxon</xmlTransformerType>
                <docbookVersion>1.76.1</docbookVersion>
              </options>
            </configuration>
          </plugin>

          <!-- 7) Assemble and attach the final artifacts (HTML, Docbook, PDF) -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
                <configuration>
                  <descriptors>
                    <descriptor>src/main/assembly/html.xml</descriptor>
                    <descriptor>src/main/assembly/docbook.xml</descriptor>
                  </descriptors>
                  <appendAssemblyId>true</appendAssemblyId>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>${helper-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-artifacts</id>
                <phase>package</phase>
                <goals>
                  <goal>attach-artifact</goal>
                </goals>
                <configuration>
                  <artifacts>
                    <artifact>
                      <file>target/docbook/publish/en-US/pdf/index.pdf</file>
                      <type>pdf</type>
                    </artifact>
                  </artifacts>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
