Friday, October 21, 2011

solved maven error "NoClassDefFoundError" ComponentLifecycleException


niskia:/xxyyzz# mvn jar:jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/plexus/component/repository/exception/ComponentLifecycleException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.privateGetPublicMethods(Class.java:2547)
at java.lang.Class.getMethods(Class.java:1410)
at org.codehaus.classworlds.Launcher.getEnhancedMainMethod(Launcher.java:195)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:294)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.component.repository.exception.ComponentLifecycleException
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:307)
at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 9 more

The solution was reinstalling maven. For debian is done by:

apt-get remove maven2
apt-get install maven2

No comments:

Post a Comment