addressbook-core addressbook-lib addressbook-mailer-ejb addressbook-mailer-lib addressbook-ejb addressbook-war addressbook addressbook-uml"
# Company-specific projects
-COMPANY_APPS="jjobboards-core jjobboards-lib jjobboards-mailer-ejb jjobboards-mailer-lib jjobboards-ejb jjobboards-war jjobboards"
+COMPANY_PROJECTS="jjobboards-core jjobboards-lib jjobboards-mailer-ejb jjobboards-mailer-lib jjobboards-ejb jjobboards-war jjobboards"
# Broken (needs fixing)
BROKEN="addressbook-swing jfinancials-swing jjobboards-swing pizzaservice-war pizzaservice"
# Compile list
-ALL_PROJECTS="${THIS} ${LIBRARIES} ${APPLICATIONS} ${COMPANY_APPS} ${BROKEN}"
+ALL_PROJECTS="${THIS} ${LIBRARIES} ${APPLICATIONS} ${COMPANY_PROJECTS} ${BROKEN}"
# Own home directory
declare -r JPROJECTS_HOME="${PWD}"
--- /dev/null
+#!/bin/bash
+
+. ./.jprojects.sh || exit 255
+
+UPLOAD_SERVER="git.mxchange.org"
+UPLOAD_BASE_PATH="/var/www/virtual/mxchange.org/docs/htdocs/javadoc"
+
+for project in ${LIST}; do
+ if [ "${project}" = "jprojects-scripts" ]
+ then
+ echo "$0: Skipping jprojects-scripts ..."
+ continue
+ elif [ ! -d "${JPROJECTS_HOME}/${project}" ]
+ then
+ echo "$0: Project '${project}' does not exist."
+ continue
+ elif [ ! -d "${JPROJECTS_HOME}/${project}/dist" ]
+ then
+ echo "$0: Project '${project}' is not generated yet."
+ continue
+ fi
+
+ cd "${JPROJECTS_HOME}/${project}" || exit 255
+
+ HAS_FILE=$(find src/ -type f)
+
+ if [ -z "${HAS_FILE}" ]
+ then
+ echo "$0: Project '${project}' has no files, skipping ..."
+ continue
+ fi
+
+ echo "$0: Cleaning up Javadoc for '${project}' ..."
+ rm -rf dist/javadoc/
+
+ echo "$0: Generating documentation for '${project}' ..."
+ ant javadoc > dist/javadoc.log || exit 255
+
+ IS_COMPANY_PROJECT=$(echo "${COMPANY_PROJECTS}" | grep "${project}")
+ if [ -n "${IS_COMPANY_PROJECT}" -a -z "$1" ]
+ then
+ echo "$0: Not uploading company project='${project}'"
+ continue
+ fi
+
+ echo "$0: Generating 'javadoc/${project}' on remote server ..."
+ ssh "${UPLOAD_SERVER}" "mkdir -v \"${UPLOAD_BASE_PATH}/${project}\""
+
+ echo "$0: Cleaning 'javadoc/${project}' on remote server ..."
+ ssh "${UPLOAD_SERVER}" "rm -rf \"${UPLOAD_BASE_PATH}/${project}\"/*" || exit 255
+
+ echo "$0: Uploading Javadoc for '${project}' ..."
+ scp -r dist/javadoc/* "${UPLOAD_SERVER}:${UPLOAD_BASE_PATH}/${project}" || exit 255
+
+ echo "$0: Cleaning local documentation for '${project}' ..."
+ rm -rf dist/javadoc/
+done
+
+echo "$0: All done."
+exit 0