From 0851f3ebcc88abf7de9679b485078c8a564532d5 Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Tue, 17 Dec 2013 09:21:50 +0000
Subject: [PATCH] CR-2721 Fix for OPENDJ-1253: Test upgrade to latest doc build plugin

---
 opends/pom.xml |   60 +++++++++--------------------
 pom.xml        |   55 +++++++--------------------
 2 files changed, 34 insertions(+), 81 deletions(-)

diff --git a/opends/pom.xml b/opends/pom.xml
index 9df3bd4..c75643b 100644
--- a/opends/pom.xml
+++ b/opends/pom.xml
@@ -107,7 +107,7 @@
     <releaseDate />
     <softwareReleaseDate>${releaseDate}</softwareReleaseDate>
     <checkstyleHeaderLocation>org/forgerock/checkstyle/opendj-java-header</checkstyleHeaderLocation>
-    <frDocPluginVersion>1.2.0</frDocPluginVersion>
+    <frDocPluginVersion>2.0.0-SNAPSHOT</frDocPluginVersion>
 
     <!-- Permit doc build to override relative locations of non DocBook content -->
     <coreDocBase>http://opendj.forgerock.org/doc/</coreDocBase>
@@ -115,9 +115,7 @@
     <serverJavadocBase>http://opendj.forgerock.org/opendj-server/javadoc/</serverJavadocBase>
     <sdkJavadocBase>http://opendj.forgerock.org/opendj-ldap-sdk/apidocs/</sdkJavadocBase>
 
-    <!-- Filtered docbkx sources -->
-    <docbkxSourceDirectory>${basedir}/target/docbkx-filtered</docbkxSourceDirectory>
-    <docbkxOutputDirectory>${basedir}/target/docbkx</docbkxOutputDirectory> <!-- Pending DOCS-93 -->
+    <docbkxSourceDirectory>${basedir}/src/main/docbkx</docbkxSourceDirectory>
     <docbkxBuildDirectory>build</docbkxBuildDirectory>
 
     <!-- END Documentation properties -->
@@ -191,54 +189,27 @@
       </plugin>
 
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>filter-docbkx-resources</id>
-            <phase>pre-site</phase>
-            <goals>
-              <goal>copy-resources</goal>
-            </goals>
-            <inherited>false</inherited>
-            <configuration>
-              <!-- Filter XML to allow ${property} in attribute values. -->
-             <outputDirectory>${docbkxSourceDirectory}</outputDirectory>
-              <resources>
-                <resource>
-                  <directory>src/main/docbkx</directory>
-                  <filtering>true</filtering>
-                  <includes>
-                    <include>**/*.xml</include>
-                  </includes>
-                </resource>
-                <resource>
-                  <directory>src/main/docbkx</directory>
-                  <filtering>false</filtering>
-                  <excludes>
-                    <exclude>**/*.xml</exclude>
-                  </excludes>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
         <groupId>org.forgerock.commons</groupId>
         <artifactId>forgerock-doc-maven-plugin</artifactId>
         <version>${frDocPluginVersion}</version>
         <inherited>false</inherited>
         <configuration>
          <buildDirectory>${docbkxBuildDirectory}</buildDirectory>
-         <docbkxSourceDirectory>${docbkxSourceDirectory}</docbkxSourceDirectory> <!-- Use filtered XML -->
-         <docbkxOutputDirectory>${docbkxOutputDirectory}</docbkxOutputDirectory>
          <projectName>OpenDJ</projectName>
          <googleAnalyticsId>${gaId}</googleAnalyticsId>
         </configuration>
         <executions>
           <execution>
+            <id>filter-sources</id>
+            <phase>pre-site</phase>
+            <goals>
+              <goal>filter</goal>
+            </goals>
+            <configuration>
+              <docbkxSourceDirectory>${docbkxSourceDirectory}</docbkxSourceDirectory>
+            </configuration>
+          </execution>
+          <execution>
             <id>copy-common</id>
             <phase>pre-site</phase>
             <goals>
@@ -246,6 +217,13 @@
             </goals>
           </execution>
           <execution>
+            <id>prepare-sources</id>
+            <phase>pre-site</phase>
+            <goals>
+              <goal>prepare</goal>
+            </goals>
+          </execution>
+          <execution>
             <id>build-doc</id>
             <phase>pre-site</phase>
             <goals>
diff --git a/pom.xml b/pom.xml
index b552cb7..530aa6a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -136,66 +136,34 @@
     <releaseDate />
     <softwareReleaseDate>${releaseDate}</softwareReleaseDate>
     <checkstyleHeaderLocation>org/forgerock/checkstyle/opendj-java-header</checkstyleHeaderLocation>
-    <frDocPluginVersion>1.2.0</frDocPluginVersion>
+    <frDocPluginVersion>2.0.0-SNAPSHOT</frDocPluginVersion>
 
     <!-- Permit doc build to override relative locations of non DocBook content -->
     <coreDocBase>http://opendj.forgerock.org/doc/</coreDocBase>
     <configRefBase>http://opendj.forgerock.org/opendj-server/configref/</configRefBase>
     <serverJavadocBase>http://opendj.forgerock.org/opendj-server/javadoc/</serverJavadocBase>
     <sdkJavadocBase>http://opendj.forgerock.org/opendj-ldap-sdk/apidocs/</sdkJavadocBase>
-
-    <!-- Filtered docbkx sources -->
-    <docbkxSourceDirectory>target/docbkx-filtered</docbkxSourceDirectory>
   </properties>
   <build>
     <plugins>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>filter-docbkx-resources</id>
-            <phase>pre-site</phase>
-            <goals>
-              <goal>copy-resources</goal>
-            </goals>
-            <inherited>false</inherited>
-            <configuration>
-              <!-- Filter XML to allow ${property} in attribute values. -->
-              <outputDirectory>${docbkxSourceDirectory}</outputDirectory>
-              <resources>
-                <resource>
-                  <directory>src/main/docbkx</directory>
-                  <filtering>true</filtering>
-                  <includes>
-                    <include>**/*.xml</include>
-                  </includes>
-                </resource>
-                <resource>
-                  <directory>src/main/docbkx</directory>
-                  <filtering>false</filtering>
-                  <excludes>
-                    <exclude>**/*.xml</exclude>
-                  </excludes>
-                </resource>
-              </resources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
         <groupId>org.forgerock.commons</groupId>
         <artifactId>forgerock-doc-maven-plugin</artifactId>
         <version>${frDocPluginVersion}</version>
         <inherited>false</inherited>
         <configuration>
-         <docbkxSourceDirectory>${docbkxSourceDirectory}</docbkxSourceDirectory> <!-- Use filtered XML -->
          <projectName>OpenDJ</projectName>
          <googleAnalyticsId>${gaId}</googleAnalyticsId>
         </configuration>
         <executions>
           <execution>
+           <id>filter-sources</id>
+           <phase>pre-site</phase>
+           <goals>
+            <goal>filter</goal>
+           </goals>
+          </execution>
+          <execution>
            <id>run-jcite</id>
            <phase>pre-site</phase>
            <configuration>
@@ -215,6 +183,13 @@
             </goals>
           </execution>
           <execution>
+            <id>prepare-sources</id>
+            <phase>pre-site</phase>
+            <goals>
+              <goal>prepare</goal>
+            </goals>
+          </execution>
+          <execution>
             <id>build-doc</id>
             <phase>pre-site</phase>
             <goals>

--
Gitblit v1.10.0