You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2004/05/07 20:03:16 UTC
cvs commit: maven-components/maven-core/src/bin m2
jvanzyl 2004/05/07 11:03:16
Modified: maven-core/src/bin m2
Log:
o we don't care about the $MAVEN_HOME envar anymore, we pick it up up
using directives in classworlds.
o we don't care about any directories for unpacking plugins because
plugins are use in situ in maven2.
Revision Changes Path
1.5 +7 -68 maven-components/maven-core/src/bin/m2
Index: m2
===================================================================
RCS file: /home/cvs/maven-components/maven-core/src/bin/m2,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- m2 16 Apr 2004 13:08:56 -0000 1.4
+++ m2 7 May 2004 18:03:16 -0000 1.5
@@ -21,52 +21,10 @@
Darwin*) darwin=true ;;
esac
-if [ -z "$M2_HOME" ] ; then
- # try to find MAVEN
- if [ -d /opt/m2 ] ; then
- M2_HOME=/opt/m2
- fi
-
- if [ -d ${HOME}/maven ] ; then
- M2_HOME=${HOME}/m2
- fi
-
- ## resolve links - $0 may be a link to maven's home
- PRG=$0
- progname=`basename $0`
- saveddir=`pwd`
-
- # need this for relative symlinks
- cd `dirname $PRG`
-
- 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
-
- M2_HOME=`dirname "$PRG"`/..
-
- # make it fully qualified
- M2_HOME=`cd "$M2_HOME" && pwd`
-
- cd $saveddir
-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 "$M2_HOME_LOCAL" ] &&
- M2_HOME_LOCAL=`cygpath --unix "$M2_HOME_LOCAL"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
if [ -z "$JAVACMD" ] ; then
@@ -95,32 +53,15 @@
echo " to the installation directory of java."
fi
-MAVEN_ENDORSED==${JAVA_HOME}/lib/endorsed:${M2_HOME}/lib/endorsed
CLASSWORLDS_CONF="${M2_HOME}/bin/classworlds.conf"
-CP=${M2_HOME}/lib/classworlds-${CLASSWORLDS_VERSION}.jar
-
-# For Darwin, use classes.jar for TOOLS_JAR
-TOOLS_JAR="${JAVA_HOME}/lib/tools.jar"
-if $darwin; then
- TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar"
-fi
+CP=${M2_HOME}/core/classworlds-${CLASSWORLDS_VERSION}.jar
+#CP=${M2_HOME}/lib/classworlds-${CLASSWORLDS_VERSION}.jar
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
- [ -n "$CP" ] &&
- CP=`cygpath --path --windows "$CP"`
- [ -n "$CLASSWORLDS_CONF" ] &&
- CLASSWORLDS_CONF=`cygpath --path --windows "$CLASSWORLDS_CONF"`
- [ -n "$M2_HOME" ] &&
- M2_HOME=`cygpath --path --windows "$M2_HOME"`
- [ -n "$M2_HOME_LOCAL" ] &&
- M2_HOME_LOCAL=`cygpath --path --windows "$M2_HOME_LOCAL"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- [ -n "$MAVEN_ENDORSED" ] &&
- MAVEN_ENDORSED=`cygpath --path --windows "$MAVEN_ENDORSED"`
- [ -n "$TOOLS_JAR" ] &&
- TOOLS_JAR=`cygpath --path --windows "$TOOLS_JAR"`
+ [ -n "$CP" ] && CP=`cygpath --path --windows "$CP"`
+ [ -n "$CLASSWORLDS_CONF" ] && CLASSWORLDS_CONF=`cygpath --path --windows "$CLASSWORLDS_CONF"`
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
fi
MAIN_CLASS=org.codehaus.classworlds.Launcher
@@ -129,6 +70,4 @@
$MAVEN_OPTS \
-classpath "$CP" \
"-Dclassworlds.conf=$CLASSWORLDS_CONF" \
- "-Dtools.jar=$TOOLS_JAR" \
- "-Dmaven.home=${M2_HOME}" \
$MAIN_CLASS $@
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org