maven/bootstrap.sh
Jason van Zyl 09c67ed9bc o we're not going to build the plugins so make sure that someone who has checked out the "maven"
externals definition doesn't build them. our page says to check out "components" but people don't
  always follow instructions :-)


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@358714 13f79535-47bb-0310-9956-ffa450edef68
2005-12-23 05:23:17 +00:00

72 lines
1.7 KiB
Bash
Executable File

#!/bin/sh
ARGS=$@
ORIG_ARGS=$ARGS
if [ -z "$JAVA_HOME" ]; then
echo You must specify the JAVA_HOME environment variable
exit 1
fi
JAVACMD="$JAVA_HOME/bin/java"
(
cd bootstrap/bootstrap-mini
./build
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
$JAVACMD $MAVEN_OPTS -jar bootstrap-mini.jar install $ARGS
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
BOOTSTRAP_JAR=bootstrap-mini/bootstrap-mini.jar
(
cd bootstrap/bootstrap-installer
$JAVACMD $MAVEN_OPTS -jar ../$BOOTSTRAP_JAR package $ARGS
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
# TODO: get rid of M2_HOME once integration tests are in here
PREFIX=`dirname $M2_HOME`
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
case "`uname`" in
CYGWIN*) cygwin=true ;;
esac
if [ "$cygwin" = "true" ]; then
PREFIX=`cygpath -w $PREFIX`
JAVA_HOME=`cygpath -w $JAVA_HOME`
fi
OLD_M2_HOME=$M2_HOME
unset M2_HOME
$JAVACMD $MAVEN_OPTS -jar bootstrap/bootstrap-installer/target/bootstrap-installer.jar --prefix=$PREFIX $ARGS
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
M2_HOME=$OLD_M2_HOME
export M2_HOME
ARGS=$ORIG_ARGS
(
# TODO: should we be going back to the mini now that we have the real thing?
cd maven-core-it-verifier
$JAVACMD $MAVEN_OPTS -jar ../bootstrap/$BOOTSTRAP_JAR package $ARGS
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
(
cd ./maven-core-it
echo
echo "Running maven-core integration tests ..."
echo
./maven-core-it.sh $ARGS
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
)
ret=$?; if [ $ret != 0 ]; then exit $ret; fi