There seems to be a typo in the "mvn" script!

I've reported this in Jira ( http://jira.codehaus.org/browse/MNG-1470 ), but nobody seemed to care. I'm now trying to repost the issue here.

Steps to reproduce:

[ untar maven and move it to /usr/local/maven ]
$ cd /usr/local/bin
$ ln -sf ../maven/bin/mvn .
$ mvn
/usr/local/bin/mvn: line 75: cd: ../maven/bin/..: No existe el fichero o el directorio Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher

It's a very simple fix. When traversing synlinks to get the canonical pathname, mvn should treat relative references by appending them to "dirname", no the other way around!

A patch is attached.

--- /usr/local/maven/bin/mvn~   2005-11-08 23:18:26.000000000 -0300
+++ /usr/local/maven/bin/mvn    2005-11-08 23:18:26.000000000 -0300
@@ -60,7 +60,7 @@
   while [ -h "$PRG" ] ; do
     ls=`ls -ld "$PRG"`
     link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '.*/.*' > /dev/null; then
+    if expr "$link" : '/.*' > /dev/null; then
       PRG="$link"
     else
       PRG="`dirname "$PRG"`/$link"

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to