Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Remove SNAPSHOT artifact folders recursively

bash deletesakaiartifact.bash 1.1-SNAPSHOT /tmp/maven2/org/sakaiproject/kernel

No Format
#!/bin/sh
echo "recursively removing
# Delete artifact folders prior to deploying Maven snapshot artifacts.
# This is necessary as Maven does not update it's metadata files correctly when an old artifact exists in the repo.
# bash deletesakaiartifact.bash [TARGET FOLDER NAME] (e.g., 1.1-SNAPSHOT) [LOCATION] (e.g. /tmp/maven2/org/sakaiproject/kernel)
# author=Anthony Whyte, arwhyte@umich.edu

TARGET=$1
LOCATION=$2

cd $LOCATION
echo "Removing ${TARGET} folders and content recursively from ${LOCATION}"
pwd
rm -rf `find . -type d -name 1.1-SNAPSHOT`${TARGET}`

References

Maven Release Plugin
Maven mini-guide

...