From a59d555c109784d5f0939bceb1b6f4bc47b4c11b Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Mon, 16 May 2011 15:33:05 +0000
Subject: [PATCH] Adding machinery for building http://opendj.forgerock.org/ (Note: the French localization still needs to be done. Adding the Maven sample files as a placeholder.

---
 opendj-sdk/opendj3/opendj-docs/pom.xml |   58 +++++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 45 insertions(+), 13 deletions(-)

diff --git a/opendj-sdk/opendj3/opendj-docs/pom.xml b/opendj-sdk/opendj3/opendj-docs/pom.xml
index 34ec793..30cb7a0 100644
--- a/opendj-sdk/opendj3/opendj-docs/pom.xml
+++ b/opendj-sdk/opendj3/opendj-docs/pom.xml
@@ -31,20 +31,11 @@
  <name>OpenDJ Core User Documentation</name>
  <packaging>pom</packaging>
  <description>DocBook XML source for OpenDJ core user documentation. Java API and configuration reference documentation is generated from OpenDJ source code.</description>
- <repositories>
-  <repository>
-   <id>forgerock-snapshots-repository</id>
-   <name>ForgeRock Snapshot Repository</name>
-   <url>http://maven.forgerock.org/repo/snapshots</url>
-   <releases>
-    <enabled>false</enabled>
-   </releases>
-  </repository>
- </repositories>
  <properties>
   <docbkx-src>${basedir}/src/docbkx</docbkx-src>
   <dbstyle-dir>${basedir}/src/docbkx-stylesheets</dbstyle-dir>
   <docbkx-out>${basedir}/target/docbkx</docbkx-out>
+  <site-out>${project.parent.basedir}/target/site</site-out>
  </properties>
  <build>
   <plugins>
@@ -146,23 +137,64 @@
     <executions>
      <execution>
       <id>fix-legalnotice</id>
-      <phase>post-site</phase>
+      <phase>site</phase>
       <goals>
        <goal>run</goal>
       </goals>
       <configuration>
+       <detail>true</detail>
        <target>
         <!-- TODO: Figure out how to say foreach in ant. -->
-        <!-- How do I say pwd in ant or in Maven? -->
         <copy file='${env.PWD}/legalnotice.html' todir='${basedir}/target/docbkx/html/admin-guide' />
         <copy file='${env.PWD}/legalnotice.html' todir='${basedir}/target/docbkx/html/dev-guide' />
         <copy file='${env.PWD}/legalnotice.html' todir='${basedir}/target/docbkx/html/install-guide' />
-        <move file='${env.PWD}/legalnotice.html' todir='${basedir}/target/docbkx/html/release-notes' />
+        <move file='${env.PWD}/legalnotice.html' todir='${basedir}/target/docbkx/html/release-notes' />       
        </target>
       </configuration>
      </execution>
     </executions>
    </plugin>
+   <plugin>
+    <groupId>org.apache.maven.plugins</groupId>
+    <artifactId>maven-resources-plugin</artifactId>
+    <executions>
+     <execution>
+      <phase>site</phase>
+      <goals>
+       <goal>copy-resources</goal>
+      </goals>
+      <configuration>
+       <outputDirectory>${site-out}/doc</outputDirectory>
+       <resources>
+        <resource>
+         <directory>${docbkx-out}/epub/admin-guide</directory>
+         <directory>${docbkx-out}/epub/dev-guide</directory>
+         <directory>${docbkx-out}/epub/install-guide</directory>
+         <directory>${docbkx-out}/epub/release-notes</directory>
+         <includes>
+          <include>**/*.epub</include>
+         </includes>
+        </resource>
+        <resource>
+         <directory>${docbkx-out}/html/</directory>
+        </resource>
+        <resource>
+         <directory>${docbkx-out}/pdf</directory>
+         <includes>
+          <include>**/*.pdf</include>
+         </includes>
+        </resource>
+        <resource>
+         <directory>${docbkx-out}/rtf</directory>
+         <includes>
+          <include>**/*.rtf</include>
+         </includes>
+        </resource>
+       </resources>
+      </configuration>      
+     </execution>
+    </executions>
+   </plugin>
   </plugins>
  </build>
  <parent>

--
Gitblit v1.10.0