From 81e8dbc2aae0aa7326655c1704a76d0830f6c81f Mon Sep 17 00:00:00 2001
From: jcambon <jcambon@localhost>
Date: Fri, 08 Feb 2008 16:39:49 +0000
Subject: [PATCH] - Issue #2004 (automatically generate HTML configuration guide)   Implementation of the Brian's mock-up   2 Configuration Reference are now generated in build/docgen:   - one without the LDAP mapping   - one with the LDAP mapping - Fix for Issue #2912 ("core" category should be "core server")

---
 opends/build.xml |   44 ++++++++++++++++++++++++++++++++++++--------
 1 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/opends/build.xml b/opends/build.xml
index 2e9e55c..d23fcb8 100644
--- a/opends/build.xml
+++ b/opends/build.xml
@@ -44,6 +44,7 @@
   <property name="javadoc.dir"      location="${build.dir}/javadoc"    />
   <property name="docgen.dir"       location="${build.dir}/docgen"    />
   <property name="configguide.dir"  location="${docgen.dir}/configuration_guide"    />
+  <property name="configguideldap.dir"  location="${docgen.dir}/configuration_guide_with_ldap_mapping"    />
   <property name="resource.dir"     location="resource"                />
   <property name="scripts.dir"      location="${resource.dir}/bin"     />
   <property name="config.dir"       location="${resource.dir}/config"  />
@@ -133,7 +134,8 @@
   <property name="admin.defn.dir"  location="src/admin/defn" />
   <property name="admin.src.dir"   location="src/admin/generated" />
   <property name="admin.rules.dir" location="resource/admin" />
-
+  <property name="configguide.resource.dir" location="resource/admin/config-guide" />
+  
   <!-- Properties for generating messages. -->
   <property name="msg.prop.dir"    location="src/messages/messages" />
   <property name="msg.javagen.dir" location="src/messages/generated" />
@@ -760,13 +762,19 @@
   </target>
 
 
-  <!-- Generate the Configuration guide. -->
-  <target name="docgen" depends="compile,copymessages"
-       description="Generate the Configuration guide (html).">
+  <!-- Generate the Configuration guides. -->
+  <target name="docgen" depends="configguide,configguideldap"
+       description="Generate the Configuration guides (1 standard + 1 with ldap mapping) (html).">
+  </target>  
+  
+  <!-- Generate the Standard Configuration guide. -->
+  <target name="configguide" depends="compile,copymessages"
+       description="Generate the Configuration guide (standard) (html).">
     <mkdir dir="${configguide.dir}" />
-    <!-- copy the stylesheet file -->
-    <copy todir="${configguide.dir}"
-          file="${admin.rules.dir}/opends-config.css" />
+    <!-- copy the resource files -->
+    <copy todir="${configguide.dir}">
+          <fileset file="${configguide.resource.dir}/*" />
+    </copy>
     <java fork="true" classname="org.opends.server.admin.doc.ConfigGuideGeneration" failonerror="true">
       <classpath>
         <fileset dir="${lib.dir}">
@@ -774,7 +782,27 @@
         </fileset>
         <dirset dir="${classes.dir}" />
       </classpath>
-      <arg value="${configguide.dir}"/>
+      <jvmarg value="-DGenerationDir=${configguide.dir}"/>
+    </java>         
+  </target>
+
+  <!-- Generate the Configuration guide with LDAP mapping. -->
+  <target name="configguideldap" depends="compile,copymessages"
+       description="Generate the Configuration guide (with LDAP mapping) (html).">
+    <mkdir dir="${configguideldap.dir}" />
+    <!-- copy the resource files -->
+    <copy todir="${configguideldap.dir}">
+          <fileset file="${configguide.resource.dir}/*" />
+    </copy>
+    <java fork="true" classname="org.opends.server.admin.doc.ConfigGuideGeneration" failonerror="true">
+      <classpath>
+        <fileset dir="${lib.dir}">
+          <include name="*.jar" />
+        </fileset>
+        <dirset dir="${classes.dir}" />
+      </classpath>
+      <jvmarg value="-DGenerationDir=${configguideldap.dir}"/>
+      <jvmarg value="-DLdapMapping"/>
     </java>         
   </target>
 

--
Gitblit v1.10.0