Thomas Vachuska | 4533149 | 2014-10-31 11:08:11 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
Thomas Vachuska | 683b31b | 2015-01-26 11:54:31 -0800 | [diff] [blame^] | 3 | # Builds the ONOS Java API docs. |
Thomas Vachuska | 4533149 | 2014-10-31 11:08:11 -0700 | [diff] [blame] | 4 | # ----------------------------------------------------------------------------- |
| 5 | |
| 6 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
| 7 | . $ONOS_ROOT/tools/build/envDefaults |
| 8 | |
| 9 | apidocs=onos-apidocs-${ONOS_VERSION%~*} |
| 10 | |
| 11 | set -e -x |
| 12 | rm -fr $ONOS_ROOT/docs/target |
| 13 | |
| 14 | cd $ONOS_ROOT/docs |
| 15 | mvn -f external.xml javadoc:aggregate |
| 16 | cd target && mv site/apidocs $apidocs |
| 17 | tar zcf $apidocs.tar.gz $apidocs && cp $apidocs.tar.gz /tmp |
| 18 | |
| 19 | cd $ONOS_ROOT/docs |
| 20 | mvn -f pom.xml javadoc:aggregate |