Maven - 错误:无法找到或加载主类org.codehaus.plexus.classworlds.launcher.Launcher

时间:2016-07-22 17:31:14

标签: java maven

我知道这个问题已经发布了很多,但我仍然无法解决我的问题。

所以,我刚从http://apache.mirrors.hoobly.com/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip

下载了bin发布内容

解压缩zip文件后,我将其移至/opt/apache-maven-3.3.9

这是我运行命令时终端的样子:

xxx@xxx-VirtualBox:/opt/apache-maven-3.3.9/bin$ ls
m2.conf  mvn  mvnDebug

xxx@xxx-VirtualBox:/opt/apache-maven-3.3.9/bin$ ./mvn
Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher

xxx@xxx-VirtualBox:/opt/apache-maven-3.3.9/bin$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

xxx@xxx-VirtualBox:/opt/apache-maven-3.3.9/bin$ printenv JAVA_HOME 
/usr/lib/jvm/java-7-oracle

Java安装正确,但我仍然无法运行mvn可执行文件

ls -lR /opt/apache-maven-3.3.9的结果如下:

xxx@xxx-VirtualBox:/opt/apache-maven-3.3.9/bin$ ls -lR /opt/apache-maven-3.3.9/
/opt/apache-maven-3.3.9/:
total 16
drwxr-xr-x 2 root root 4096 Jul 21 11:12 bin
drwxr-xr-x 2 root root 4096 Jul 21 11:12 boot
lrwxrwxrwx 1 root root   10 Dec  9  2015 conf -> /etc/maven
drwxr-xr-x 2 root root 4096 Jul 21 11:12 lib
drwxr-xr-x 2 root root 4096 Jul 21 11:12 man

/opt/apache-maven-3.3.9/bin:
total 12
lrwxrwxrwx 1 root root   18 Dec  9  2015 m2.conf -> /etc/maven/m2.conf
-rwxr-xr-x 1 root root 7383 Nov 19  2015 mvn
-rwxr-xr-x 1 root root 1815 Nov 19  2015 mvnDebug

/opt/apache-maven-3.3.9/boot:
total 0
lrwxrwxrwx 1 root root 34 Dec  9  2015 plexus-classworlds-2.x.jar -> ../../java/plexus-classworlds2.jar

/opt/apache-maven-3.3.9/lib:
total 0
lrwxrwxrwx 1 root root 26 Dec  9  2015 aopalliance.jar -> ../../java/aopalliance.jar
lrwxrwxrwx 1 root root 22 Dec  9  2015 cdi-api.jar -> ../../java/cdi-api.jar
lrwxrwxrwx 1 root root 26 Dec  9  2015 commons-cli.jar -> ../../java/commons-cli.jar
lrwxrwxrwx 1 root root 25 Dec  9  2015 commons-io.jar -> ../../java/commons-io.jar
lrwxrwxrwx 1 root root 28 Dec  9  2015 commons-lang3.jar -> ../../java/commons-lang3.jar
lrwxrwxrwx 1 root root 27 Dec  9  2015 commons-lang.jar -> ../../java/commons-lang.jar
lrwxrwxrwx 1 root root 33 Dec  9  2015 eclipse-aether-api.jar -> ../../java/eclipse-aether-api.jar
lrwxrwxrwx 1 root root 45 Dec  9  2015 eclipse-aether-connector-basic.jar -> ../../java/eclipse-aether-connector-basic.jar
lrwxrwxrwx 1 root root 34 Dec  9  2015 eclipse-aether-impl.jar -> ../../java/eclipse-aether-impl.jar
lrwxrwxrwx 1 root root 33 Dec  9  2015 eclipse-aether-spi.jar -> ../../java/eclipse-aether-spi.jar
lrwxrwxrwx 1 root root 45 Dec  9  2015 eclipse-aether-transport-wagon.jar -> ../../java/eclipse-aether-transport-wagon.jar
lrwxrwxrwx 1 root root 34 Dec  9  2015 eclipse-aether-util.jar -> ../../java/eclipse-aether-util.jar
lrwxrwxrwx 1 root root 20 Dec  9  2015 guava.jar -> ../../java/guava.jar
lrwxrwxrwx 1 root root 20 Dec  9  2015 guice.jar -> ../../java/guice.jar
lrwxrwxrwx 1 root root 38 Dec  9  2015 javax.inject.jar -> ../../java/atinject-jsr330-tck-1.0.jar
lrwxrwxrwx 1 root root 20 Dec  9  2015 jsoup.jar -> ../../java/jsoup.jar
lrwxrwxrwx 1 root root 37 Dec  9  2015 maven-aether-provider-3.x.jar -> ../../java/maven3-aether-provider.jar
lrwxrwxrwx 1 root root 30 Dec  9  2015 maven-artifact-3.x.jar -> ../../java/maven3-artifact.jar
lrwxrwxrwx 1 root root 37 Dec  9  2015 maven-builder-support-3.x.jar -> ../../java/maven3-builder-support.jar
lrwxrwxrwx 1 root root 28 Dec  9  2015 maven-compat-3.x.jar -> ../../java/maven3-compat.jar
lrwxrwxrwx 1 root root 26 Dec  9  2015 maven-core-3.x.jar -> ../../java/maven3-core.jar
lrwxrwxrwx 1 root root 30 Dec  9  2015 maven-embedder-3.x.jar -> ../../java/maven3-embedder.jar
lrwxrwxrwx 1 root root 27 Dec  9  2015 maven-model-3.x.jar -> ../../java/maven3-model.jar
lrwxrwxrwx 1 root root 35 Dec  9  2015 maven-model-builder-3.x.jar -> ../../java/maven3-model-builder.jar
lrwxrwxrwx 1 root root 32 Dec  9  2015 maven-plugin-api-3.x.jar -> ../../java/maven3-plugin-api.jar
lrwxrwxrwx 1 root root 41 Dec  9  2015 maven-repository-metadata-3.x.jar -> ../../java/maven3-repository-metadata.jar
lrwxrwxrwx 1 root root 30 Dec  9  2015 maven-settings-3.x.jar -> ../../java/maven3-settings.jar
lrwxrwxrwx 1 root root 38 Dec  9  2015 maven-settings-builder-3.x.jar -> ../../java/maven3-settings-builder.jar
lrwxrwxrwx 1 root root 28 Dec  9  2015 plexus-cipher.jar -> ../../java/plexus-cipher.jar
lrwxrwxrwx 1 root root 47 Dec  9  2015 plexus-component-annotations.jar -> ../../java/plexus-component-annotations-1.5.jar
lrwxrwxrwx 1 root root 35 Dec  9  2015 plexus-interpolation.jar -> ../../java/plexus-interpolation.jar
lrwxrwxrwx 1 root root 36 Dec  9  2015 plexus-sec-dispatcher.jar -> ../../java/plexus-sec-dispatcher.jar
lrwxrwxrwx 1 root root 28 Dec  9  2015 plexus-utils.jar -> ../../java/plexus-utils2.jar
lrwxrwxrwx 1 root root 26 Dec  9  2015 sisu-inject.jar -> ../../java/sisu-inject.jar
lrwxrwxrwx 1 root root 26 Dec  9  2015 sisu-plexus.jar -> ../../java/sisu-plexus.jar
lrwxrwxrwx 1 root root 24 Dec  9  2015 slf4j-api.jar -> ../../java/slf4j-api.jar
lrwxrwxrwx 1 root root 27 Dec  9  2015 slf4j-simple.jar -> ../../java/slf4j-simple.jar
lrwxrwxrwx 1 root root 29 Dec  9  2015 wagon-file.jar -> ../../java/wagon-file-2.x.jar
lrwxrwxrwx 1 root root 36 Dec  9  2015 wagon-http-shaded.jar -> ../../java/wagon-http-shaded-2.x.jar
lrwxrwxrwx 1 root root 36 Dec  9  2015 wagon-http-shared.jar -> ../../java/wagon-http-shared-2.x.jar
lrwxrwxrwx 1 root root 37 Dec  9  2015 wagon-provider-api.jar -> ../../java/wagon-provider-api-2.x.jar

/opt/apache-maven-3.3.9/man:
total 8
-rw-r--r-- 1 root root 1229 Nov 19  2015 mvn.1.gz
-rw-r--r-- 1 root root 1240 Nov 19  2015 mvnDebug.1.gz

0 个答案:

没有答案