Announcement Announcement Module
No announcement yet.
Apache Maven Eroor - finding classworlds class Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Apache Maven Eroor - finding classworlds class

    Running Win 2008 Server, Eclipse Indigo, Latest version of Spring Framerwork. Trying the following example:

    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
    Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.lau
    at$ 202)
    at Method)
    at ava:190)
    at java.lang.ClassLoader.loadClass( 07)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche
    at java.lang.ClassLoader.loadClass( 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

    '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

  • #2

    I thought the environment variable is called M2_HOME, but I am just guessing here that this might be related to your problem...



    • #3
      Hi Martin,

      I solved the problem. The environment var is called M2_HOME but that wasnt the problem. I basically downloaded and installed a 'stable' version and it works fine.

      Thanks anyway!


      • #4

        Thanks for letting us know and happy to hear that you got it working!!!