You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2014/12/17 18:24:13 UTC

[39/50] [abbrv] incubator-brooklyn git commit: update javadoc datestamp and simplify it, and remove old stuff from help file

update javadoc datestamp and simplify it, and remove old stuff from help file


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

Branch: refs/heads/master
Commit: d3c0469df2d9113a88b3e26e8b10f8ca48e7bc57
Parents: 816f803
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Wed Dec 17 11:05:48 2014 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Wed Dec 17 11:05:48 2014 +0000

----------------------------------------------------------------------
 docs/_build/help.txt                  | 18 +++-----------
 docs/_build/make-javadoc.sh           | 21 +++++++++++++---
 docs/_build/quick-make-few-javadoc.sh | 39 +++---------------------------
 3 files changed, 24 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/d3c0469d/docs/_build/help.txt
----------------------------------------------------------------------
diff --git a/docs/_build/help.txt b/docs/_build/help.txt
index ed52aa2..e855c10 100644
--- a/docs/_build/help.txt
+++ b/docs/_build/help.txt
@@ -1,4 +1,3 @@
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -17,18 +16,7 @@
 # under the License.
 #
 
-OVERVIEW
-========
-
-_scripts/jekyll-debug.sh
-    will launch the docs for viewing at http://localhost:4000/
-
-_scripts/build.sh 
-    will build the site in _site including javadoc for offline browsing
-
-
-Release Process
-===============
+See the README.md in the parent directory,
+or run:
 
-Docs release instructions can be found at:
-http://brooklyncentral.github.io/dev/tips/release.html
+    _build/build.sh help

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/d3c0469d/docs/_build/make-javadoc.sh
----------------------------------------------------------------------
diff --git a/docs/_build/make-javadoc.sh b/docs/_build/make-javadoc.sh
index 4df6462..d0a5bbe 100755
--- a/docs/_build/make-javadoc.sh
+++ b/docs/_build/make-javadoc.sh
@@ -1,5 +1,10 @@
 #!/bin/bash
 
+if [ ! -x make-javadoc.sh ]; then
+  echo This command must be run from the _build directory, not its parent.
+  exit 1
+fi
+
 if [ -z "$GROOVY_CMD" ] ; then
   if [ ! -z "$GROOVY_HOME" ] ; then
     GROOVY_CMD=$GROOVY_HOME/bin/groovysh
@@ -13,11 +18,19 @@ if [ ! -x "$GROOVY_CMD" ] ; then
   exit 1
 fi
 
-export SOURCE_PATHS=`find ../.. -name java | grep "src/main/java$" | grep -v web-console/plugins | grep -v "^../../sandbox"`
+if [ -z "$BROOKLYN_JAVADOC_SOURCE_PATHS" ]; then
+  echo detecting source paths for javadoc
+  export SOURCE_PATHS=`find ../.. -name java | grep "src/main/java$" | grep -v web-console/plugins | grep -v "^../../sandbox"`
+else
+  echo using pre-defined source paths $BROOKLYN_JAVADOC_SOURCE_PATHS
+  export SOURCE_PATHS=$BROOKLYN_JAVADOC_SOURCE_PATHS
+fi
 
 rm -rf target/apidocs/
 
-echo "building javadoc from "$SOURCE_PATHS
+export DATESTAMP=`date "+%Y-%m-%d"`
+echo "building javadoc from $SOURCE_PATH at $DATESTAMP"
+
 
 $GROOVY_CMD -q << END
 sourcePaths = System.env['SOURCE_PATHS'].split('\\\\s+').join(':')
@@ -32,7 +45,7 @@ ant.groovydoc(
     windowtitle  : "\${title}",
     doctitle     : "\${title}",
     header       : "\${title}",
-    footer       : '<b>Apache Brooklyn - Multi-Cloud Application Management Platform</b> <br/> <a href="http://brooklyn.io/" target="_top">brooklyn.io</a>. Apache License. &copy; 2014.',
+    footer       : '<b>Apache Brooklyn - Multi-Cloud Application Management Platform</b> <br/> <a href="http://brooklyn.io/" target="_top">brooklyn.io</a>. Apache License. &copy; '+System.env['DATESTAMP']+'.',
     private      : "false")
 println "\njavadoc built in target/apidocs\n" 
 END
@@ -40,6 +53,8 @@ END
 if (($!)) ; then echo ; echo ; echo "Groovy docs had an error." ; exit 1 ; fi
 echo ; echo
 
+if [ -z 'ls target/apidocs' ]; then echo ; echo ; echo "Error - no content. Are the paths right?" ; exit 1 ; fi
+
 if [ -d ../_site/use/api/ ] ; then
   echo "API directory detected in parent, installing docs there"
   cp -r target/apidocs/* ../_site/use/api/

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/d3c0469d/docs/_build/quick-make-few-javadoc.sh
----------------------------------------------------------------------
diff --git a/docs/_build/quick-make-few-javadoc.sh b/docs/_build/quick-make-few-javadoc.sh
index e7b6ae7..b51e0d1 100755
--- a/docs/_build/quick-make-few-javadoc.sh
+++ b/docs/_build/quick-make-few-javadoc.sh
@@ -1,39 +1,6 @@
 #!/bin/bash
 
-if [ -z "$GROOVY_CMD" ] ; then
-  if [ ! -z "$GROOVY_HOME" ] ; then
-    GROOVY_CMD=$GROOVY_HOME/bin/groovysh
-  else
-    GROOVY_CMD=`which groovysh`
-  fi
-fi
+export BROOKLYN_JAVADOC_SOURCE_PATHS="../../api"
+echo LIMITING build to $BROOKLYN_JAVADOC_SOURCE_PATHS for speed
+./make-javadoc.sh
 
-if [ ! -x "$GROOVY_CMD" ] ; then
-  echo groovy executable must be available on the path or in \$GROOVY_HOME/bin
-  exit 1
-fi
-
-rm -rf target/apidocs/
-
-echo "building javadoc for api package (run quickly, generate just a bit of sample output, to test styles or other things)"
-
-$GROOVY_CMD -q << END
-sourcePaths = "../../api"
-title = "Brooklyn"
-ant = new AntBuilder()
-ant.taskdef(name: "groovydoc", classname: "org.codehaus.groovy.ant.Groovydoc")
-ant.groovydoc(
-    destdir      : "target/apidocs/",
-    sourcepath   : "\${sourcePaths}",
-    packagenames : "**.*",
-    use          : "true",
-    windowtitle  : "\${title}",
-    doctitle     : "\${title}",
-    header       : "\${title}",
-    footer       : '<b>Brooklyn Multi-Cloud Application Management Platform</b> <br/> <a href="http://brooklyncentral.github.com/" target="_top">brooklyncentral.github.com</a>. Apache License. &copy; 2012.',
-    private      : "false")
-println "\njavadoc built in target/apidocs\n" 
-END
-
-if (($!)) ; then echo ; echo ; echo "Groovy docs had an error." ; exit 1 ; fi
-echo ; echo