[jboss-cvs] JBossAS SVN: r83080 - trunk/bootstrap.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jan 19 14:28:53 EST 2009
Author: pgier
Date: 2009-01-19 14:28:53 -0500 (Mon, 19 Jan 2009)
New Revision: 83080
Modified:
trunk/bootstrap/build.bat
trunk/bootstrap/build.sh
Log:
[JBBUILD-510] Update build scripts to point to maven.
Modified: trunk/bootstrap/build.bat
===================================================================
--- trunk/bootstrap/build.bat 2009-01-19 16:15:01 UTC (rev 83079)
+++ trunk/bootstrap/build.bat 2009-01-19 19:28:53 UTC (rev 83080)
@@ -3,7 +3,7 @@
REM
REM This is the main entry point for the build system.
REM
-REM Users should be sure to execute this file rather than 'ant' to ensure
+REM Users should be sure to execute this file rather than 'mvn' to ensure
REM the correct version is being used with the correct configuration.
REM
REM ======================================================================
@@ -16,8 +16,8 @@
REM
REM ******************************************************
-REM Ignore the ANT_HOME variable: we want to use *our*
-REM ANT version and associated JARs.
+REM Ignore the MAVEN_HOME variable: we want to use *our*
+REM Maven version and associated JARs.
REM ******************************************************
REM Ignore the users classpath, cause it might mess
REM things up
@@ -26,15 +26,14 @@
SETLOCAL
set CLASSPATH=
-set ANT_HOME=
-set ANT_OPTS=-Djava.protocol.handler.pkgs=org.jboss.net.protocol -Dbuild.script=build.bat
+set MAVEN_HOME=
REM ******************************************************
REM - "for" loops have been unrolled for compatibility
REM with some WIN32 systems.
REM ******************************************************
-set NAMES=tools;tools\ant;tools\apache\ant
+set NAMES=tools;tools\maven;tools\apache\maven
set SUBFOLDERS=..;..\..;..\..\..;..\..\..\..
REM ******************************************************
@@ -51,13 +50,13 @@
REM ******************************************************
:subLoop
-for %%j in (%SUBFOLDERS%) do call :testIfExists %%j\%1\bin\ant.bat %2 %3 %4 %5 %6 %7
+for %%j in (%SUBFOLDERS%) do call :testIfExists %%j\%1\bin\mvn.bat %2 %3 %4 %5 %6 %7
goto :EOF
REM ******************************************************
-REM ************ Test if ANT Batch file exists ***********
+REM ************ Test if Maven Batch file exists ***********
REM ******************************************************
:testIfExists
Modified: trunk/bootstrap/build.sh
===================================================================
--- trunk/bootstrap/build.sh 2009-01-19 16:15:01 UTC (rev 83079)
+++ trunk/bootstrap/build.sh 2009-01-19 19:28:53 UTC (rev 83080)
@@ -3,7 +3,7 @@
## ##
## This is the main entry point for the build system. ##
## ##
-## Users should be sure to execute this file rather than 'ant' to ensure ##
+## Users should execute this file rather than 'mvn' to ensure ##
## the correct version is being used with the correct configuration. ##
## ##
### ====================================================================== ###
@@ -15,21 +15,18 @@
GREP="grep"
ROOT="/"
-# Ignore user's ANT_HOME if it is set
-ANT_HOME=""
+# Ignore user's MAVEN_HOME if it is set
+MAVEN_HOME=""
-# the default search path for ant
-ANT_SEARCH_PATH="\
+# the default search path for maven
+MAVEN_SEARCH_PATH="\
tools
- tools/ant \
- tools/apache/ant \
- ant"
+ tools/maven \
+ tools/apache/maven \
+ maven"
-# the default build file name
-ANT_BUILD_FILE="build.xml"
-
# the default arguments
-ANT_OPTIONS="--noconfig -find $ANT_BUILD_FILE"
+MVN_OPTIONS=""
# Use the maximum available, or set MAX_FD != -1 to use that
MAX_FD="maximum"
@@ -76,11 +73,11 @@
search() {
search="$*"
for d in $search; do
- ANT_HOME="`pwd`/$d"
- ANT="$ANT_HOME/bin/ant"
- if [ -x "$ANT" ]; then
+ MAVEN_HOME="`pwd`/$d"
+ MVN="$MAVEN_HOME/bin/mvn"
+ if [ -x "$MVN" ]; then
# found one
- echo $ANT_HOME
+ echo $MAVEN_HOME
break
fi
done
@@ -112,17 +109,17 @@
fi
# try the search path
- ANT_HOME=`search $ANT_SEARCH_PATH`
+ MAVEN_HOME=`search $MAVEN_SEARCH_PATH`
# try looking up to root
- if [ "x$ANT_HOME" = "x" ]; then
+ if [ "x$MAVEN_HOME" = "x" ]; then
target="build"
_cwd=`pwd`
- while [ "x$ANT_HOME" = "x" ] && [ "$cwd" != "$ROOT" ]; do
+ while [ "x$MAVEN_HOME" = "x" ] && [ "$cwd" != "$ROOT" ]; do
cd ..
cwd=`pwd`
- ANT_HOME=`search $ANT_SEARCH_PATH`
+ MAVEN_HOME=`search $MAVEN_SEARCH_PATH`
done
# make sure we get back
@@ -134,34 +131,40 @@
# complain if we did not find anything
if [ "$found" != "true" ]; then
- die "Could not locate Ant; check \$ANT or \$ANT_HOME."
+ die "Could not locate Maven; check \$MVN or \$MAVEN_HOME."
fi
fi
# make sure we have one
- ANT=$ANT_HOME/bin/ant
- if [ ! -x "$ANT" ]; then
- die "Ant file is not executable: $ANT"
+ MVN=$MAVEN_HOME/bin/mvn
+ if [ ! -x "$MVN" ]; then
+ die "Maven file is not executable: $MVN"
fi
# need to specify planet57/buildmagic protocol handler package
- ANT_OPTS="-Djava.protocol.handler.pkgs=org.jboss.net.protocol"
+ MVN_OPTS="-Djava.protocol.handler.pkgs=org.jboss.net.protocol"
# setup some build properties
- ANT_OPTS="$ANT_OPTS -Dbuild.script=$0"
+ MVN_OPTS="$MVN_OPTS -Dbuild.script=$0"
# change to the directory where the script lives so users are not forced
# to be in the same directory as build.xml
cd $DIRNAME
- # export some stuff for ant
- export ANT ANT_HOME ANT_OPTS
+ MVN_GOAL=$@
+ if [ -z "$MVN_GOAL" ]; then
+ MVN_GOAL="install"
+ fi
+
+ # export some stuff for maven
+ export MVN MAVEN_HOME MVN_OPTS MVN_GOAL
+
# execute in debug mode, or simply execute
- if [ "x$ANT_DEBUG" != "x" ]; then
- /bin/sh -x $ANT $ANT_OPTIONS "$@"
+ if [ "x$MVN_DEBUG" != "x" ]; then
+ /bin/sh -x $MVN $MVN_OPTIONS $MVN_GOAL
else
- exec $ANT $ANT_OPTIONS "$@"
+ exec $MVN $MVN_OPTIONS $MVN_GOAL
fi
}
More information about the jboss-cvs-commits
mailing list