Maven 1

[PATCH] maven shell script doesn't properly resolve symbolic links

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.2
  • Fix Version/s: 1.1-beta-1
  • Component/s: cli
  • Labels:
    None
  • Environment:
    Mac OS X
  • Number of attachments :
    1

Description

The maven shell script doesn't properly find MAVEN_HOME when maven is invoked as a symlink and/or when the symlink is a relative symlink.

The attached patch corrects both of these issues.

Ironically, this used to work in 1.0.1 but was broken for 1.0.2.

This patch also enables the two checks for special MAVEN_HOME directories to work correctly.

Activity

Hide
James Berry added a comment -

Patch to bin/maven shell script.

Show
James Berry added a comment - Patch to bin/maven shell script.
Hide
Jerome Lacoste added a comment -

The patch works for me. To test do the following

cd ~/local/lib
wget http://www.apache.org/dist/maven/binaries/maven-1.0.2.tar.bz2
tar -jxovf maven-1.0.2.tar.bz2
ln -s maven-1.0.2 maven
cd ~/local/bin
ln -s ../lib/maven/bin/maven .
export PATH=/bin:/usr/bin:$HOME/local/bin

  1. then with maven 1.0.2:
    maven
    Exception in thread "main" java.lang.NoClassDefFoundError: com/werken/forehead/Forehead
  1. with patch
    maven -v
    __ __
    \/ __ Apache_ ___
      \/ / ` \ V / -) ' \ ~ intelligent projects ~
    _   _,_ _/___ _ _ v. 1.0.2
Show
Jerome Lacoste added a comment - The patch works for me. To test do the following cd ~/local/lib wget http://www.apache.org/dist/maven/binaries/maven-1.0.2.tar.bz2 tar -jxovf maven-1.0.2.tar.bz2 ln -s maven-1.0.2 maven cd ~/local/bin ln -s ../lib/maven/bin/maven . export PATH=/bin:/usr/bin:$HOME/local/bin
  1. then with maven 1.0.2: maven Exception in thread "main" java.lang.NoClassDefFoundError: com/werken/forehead/Forehead
  1. with patch maven -v __ __
    \/ __ Apache_ ___
      \/ / ` \ V / -) ' \ ~ intelligent projects ~
    _   _,_ _/___ _ _ v. 1.0.2
Hide
Brett Porter added a comment -

looks good. Applied, thanks.

Show
Brett Porter added a comment - looks good. Applied, thanks.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: