[java-parent-project] branch main updated: Script to build, deploy, and unpack javadoc.

Scott Cantor cantor.2 at osu.edu
Thu Jan 25 15:27:59 UTC 2024


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-parent-project.

View the commit online:
http://git.shibboleth.net/view/?p=java-parent-project.git;a=commit;h=7fa7190187735f5d26c9d48466fac3cd06e4dbe5

The following commit(s) were added to refs/heads/main by this push:
     new 7fa7190  Script to build, deploy, and unpack javadoc.
7fa7190 is described below

commit 7fa7190187735f5d26c9d48466fac3cd06e4dbe5
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Jan 25 10:27:44 2024 -0500

    Script to build, deploy, and unpack javadoc.
---
 resources/maven/build-and-deploy-javadoc.sh | 62 +++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/resources/maven/build-and-deploy-javadoc.sh b/resources/maven/build-and-deploy-javadoc.sh
new file mode 100755
index 0000000..6cf7aca
--- /dev/null
+++ b/resources/maven/build-and-deploy-javadoc.sh
@@ -0,0 +1,62 @@
+#!/usr/bin/env bash
+
+function ask_yes_or_no() {
+    read -p "$1 ([y]es or [N]o): "
+    case $(echo $REPLY | tr '[A-Z]' '[a-z]') in
+        y|yes) echo "yes" ;;
+        *)     echo "no" ;;
+    esac
+}
+
+NEXUS="http://127.0.0.1:1581/nexus/content/repositories/releases"
+
+if [ ! -v MAVEN ] ; then
+        echo "MAVEN not defined."
+        exit -1
+fi
+
+if [ ! -v REPO ] ; then
+        echo "REPO not defined."
+        exit -1
+fi
+
+if [ ! -f pom.xml ] ; then
+        echo "No pom.xml found in CWD."
+        exit -1
+fi
+
+PROJ=`$MAVEN -Dmaven.repo.local=$REPO help:evaluate -Dexpression=shibboleth.projectName -q -DforceStdout`
+GROUP=`$MAVEN -Dmaven.repo.local=$REPO help:evaluate -Dexpression=project.groupId -q -DforceStdout`
+ARTIFACT=`$MAVEN -Dmaven.repo.local=$REPO help:evaluate -Dexpression=project.artifactId -q -DforceStdout`
+VER=`$MAVEN -Dmaven.repo.local=$REPO help:evaluate -Dexpression=project.version -q -DforceStdout`
+
+echo "Project: $PROJ, Group: $GROUP, Artifact: $ARTIFACT, Version: $VER"
+
+if [ "no" == $(ask_yes_or_no "Build javadoc aggregate?") ] ; then
+    echo "Aborting."
+    exit 0
+fi
+
+$MAVEN -Dmaven.repo.local=$REPO -DskipTests clean javadoc:aggregate-jar
+
+if [ ! -f target/$ARTIFACT-$VER-javadoc.jar ] ; then
+	echo "Missing target/$ARTIFACT-$VER-javadoc.jar"
+	exit -1
+fi
+
+if [ "no" == $(ask_yes_or_no "Upload javadoc aggregate to Nexus?") ] ; then
+    echo "Aborting."
+    exit 0
+fi
+
+$MAVEN -Dmaven.repo.local=$REPO -DskipTests gpg:sign-and-deploy-file -Durl=$NEXUS -DrepositoryId=release \
+	-Dfile=target/$ARTIFACT-$VER-javadoc.jar -DgroupId=$GROUP -DartifactId=$ARTIFACT -Dversion=$VER \
+	-DgeneratePom=false -Dpackaging=jar -Dclassifier=javadoc
+
+if [ "no" == $(ask_yes_or_no "Unpack aggregate on server?") ] ; then
+    echo "Aborting."
+    exit 0
+fi
+
+ssh shibboleth.net curl -s "http://127.0.0.1/cgi-bin/deploy-release-javadoc.cgi/$GROUP/$ARTIFACT?project=$PROJ"
+

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list