[java-parent-projects COMMIT] /java-parent-project-v3/trunk/bin/upload-nexus-dependencies.sh

noreply at shibboleth.net noreply at shibboleth.net
Sun May 18 16:30:58 EDT 2014


Author: tzeller
Date: Sun May 18 16:30:57 2014
New Revision: 260

URL: http://svn.shibboleth.net/view/java-parent-projects?rev=260&view=rev
Log:
No longer require pom.new.xml containing new dependencies to be added to Nexus.
Added 'site' and '--strict-checksums" to the Maven build command.

Modified:
    java-parent-project-v3/trunk/bin/upload-nexus-dependencies.sh

Modified: java-parent-project-v3/trunk/bin/upload-nexus-dependencies.sh
URL: http://svn.shibboleth.net/view/java-parent-projects/java-parent-project-v3/trunk/bin/upload-nexus-dependencies.sh?rev=260&r1=259&r2=260&view=diff
==============================================================================
--- java-parent-project-v3/trunk/bin/upload-nexus-dependencies.sh (original)
+++ java-parent-project-v3/trunk/bin/upload-nexus-dependencies.sh Sun May 18 16:30:57 2014
@@ -12,8 +12,9 @@
 $ECHO ""
 $ECHO "This script must be executed on the Nexus host to access the thirdparty repository."
 $ECHO ""
-$ECHO "Execute this script in a directory containing two files, pom.xml and pom.new.xml"
-$ECHO "Where pom.new.xml has the dependencies to be added."
+$ECHO "Execute this script in a project directory containing pom.xml".
+$ECHO ""
+$ECHO "If pom.new.xml is present it should contain the new dependencies to be added."
 $ECHO ""
 
 declare -r DIFF=${DIFF:-"/usr/bin/diff"}
@@ -55,16 +56,16 @@
 
 ask n "Delete repository directories from previous attempt" CLEANUP
 if [ $CLEANUP == "y" ] ; then
-    $RM -vrf "repository-old"
+    $RM -rf "repository-old"
     check_retval $? "Unable to delete repository-old"
     
-    $RM -vrf "repository-new"
+    $RM -rf "repository-new"
     check_retval $? "Unable to delete repository-new"
     
-    $RM -vrf "repository-diff"
+    $RM -rf "repository-diff"
     check_retval $? "Unable to delete repository-diff"
     
-    $RM -vrf "repository-test"
+    $RM -rf "repository-test"
     check_retval $? "Unable to delete repository-test"
 fi
 $ECHO ""
@@ -87,33 +88,39 @@
 
 ask y "Build with old pom" BUILD_OLD_POM
 if [ $BUILD_OLD_POM == "y" ] ; then
-    $ECHO "$MVN -Dmaven.repo.local=repository-old clean verify -Prelease -DskipTests"
-    $MVN -Dmaven.repo.local=repository-old clean verify -Prelease -DskipTests
-fi
-$ECHO ""
-
-ask y "Copy repository-old to repository-new" COPY_REPO_OLD_TO_REPO_NEW
-if [ $COPY_REPO_OLD_TO_REPO_NEW == "y" ] ; then
-    $CP -vpr repository-old/* repository-new/
-fi
-$ECHO ""
-
-ask n "Diff repository-old to repository-new" DIFF_REPO_OLD_TO_REPO_NEW
-if [ $DIFF_REPO_OLD_TO_REPO_NEW == "y" ] ; then
-    $DIFF -r repository-old repository-new
-fi
-$ECHO ""
-
-ask y "Build with new pom" BUILD_NEW_POM
-if [ $BUILD_NEW_POM == "y" ] ; then
-    $ECHO "$MVN -Dmaven.repo.local=repository-new verify -Prelease -DskipTests -f pom.new.xml"
-    $MVN -Dmaven.repo.local=repository-new verify -Prelease -DskipTests -f pom.new.xml
+    $ECHO "$MVN --strict-checksums -Dmaven.repo.local=repository-old clean verify site -Prelease -DskipTests"
+    $MVN --strict-checksums -Dmaven.repo.local=repository-old clean verify site -Prelease -DskipTests
+fi
+$ECHO ""
+
+if [ -e pom.new.xml ] ; then
+    ask y "Copy repository-old to repository-new" COPY_REPO_OLD_TO_REPO_NEW
+    if [ $COPY_REPO_OLD_TO_REPO_NEW == "y" ] ; then
+        $CP -pr repository-old/* repository-new/
+    fi
+    $ECHO ""
+
+    ask n "Diff repository-old to repository-new" DIFF_REPO_OLD_TO_REPO_NEW
+    if [ $DIFF_REPO_OLD_TO_REPO_NEW == "y" ] ; then
+        $DIFF -r repository-old repository-new
+    fi
+    $ECHO ""
+
+    ask y "Build with new pom" BUILD_NEW_POM
+    if [ $BUILD_NEW_POM == "y" ] ; then
+        $ECHO "$MVN --strict-checksums -Dmaven.repo.local=repository-new verify site -Prelease -DskipTests -f pom.new.xml"
+        $MVN --strict-checksums -Dmaven.repo.local=repository-new verify site -Prelease -DskipTests -f pom.new.xml
+    fi
 fi
 $ECHO ""
 
 ask y "Create repository-diff" CREATE_REPO_DIFF
 if [ $CREATE_REPO_DIFF == "y" ] ; then
-    $RSYNC -rcmv --include='*.jar' --include='*.pom' -f 'hide,! */' --compare-dest=$NEXUS_HOME/sonatype-work/nexus/storage/thirdparty/ --compare-dest=$PWD/repository-old/ repository-new/ repository-diff/
+    if [ -e pom.new.xml ] ; then
+        $RSYNC -rcmv --include='*.jar' --include='*.pom' --exclude='net/shibboleth' --exclude='org/opensaml' -f 'hide,! */' --compare-dest=$NEXUS_HOME/sonatype-work/nexus/storage/thirdparty/ --compare-dest=$PWD/repository-old/ repository-new/ repository-diff/
+    else
+        $RSYNC -rcmv --include='*.jar' --include='*.pom' --exclude='net/shibboleth' --exclude='org/opensaml' -f 'hide,! */' --compare-dest=$NEXUS_HOME/sonatype-work/nexus/storage/thirdparty/ repository-old/ repository-diff/
+    fi
 fi
 $ECHO ""
 
@@ -162,8 +169,8 @@
     
     ask y "Write files to upload to log file" LOG_UPLOADED_FILES
     if [ $LOG_UPLOADED_FILES == "y" ] ; then
-         $ECHO "$FIND * -name '*.pom' -fprintf "uploaded-to-nexus-$(date +%Y-%m-%d_%H-%M-%S).txt" "%f\n""
-         $FIND * -name '*.pom' -fprintf "uploaded-to-nexus-$(date +%Y-%m-%d_%H-%M-%S).txt" "%f\n"

[... 39 lines stripped ...]


More information about the commits mailing list