You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2005/10/15 20:25:59 UTC
svn commit: r321409 - in
/maven/components/tags/maven-2.0/maven-core/src/bin: m2 m2.bat mvn mvn.bat
Author: brett
Date: Sat Oct 15 11:25:52 2005
New Revision: 321409
URL: http://svn.apache.org/viewcvs?rev=321409&view=rev
Log:
rename script
Added:
maven/components/tags/maven-2.0/maven-core/src/bin/mvn
- copied unchanged from r321043, maven/components/tags/maven-2.0/maven-core/src/bin/m2
maven/components/tags/maven-2.0/maven-core/src/bin/mvn.bat
- copied unchanged from r321043, maven/components/tags/maven-2.0/maven-core/src/bin/m2.bat
Modified:
maven/components/tags/maven-2.0/maven-core/src/bin/m2
maven/components/tags/maven-2.0/maven-core/src/bin/m2.bat
Modified: maven/components/tags/maven-2.0/maven-core/src/bin/m2
URL: http://svn.apache.org/viewcvs/maven/components/tags/maven-2.0/maven-core/src/bin/m2?rev=321409&r1=321408&r2=321409&view=diff
==============================================================================
--- maven/components/tags/maven-2.0/maven-core/src/bin/m2 (original)
+++ maven/components/tags/maven-2.0/maven-core/src/bin/m2 Sat Oct 15 11:25:52 2005
@@ -18,115 +18,8 @@
# Copyright (c) 2001-2002 The Apache Software Foundation. All rights
# reserved.
-if [ -f /etc/mavenrc ] ; then
- . /etc/mavenrc
-fi
-
-if [ -f "$HOME/.mavenrc" ] ; then
- . "$HOME/.mavenrc"
-fi
-
-# OS specific support. $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-case "`uname`" in
- CYGWIN*) cygwin=true ;;
- Darwin*) darwin=true
- if [ -z "$JAVA_VERSION" ] ; then
- JAVA_VERSION="CurrentJDK"
- else
- echo "Using Java version: $JAVA_VERSION"
- fi
- if [ -z "$JAVA_HOME" ] ; then
- JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
- fi
- ;;
-esac
-
-if [ -z "$M2_HOME" ] ; then
- # try to find MAVEN
- if [ -d /opt/m2 ] ; then
- MAVEN_HOME=/opt/m2
- fi
-
- if [ -d "$HOME/m2" ] ; then
- MAVEN_HOME="$HOME/m2"
- fi
-
- ## resolve links - $0 may be a link to maven's home
- PRG="$0"
-
- # need this for relative symlinks
- while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '.*/.*' > /dev/null; then
- PRG="$link"
- else
- PRG="`dirname "$PRG"`/$link"
- fi
- done
-
- saveddir=`pwd`
-
- M2_HOME=`dirname "$PRG"`/..
-
- # make it fully qualified
- M2_HOME=`cd "$M2_HOME" && pwd`
-
- cd "$saveddir"
- # echo Using m2 at $M2_HOME
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
- [ -n "$M2_HOME" ] &&
- M2_HOME=`cygpath --unix "$M2_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
-if [ -z "$JAVACMD" ] ; then
- if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- else
- JAVACMD=java
- fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
- echo "Error: JAVA_HOME is not defined correctly."
- echo " We cannot execute $JAVACMD"
- exit 1
-fi
-
-if [ -z "$JAVA_HOME" ] ; then
- echo "Warning: JAVA_HOME environment variable is not set."
-fi
-
-CLASSWORLDS_LAUNCHER=org.codehaus.classworlds.Launcher
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
- [ -n "$M2_HOME" ] &&
- M2_HOME=`cygpath --path --windows "$M2_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- [ -n "$HOME" ] &&
- HOME=`cygpath --path --windows "$HOME"`
-fi
-
-exec "$JAVACMD" \
- $MAVEN_OPTS \
- -classpath "${M2_HOME}"/core/boot/classworlds-*.jar \
- "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
- "-Dmaven.home=${M2_HOME}" \
- ${CLASSWORLDS_LAUNCHER} $@
+echo ""
+echo THE m2 COMMMAND IS DEPRECATED - PLEASE RUN mvn INSTEAD
+echo ""
+exec `dirname $0`/mvn $@
Modified: maven/components/tags/maven-2.0/maven-core/src/bin/m2.bat
URL: http://svn.apache.org/viewcvs/maven/components/tags/maven-2.0/maven-core/src/bin/m2.bat?rev=321409&r1=321408&r2=321409&view=diff
==============================================================================
--- maven/components/tags/maven-2.0/maven-core/src/bin/m2.bat (original)
+++ maven/components/tags/maven-2.0/maven-core/src/bin/m2.bat Sat Oct 15 11:25:52 2005
@@ -15,142 +15,9 @@
@REM ----------------------------------------------------------------------------
@REM
-@REM ----------------------------------------------------------------------------
-@REM Maven2 Start Up Batch script
-@REM
-@REM Required ENV vars:
-@REM JAVA_HOME - location of a JDK home dir
-@REM
-@REM Optional ENV vars
-@REM M2_HOME - location of maven2's installed home dir
-@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
-@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
-@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
-@REM e.g. to debug Maven itself, use
-@REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-@REM ----------------------------------------------------------------------------
-
-@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
-@echo off
-@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
-@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
-
-@REM Execute a user defined script before this one
-if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
-
-@REM set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" @setlocal
-
-set ERROR_CODE=0
-
-@REM ==== START VALIDATION ====
-if not "%JAVA_HOME%" == "" goto OkJHome
-
-echo.
-echo ERROR: JAVA_HOME not found in your environment.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation
-echo.
-set ERROR_CODE=1
-goto end
-
-:OkJHome
-if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory.
-echo JAVA_HOME = %JAVA_HOME%
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation
-echo.
-set ERROR_CODE=1
-goto end
-
-:chkMHome
-if not "%M2_HOME%"=="" goto valMHome
-
-if "%OS%"=="Windows_NT" SET M2_HOME=%~dps0\..
-if not "%M2_HOME%"=="" goto valMHome
-
-echo.
-echo ERROR: M2_HOME not found in your environment.
-echo Please set the M2_HOME variable in your environment to match the
-echo location of the Maven installation
echo.
-set ERROR_CODE=1
-goto end
-
-:valMHome
-if exist "%M2_HOME%\bin\m2.bat" goto init
-
+echo THE m2 COMMMAND IS DEPRECATED - PLEASE RUN mvn INSTEAD
echo.
-echo ERROR: M2_HOME is set to an invalid directory.
-echo M2_HOME = %M2_HOME%
-echo Please set the M2_HOME variable in your environment to match the
-echo location of the Maven installation
-echo.
-set ERROR_CODE=1
-goto end
-@REM ==== END VALIDATION ====
-
-:init
-@REM Decide how to startup depending on the version of windows
-
-@REM -- Win98ME
-if NOT "%OS%"=="Windows_NT" goto Win9xArg
-
-@REM -- 4NT shell
-if "%eval[2+2]" == "4" goto 4NTArgs
-
-@REM -- Regular WinNT shell
-set MAVEN_CMD_LINE_ARGS=%*
-goto endInit
-
-@REM The 4NT Shell from jp software
-:4NTArgs
-set MAVEN_CMD_LINE_ARGS=%$
-goto endInit
-
-:Win9xArg
-@REM Slurp the command line arguments. This loop allows for an unlimited number
-@REM of agruments (up to the command line limit, anyway).
-set MAVEN_CMD_LINE_ARGS=
-:Win9xApp
-if %1a==a goto endInit
-set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
-shift
-goto Win9xApp
-
-@REM Reaching here means variables are defined and arguments have been captured
-:endInit
-SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
-
-@REM Start MAVEN2
-for %%i in ("%M2_HOME%"\core\boot\classworlds-*) do set CLASSWORLDS_JAR="%%i"
-%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS%
-goto end
-
-:error
-if "%OS%"=="Windows_NT" @endlocal
-set ERROR_CODE=1
-
-:end
-@REM set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" goto endNT
-
-@REM For old DOS remove the set variables from ENV - we assume they were not set
-@REM before we started - at least we don't leave any baggage around
-set MAVEN_JAVA_EXE=
-set MAVEN_CMD_LINE_ARGS=
-goto postExec
-
-:endNT
-@endlocal
-
-:postExec
-if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
-@REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
-if "%MAVEN_BATCH_PAUSE%" == "on" pause
-exit /B %ERROR_CODE%
+%~dps0/mvn %*