I get errors (cp org.scala-ide.worksheet/target/site does not exist) when trying to build a release with caching off. Looks like the issue might be
function publishPlugin () {
info "uploading $1"
cd "${TMP_DIR}"
rm -rf *
P2_ID_VAR_NAME=$3_P2_ID
cp -r "$(getCacheLocation ${!P2_ID_VAR_NAME})" site