maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r348004 - /maven/components/trunk/bootstrap.sh
Date Mon, 21 Nov 2005 22:42:49 GMT
Author: brett
Date: Mon Nov 21 14:42:41 2005
New Revision: 348004

URL: http://svn.apache.org/viewcvs?rev=348004&view=rev
Log:
always call $JAVA_HOME/bin/java

Modified:
    maven/components/trunk/bootstrap.sh

Modified: maven/components/trunk/bootstrap.sh
URL: http://svn.apache.org/viewcvs/maven/components/trunk/bootstrap.sh?rev=348004&r1=348003&r2=348004&view=diff
==============================================================================
--- maven/components/trunk/bootstrap.sh (original)
+++ maven/components/trunk/bootstrap.sh Mon Nov 21 14:42:41 2005
@@ -3,11 +3,18 @@
 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
-  java $MAVEN_OPTS -jar bootstrap-mini.jar install $ARGS
+  $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
@@ -16,7 +23,7 @@
 
 (
   cd bootstrap/bootstrap-installer
-  java $MAVEN_OPTS -jar ../$BOOTSTRAP_JAR package $ARGS
+  $JAVACMD $MAVEN_OPTS -jar ../$BOOTSTRAP_JAR package $ARGS
   ret=$?; if [ $ret != 0 ]; then exit $ret; fi
 )
 ret=$?; if [ $ret != 0 ]; then exit $ret; fi
@@ -42,7 +49,7 @@
 
 OLD_M2_HOME=$M2_HOME
 unset M2_HOME
-java $MAVEN_OPTS -jar bootstrap/bootstrap-installer/target/bootstrap-installer.jar --prefix=$PREFIX
$ARGS
+$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
@@ -52,7 +59,7 @@
 (
   # TODO: should w ebe going back to the mini now that we have the real thing?
   cd maven-core-it-verifier
-  java $MAVEN_OPTS -jar ../bootstrap/$BOOTSTRAP_JAR package $ARGS
+  $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



Mime
View raw message