ubuntu - Maven error: Could not find or load main class .usr.share.maven.boot.plexus-classworlds-2.x.jar -


i have upgraded ubuntu 14.04 16.04 , started getting following error when running mvn commands (version 3.3.9): error: not find or load main class .usr.share.maven.boot.plexus-classworlds-2.x.jar. environment variables declared follows:

$java_home: /usr/lib/jvm/java-8-oracle $path: /usr/local/texlive/2015/bin/x86_64-linux:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin $m2_home: /usr/share/maven $m2: /usr/share/maven/bin

when trying find solution, i've tried removing m2 , m2_home variables suggested on various threads, resulted in getting different error: error: not find or load main class org.codehaus.plexus.classworlds.launcher.launcher. have tried running apt-get remove --purge maven , installing again downloading .tar.gz archive, in both cases, nothing has changed.

when looking /usr/share/maven/boot folder, there chain of symlinks pointing plexus-classworlds-2.x.jar -> /usr/share/java/plexus-classworlds2-2.5.2.jar. missing dependencies? or there old configuration files did not removed --purge?

edit: when execute mvn root, launcher error instead of plexus-classworlds-2.x. also, have removed , reinstalled plexus libraries, yet no change.

check if /usr/share/maven/boot has multiple jars pattern /usr/share/maven/boot/plexus-classworlds-*.jar.

mine like:

drwxr-xr-x 2 root root  4096 dec  23 14:21 ./ drwxr-xr-x 6 root root  4096 nov  14  2015 ../ -rw-r--r-- 1 root root 52684 dec  12  2015 plexus-classworlds-2.5.2.jar lrwxrwxrwx 1 root root    34 dec  10  2015 plexus-classworlds-2.x.jar -> ../../java/plexus-classworlds2.jar 

this messes /usr/share/maven/bin/mvn bash script , executes wrong java command.

i had remove jar , leave symbolic link.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -