maven/sandbox/repoclean/install.sh
John Dennis Casey 80880d071e o Fixed a configuration issue for the DefaultRepositoryLayout in components.xml...it needed a requirement on the ArtifactHandlerManager.
o Fixed a formatting issue for the layout in DefaultRepositoryLayout relating to groupId's.
o Revamped the repoclean tool to use an Artifact-centric approach to converting, cleaning, and reporting on repositories.
o Added the ability for repoclean to report on the health of an existing v3 or v4 repository, using a DefaultArtifactDiscoverer (Default* being the prefix given to the new repo layout going forward) and a V4PomRewriter implementation.
o Tested repoclean by converting my local m1 repository to a m2 repository.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163669 13f79535-47bb-0310-9956-ffa450edef68
2005-03-23 04:53:30 +00:00

67 lines
2.1 KiB
Bash

#!/bin/sh
if [ $# == 0 ]; then
echo ""
echo "*******************"
echo "* Usage: 'sh ./install.sh /path/to/install/target /path/to/local/repo'"
echo "*******************"
echo ""
exit 0
fi
(
# First, ensure that the repoclean library has been built.
echo "-----------------------------------------------------------------------"
echo " Building a clean copy of repoclean ... "
echo "-----------------------------------------------------------------------"
m2 clean:clean package
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
(
# Now, install the bash script and dependencies to the specified target dir.
echo ""
echo "-----------------------------------------------------------------------"
echo " Installing repoclean to ${1} ... "
echo "-----------------------------------------------------------------------"
echo ""
mkdir -p $1/lib
echo "Copying application libraries..."
echo ""
cp -f target/repoclean-1.0-SNAPSHOT.jar $1/lib
cp -f $2/plexus/jars/plexus-container-default-1.0-alpha-2-SNAPSHOT.jar $1/lib
cp -f $2/plexus/jars/plexus-utils-1.0-alpha-2-SNAPSHOT.jar $1/lib
cp -f $2/classworlds/jars/classworlds-1.1-alpha-1.jar $1/lib
cp -f $2/maven/jars/maven-artifact-2.0-SNAPSHOT.jar $1/lib
cp -f $2/maven/jars/maven-model-2.0-SNAPSHOT.jar $1/lib
cp -f $2/maven/jars/wagon-provider-api-1.0-alpha-2-SNAPSHOT.jar $1/lib
cp -f $2/maven/jars/wagon-file-1.0-alpha-2-SNAPSHOT.jar $1/lib
cp -f $2/maven/jars/wagon-http-lightweight-1.0-alpha-2-SNAPSHOT.jar $1/lib
echo "Copying startup script, and changing its permissions to '+x'..."
echo ""
cp -f src/main/bash/repoclean.sh $1
chmod +x $1/repoclean.sh
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
echo ""
echo "*******************"
echo "* repoclean utility has been installed to: ${1}."
echo "*"
echo "* To run, change to '${1}' and execute './repoclean.sh', which will give further usage instructions."
echo "*******************"
echo ""