maven não está sendo executado sob o mintty

0

estou executando o windows 7 e cygwin (mais recente)

quando eu uso o console básico do cygwin, o maven funciona muito bem

quando eu abro o mintty e executo o mvn, recebo essa exceção

$ mvn --version
java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.codehaus.plexus.classworlds.launcher.Launcher.  Program will exit.
Exception in thread "main"

não consigo ver nada diferente. aqui estão meus ambientes

$ env
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\slepecw\AppData\Roaming
BURN_AUTOPLAY=C:\Program Files (x86)\Roxio\OEM\Roxio Burn\
COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files
COMPUTERNAME=SLEPECW
COMSPEC=C:\Windows\system32\cmd.exe
CYGWIN=nodosfilewarning
COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files
COMMONPROGRAMW6432=C:\Program Files\Common Files
DEFLOGDIR=C:\ProgramData\McAfee\DesktopProtection
EMC_AUTOPLAY=C:\Program Files (x86)\Common Files\Roxio Shared\OEM\
FP_NO_HOST_CHECK=NO
HOME=/c/Users/slepecw
HOMEDRIVE=C:
HOMEPATH=\Users\slepecw
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_26
LANG=C.UTF-8
LOCALAPPDATA=C:\Users\slepecw\AppData\Local
LOGONSERVER=\CAIHDC-DC01
M3=%M3_HOME/bin%
M3_HOME=C:\Users\slepecw\Code\nmsc-misc\maven\apache-maven-3.0.3
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
PATH=/c/Program Files/Common Files/Microsoft Shared/Windows Live:/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/c/Program Files/Dell/DW WLAN Card:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program Files/WIDCOMM/Bluetooth Software:/c/Program Files/WIDCOMM/Bluetooth Software/syswow64:/c/Program Files/Intel/DMIX:/c/Program Files (x86)/Intel/Services/IPT:/c/Program Files (x86)/Common Files/Roxio Shared/DLLShared:/c/Program Files (x86)/Common Files/Roxio Shared/OEM/DLLShared:/c/Program Files (x86)/Common Files/Roxio Shared/OEM/DLLShared:/c/Program Files (x86)/Common Files/Roxio Shared/OEM/12.0/DLLShared:/c/Program Files (x86)/Roxio/OEM/AudioCore:/c/Program Files (x86)/Windows Live/Shared:/c/Program Files/SlikSvn/bin:/c/Users/slepecw/Code/nmsc-misc/maven/apache-maven-3.0.3/bin:/c/Program Files (x86)/WinMerge:/c/Program Files/TortoiseSVN/bin:/c/Program Files (x86)/Bitvise Tunnelier:/usr/cmd:/usr/bin:/c/cygwin/bin:/c/Program Files/TortoiseGit/bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_ARCHITEW6432=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=2a07
PROGRAMFILES=C:\Program Files (x86)
PSMODULEPATH=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
PWD=/cygdrive/c/Users/slepecw
PROGRAMDATA=C:\ProgramData
PROGRAMFILES(X86)=C:\Program Files (x86)
PROGRAMW6432=C:\Program Files
RCAUTOPLAY=C:\Program Files (x86)\Roxio\OEM\Roxio Central 5\
SERVTAG=3V7FWM1
SESSIONNAME=Console
SHLVL=1
SYSTEMDRIVE=C:
SYSTEMROOT=C:\Windows
TEMP=/tmp
TERM=xterm
TIA=10030
TMP=/tmp
USERDNSDOMAIN=CAIHDC.COMPAID.COM
USERDOMAIN=CAIHDC
USERNAME=slepecw
USERPROFILE=C:\Users\slepecw
VSEDEFLOGDIR=C:\ProgramData\McAfee\DesktopProtection
WINDIR=C:\Windows
_=/cygdrive/c/Program Files (x86)/Git/bin/env

Eu normalmente começaria a cavar com java_home e classpath, mas o fato de que ele funciona sob o shell básico do cygwin está me matando.

    
por scphantm 30.08.2011 / 20:42

1 resposta

0

Você deve verificar JAVA_HOME, CLASSPATH e quaisquer outros bits do ambiente que o java possa se importar. O ambiente no console e no mintty não será necessariamente o mesmo, porque, por exemplo, o console geralmente é chamado pelo Cygwin.bat, enquanto mintty não é, então se você configurou alguma coisa no Cygwin.bat, ele ganhou ' t aparecer em sessões de hortelã.

    
por 31.08.2011 / 06:47

Tags