Running Win 2008 Server, Eclipse Indigo, Latest version of Spring Framerwork. Trying the following example:
http://viralpatel.net/blogs/2011/01/...hibernate.html
Unfortunately it fails at the first step, when I try to execute any Maven command (ie: 'mvn -version'), I get the following error:
C:\Users\SampleUser>mvn which
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/plexus/c
lassworlds/launcher/Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.lau
ncher.Launcher
at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 48)
Could not find the main class: org.codehaus.plexus.classworlds.launcher.Launcher
. Program will exit.
I've tried setting MV2_HOME, deleted that, tried MV3_HOME, deleted that, tried MAVEN_HOME, deleted that. Checked my jdk, using:
'java -version' ALL OK
HOWEVER,
'javac -version' returns the following error:
C:\Users\SampleUse>javac -version
'javac' is not recognized as an internal or external command,
operable program or batch file.
I wonder if that has anything to do with why Maven is not working? any suggestions on how to set up and use Maven correctly would be greatly appreciated. I checked a number of web resources most of which talk about the conflict in using more than one MVN home (ie: MV3_HOME when you already have MV2_HOME installed). This is not my case since I"m manually setting the homes from the command window and not through the Windows variables. Only my jdk is set from Windows. Any advice or suggestion is GREATLY appreciated. Many thanks, J


Reply With Quote
