Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 5d0660573 -> 1b51c43f5


[TRAFODION-2200] Add Javadoc and Doxygen for UDRs to document build


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/483e1c07
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/483e1c07
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/483e1c07

Branch: refs/heads/master
Commit: 483e1c07f789c67459b481dcfaf5721040b88ff0
Parents: 53e87ac
Author: Hans Zeller <[email protected]>
Authored: Wed Aug 31 16:26:13 2016 +0000
Committer: Hans Zeller <[email protected]>
Committed: Wed Aug 31 16:26:13 2016 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/build_apidocs.sh    | 94 +++++++++++++++++++++++++++
 core/sql/sqludr/doxygen_tmudr.1.6.config |  9 ++-
 docs/spj_guide/pom.xml                   | 24 +++++++
 3 files changed, 125 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/483e1c07/core/sqf/sql/scripts/build_apidocs.sh
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/build_apidocs.sh 
b/core/sqf/sql/scripts/build_apidocs.sh
new file mode 100755
index 0000000..b853040
--- /dev/null
+++ b/core/sqf/sql/scripts/build_apidocs.sh
@@ -0,0 +1,94 @@
+#!/bin/bash
+
+#
+# script to build Javadoc and Doxygen sites
+#
+# Currently this is invoked from the mvn site goals of
+# those documents that have associated apidocs
+#
+
+WHICH_DOC=
+TGT_DIR=
+TGT_SUBDIR=
+
+while [[ $# > 0 ]]
+  do
+    case "$1" in
+      -h )
+            echo ""
+            echo "Usage: $0 [-h] [-o dir] [project ...]"
+            echo ""
+            echo "-o specifies the output/target directory, default is ."
+            echo "projects are sql_javadoc or udr_doxygen for now, default is 
all"
+            exit 1
+            ;;
+
+      -o )
+            shift
+            if [[ $# > 0 ]]; then
+              TGT_DIR=$1
+            else
+              echo "expected directory after -o flag"
+              exit 98
+            fi
+            ;;
+
+      ** )
+            WHICH_DOC="${WHICH_DOC} $1"
+            ;;
+
+    esac
+    shift
+  done
+
+# set default parameters, if needed
+if [[ -z "$TGT_DIR" ]]; then
+  TGT_DIR=.
+fi
+
+if [[ -z "$WHICH_DOC" ]]; then
+  WHICH_DOC="sql_javadoc udr_doxygen"
+fi
+
+# create output dir and get the absolute path name
+mkdir -p $TGT_DIR
+cd $TGT_DIR
+TGT_DIR=$PWD
+
+for d in $WHICH_DOC
+do
+  APIDOC_DIR=
+
+  case $d in
+    sql_javadoc)
+
+         echo "Building Javadocs for SQL project"
+         cd $MY_SQROOT/../sql
+         mvn javadoc:javadoc
+         APIDOC_DIR=target/site/apidocs
+         TGT_SUBDIR="/tmudr_javadoc"
+    ;;
+
+    udr_doxygen)
+
+         echo "Building Doxygen for TMUDF C++ interface"
+         cd $MY_SQROOT/../sql/sqludr
+         doxygen doxygen_tmudr*.config
+         APIDOC_DIR=tmudr_2.0.1/html
+         TGT_SUBDIR="/tmudr_doxygen"
+    ;;
+
+    *)
+    echo "Unrecognized apidoc to build: $d"
+    exit 99
+    ;;
+  esac
+
+  if [[ -n "$TGT_DIR" ]]; then
+    echo "Moving $d apidocs to ${TGT_DIR}${TGT_SUBDIR}"
+    if [[ ! -d ${TGT_DIR}${TGT_SUBDIR} ]]; then
+      mkdir -p ${TGT_DIR}${TGT_SUBDIR}
+    fi
+    mv -f $APIDOC_DIR ${TGT_DIR}${TGT_SUBDIR}
+  fi
+done

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/483e1c07/core/sql/sqludr/doxygen_tmudr.1.6.config
----------------------------------------------------------------------
diff --git a/core/sql/sqludr/doxygen_tmudr.1.6.config 
b/core/sql/sqludr/doxygen_tmudr.1.6.config
index 158b1f6..8ebc083 100644
--- a/core/sql/sqludr/doxygen_tmudr.1.6.config
+++ b/core/sql/sqludr/doxygen_tmudr.1.6.config
@@ -31,14 +31,19 @@ PROJECT_NAME           = tmudr
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER         = 1.3.0
+# NOTE: Also change this in file $MY_SQROOT/sql/scripts/build_apidocs.sh
+# This is the main version number of the TMUDF interface, it does not
+# need to change with every Trafodion release, only when the API changes
+# in a significant way.
+
+PROJECT_NUMBER         = 2.0.1
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.
 # If a relative path is entered, it will be relative to the location
 # where doxygen was started. If left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = tmudr_1.3.0
+OUTPUT_DIRECTORY       = tmudr_2.0.1
 
 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
 # 4096 sub-directories (in 2 levels) under the output directory of each output

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/483e1c07/docs/spj_guide/pom.xml
----------------------------------------------------------------------
diff --git a/docs/spj_guide/pom.xml b/docs/spj_guide/pom.xml
index 51f7177..c6f8580 100644
--- a/docs/spj_guide/pom.xml
+++ b/docs/spj_guide/pom.xml
@@ -264,6 +264,30 @@
           </execution>
         </executions>
       </plugin>
+      <!-- Build Doxygen site for Trafodion TMUDF C++ interface -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.1.1</version>
+        <executions>
+          <execution>
+            <id>build-javadoc</id>
+            <phase>site</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          
<executable>${env.MY_SQROOT}/sql/scripts/build_apidocs.sh</executable>
+          <arguments>
+            <argument>-o</argument>
+            <argument>${basedir}/target/site/apidocs</argument>
+            <argument>sql_javadoc</argument>
+            <argument>udr_doxygen</argument>
+          </arguments>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 

Reply via email to