使用Java 8从命令提示符运行mvn clean
命令时,我遇到异常。
以前我使用的是Java 6,但我没有遇到这种类型的异常。
constituent[0]: file:/C:/apache-maven-3.3.9/bin/../lib/aether-api-1.0.2.v20150114.jar
constituent[1]: file:/C:/apache-maven-3.3.9/bin/../lib/aether-connector-basic-1.0.2.v20150114.jar
constituent[2]: file:/C:/apache-maven-3.3.9/bin/../lib/aether-impl-1.0.2.v20150114.jar
constituent[3]: file:/C:/apache-maven-3.3.9/bin/../lib/aether-spi-1.0.2.v20150114.jar
constituent[4]: file:/C:/apache-maven-3.3.9/bin/../lib/aether-transport-wagon-1.0.2.v20150114.jar
constituent[5]: file:/C:/apache-maven-3.3.9/bin/../lib/aether-util-1.0.2.v20150114.jar
constituent[6]: file:/C:/apache-maven-3.3.9/bin/../lib/aopalliance-1.0.jar
constituent[7]: file:/C:/apache-maven-3.3.9/bin/../lib/cdi-api-1.0.jar
constituent[8]: file:/C:/apache-maven-3.3.9/bin/../lib/commons-cli-1.2.jar
constituent[9]: file:/C:/apache-maven-3.3.9/bin/../lib/commons-io-2.2.jar
constituent[10]: file:/C:/apache-maven-3.3.9/bin/../lib/commons-lang-2.6.jar
constituent[11]: file:/C:/apache-maven-3.3.9/bin/../lib/commons-lang3-3.4.jar
constituent[12]: file:/C:/apache-maven-3.3.9/bin/../lib/guava-18.0.jar
constituent[13]: file:/C:/apache-maven-3.3.9/bin/../lib/guice-4.0-no_aop.jar
constituent[14]: file:/C:/apache-maven-3.3.9/bin/../lib/javax.inject-1.jar
constituent[15]: file:/C:/apache-maven-3.3.9/bin/../lib/jsoup-1.7.2.jar
constituent[16]: file:/C:/apache-maven-3.3.9/bin/../lib/jsr250-api-1.0.jar
constituent[17]: file:/C:/apache-maven-3.3.9/bin/../lib/maven-aether-provider-3.3.9.jar
constituent[18]: file:/C:/apache-maven-3.3.9/bin/../lib/maven-artifact-3.3.9.jar
constituent[19]: file:/C:/apache-maven-3.3.9/bin/../lib/maven-builder-support-3.3.9.jar
constituent[20]: file:/C:/apache-maven-3.3.9/bin/../lib/maven-compat-3.3.9.jar
constituent[21]: file:/C:/apache-maven-3.3.9/bin/../lib/maven-core-3.3.9.jar
constituent[22]: file:/C:/apache-maven-3.3.9/bin/../lib/maven-embedder-3.3.9.jar
constituent[23]: file:/C:/apache-maven-3.3.9/bin/../lib/maven-model-3.3.9.jar
constituent[24]: file:/C:/apache-maven-3.3.9/bin/../lib/maven-model-builder-3.3.9.jar
constituent[25]: file:/C:/apache-maven-3.3.9/bin/../lib/maven-plugin-api-3.3.9.jar
constituent[26]: file:/C:/apache-maven-3.3.9/bin/../lib/maven-repository-metadata-3.3.9.jar
constituent[27]: file:/C:/apache-maven-3.3.9/bin/../lib/maven-settings-3.3.9.jar
constituent[28]: file:/C:/apache-maven-3.3.9/bin/../lib/maven-settings-builder-3.3.9.jar
constituent[29]: file:/C:/apache-maven-3.3.9/bin/../lib/org.eclipse.sisu.inject-0.3.2.jar
constituent[30]: file:/C:/apache-maven-3.3.9/bin/../lib/org.eclipse.sisu.plexus-0.3.2.jar
constituent[31]: file:/C:/apache-maven-3.3.9/bin/../lib/plexus-cipher-1.7.jar
constituent[32]: file:/C:/apache-maven-3.3.9/bin/../lib/plexus-component-annotations-1.6.jar
constituent[33]: file:/C:/apache-maven-3.3.9/bin/../lib/plexus-interpolation-1.21.jar
constituent[34]: file:/C:/apache-maven-3.3.9/bin/../lib/plexus-sec-dispatcher-1.3.jar
constituent[35]: file:/C:/apache-maven-3.3.9/bin/../lib/plexus-utils-3.0.22.jar
constituent[36]: file:/C:/apache-maven-3.3.9/bin/../lib/slf4j-api-1.7.5.jar
constituent[37]: file:/C:/apache-maven-3.3.9/bin/../lib/slf4j-simple-1.7.5.jar
constituent[38]: file:/C:/apache-maven-3.3.9/bin/../lib/wagon-file-2.10.jar
constituent[39]: file:/C:/apache-maven-3.3.9/bin/../lib/wagon-http-2.10-shaded.jar
constituent[40]: file:/C:/apache-maven-3.3.9/bin/../lib/wagon-http-shared-2.10.jar
constituent[41]: file:/C:/apache-maven-3.3.9/bin/../lib/wagon-provider-api-2.10.jar
constituent[42]: file:/C:/apache-maven-3.3.9/bin/../conf/logging/
---------------------------------------------------
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/sisu/inject/MutableBeanLocator
at org.apache.maven.cli.MavenCli.container(MavenCli.java:545)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:281)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.ClassNotFoundException: org.eclipse.sisu.inject.MutableBeanLocator
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 11 more
答案 0 :(得分:0)
您是否检查过它所说的文件不存在。 是否存在于所需的地方?
答案 1 :(得分:-1)
问题已解决,目前我正在使用3.3.9,现在我尝试使用3.3.3 Maven,它很好并且正常工作。
感谢每一位帮助过我的人。