2004-07-27 17:37:07 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Check to make sure JAVA_HOME is set
|
2005-05-08 22:50:01 +00:00
|
|
|
[ -z "$JAVA_HOME" ] && echo && echo 'You must set $JAVA_HOME to use mboot!' && echo && exit 1
|
2004-07-27 17:37:07 +00:00
|
|
|
|
2005-04-11 13:07:32 +00:00
|
|
|
JAVACMD=$JAVA_HOME/bin/java
|
|
|
|
|
2004-08-14 20:46:24 +00:00
|
|
|
ARGS="$@"
|
|
|
|
|
2005-04-11 13:07:32 +00:00
|
|
|
# OS specific support. $var _must_ be set to either true or false.
|
|
|
|
cygwin=false;
|
|
|
|
case "`uname`" in
|
|
|
|
CYGWIN*) cygwin=true ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
|
|
|
if $cygwin ; then
|
2005-05-10 15:36:39 +00:00
|
|
|
[ -n "$M2_HOME" ] && M2_HOME=`cygpath -w "$M2_HOME"`
|
2005-04-11 13:07:32 +00:00
|
|
|
fi
|
|
|
|
|
2005-07-01 19:26:56 +00:00
|
|
|
if [ -z "$M2_HOME" ]; then
|
|
|
|
echo "M2_HOME must be set."
|
|
|
|
exit 1
|
2004-09-09 11:13:12 +00:00
|
|
|
fi
|
|
|
|
|
2005-07-01 19:26:56 +00:00
|
|
|
HOME_ARGS="-Dmaven.home=$M2_HOME"
|
|
|
|
|
2004-07-27 17:37:07 +00:00
|
|
|
# Build and install mboot
|
|
|
|
(
|
|
|
|
echo "-----------------------------------------------------------------------"
|
|
|
|
echo " Building mboot ... "
|
|
|
|
echo "-----------------------------------------------------------------------"
|
|
|
|
|
|
|
|
cd ./maven-mboot2
|
2005-06-07 01:32:11 +00:00
|
|
|
./build
|
2004-07-27 17:37:07 +00:00
|
|
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|
|
|
|
)
|
|
|
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|
|
|
|
|
|
|
|
(
|
|
|
|
echo "-----------------------------------------------------------------------"
|
|
|
|
echo " Building maven2 components ... "
|
|
|
|
echo "-----------------------------------------------------------------------"
|
|
|
|
|
2005-06-07 01:32:11 +00:00
|
|
|
"$JAVACMD" "$HOME_ARGS" $MAVEN_OPTS -jar mboot.jar $ARGS
|
2004-07-27 17:37:07 +00:00
|
|
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|
|
|
|
)
|
|
|
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|
|
|
|
|
2005-10-14 14:19:58 +00:00
|
|
|
echo "-----------------------------------------------------------------------"
|
|
|
|
echo " Rebuilding maven2 plugins ... "
|
|
|
|
echo "-----------------------------------------------------------------------"
|
|
|
|
|
2005-06-22 02:07:42 +00:00
|
|
|
# I Really Don't want to be rebuilding these (Especially the reports) every time, but
|
|
|
|
# until we regularly push them to the repository and the integration tests rely on
|
|
|
|
# some of these plugins, there is no choice
|
2005-04-01 04:44:33 +00:00
|
|
|
(
|
2005-10-14 14:19:58 +00:00
|
|
|
# Build plugin plugin first, it seems to choke on the version built by the bootstrap
|
|
|
|
cd maven-plugins/maven-plugin-plugin
|
2005-04-01 04:44:33 +00:00
|
|
|
|
2005-10-31 16:37:09 +00:00
|
|
|
mvn --no-plugin-registry --batch-mode --fail-at-end -e $ARGS clean:clean install
|
2005-10-14 14:19:58 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
(
|
2005-04-01 04:44:33 +00:00
|
|
|
cd maven-plugins
|
2005-05-23 06:43:12 +00:00
|
|
|
# update the release info to ensure these versions get used in the integration tests
|
2005-10-31 16:37:09 +00:00
|
|
|
mvn --no-plugin-registry --batch-mode --fail-at-end -e $ARGS clean:clean install
|
2005-04-01 04:44:33 +00:00
|
|
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|
|
|
|
)
|
|
|
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|
|
|
|
|
2004-07-27 17:37:07 +00:00
|
|
|
(
|
|
|
|
cd ./maven-core-it
|
|
|
|
echo
|
|
|
|
echo "Running maven-core integration tests ..."
|
|
|
|
echo
|
2005-10-15 12:31:19 +00:00
|
|
|
./maven-core-it.sh $ARGS
|
2004-07-27 17:37:07 +00:00
|
|
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|
|
|
|
)
|
|
|
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|