我现在有一个maven问题。我创建了一个新的测试项目来简化这个问题:
错误可能是:
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.util.cli.CommandLineException
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
... 59 more
字符串
-v给我:
Apache Maven 3.0.4(r1232337; 2012-01-17 09:44:56+0100)Maven home:/home/ubuntu/ubuntu/projectx/test/EMBEDDED Java version:1.7.0_21,vendor:Oracle Corporation Java home:/usr/lib/jvm/java-7-openjdk/jre Default locale:de_DE,platform encoding:UTF-8 OS name:“Linux”,version:“3.0.0-32-generic”,arch:“amd 64”,家族:“unix”
pom是:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
型
这给了我:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building test 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ test ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ test ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.170s
[INFO] Finished at: Wed Nov 06 22:21:53 CET 2013
[INFO] Final Memory: 6M/115M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project test: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile failed: A required class was missing while executing org.apache.maven.plugins:maven-compiler-plugin:3.0:compile: org/codehaus/plexus/util/cli/CommandLineException
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-compiler-plugin:3.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/username/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/3.0/maven-compiler-plugin-3.0.jar
[ERROR] urls[1] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
[ERROR] urls[2] = file:/home/username/.m2/repository/org/apache/maven/shared/maven-shared-utils/0.1/maven-shared-utils-0.1.jar
[ERROR] urls[3] = file:/home/username/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
[ERROR] urls[4] = file:/home/username/.m2/repository/org/apache/maven/shared/maven-shared-incremental/1.0/maven-shared-incremental-1.0.jar
[ERROR] urls[5] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[6] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-api/2.0/plexus-compiler-api-2.0.jar
[ERROR] urls[7] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/2.0/plexus-compiler-manager-2.0.jar
[ERROR] urls[8] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.0/plexus-compiler-javac-2.0.jar
[ERROR] urls[9] = file:/home/username/.m2/repository/org/apache/xbean/xbean-reflect/3.4/xbean-reflect-3.4.jar
[ERROR] urls[10] = file:/home/username/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
[ERROR] urls[11] = file:/home/username/.m2/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
[ERROR] urls[12] = file:/home/username/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar
[ERROR] urls[13] = file:/home/username/.m2/repository/junit/junit/3.8.2/junit-3.8.2.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.codehaus.plexus.util.cli.CommandLineException
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
型
使用-X添加:
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /home/username/workspaces/projectX43/test/EMBEDDED
Java version: 1.7.0_21, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "3.0.0-32-generic", arch: "amd64", family: "unix"
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from EMBEDDED/conf/settings.xml
[DEBUG] Reading user settings from /home/username/.m2/settings.xml
[DEBUG] Using local repository at /home/username/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for /home/username/.m2/repository
[INFO] Scanning for projects...
[..... (Limit of 30000 would be exceeded so I left it out) .....]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project test: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile failed: A required class was missing while executing org.apache.maven.plugins:maven-compiler-plugin:3.0:compile: org/codehaus/plexus/util/cli/CommandLineException
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-compiler-plugin:3.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/username/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/3.0/maven-compiler-plugin-3.0.jar
[ERROR] urls[1] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
[ERROR] urls[2] = file:/home/username/.m2/repository/org/apache/maven/shared/maven-shared-utils/0.1/maven-shared-utils-0.1.jar
[ERROR] urls[3] = file:/home/username/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
[ERROR] urls[4] = file:/home/username/.m2/repository/org/apache/maven/shared/maven-shared-incremental/1.0/maven-shared-incremental-1.0.jar
[ERROR] urls[5] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[6] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-api/2.0/plexus-compiler-api-2.0.jar
[ERROR] urls[7] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/2.0/plexus-compiler-manager-2.0.jar
[ERROR] urls[8] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.0/plexus-compiler-javac-2.0.jar
[ERROR] urls[9] = file:/home/username/.m2/repository/org/apache/xbean/xbean-reflect/3.4/xbean-reflect-3.4.jar
[ERROR] urls[10] = file:/home/username/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
[ERROR] urls[11] = file:/home/username/.m2/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
[ERROR] urls[12] = file:/home/username/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar
[ERROR] urls[13] = file:/home/username/.m2/repository/junit/junit/3.8.2/junit-3.8.2.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.codehaus.plexus.util.cli.CommandLineException
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project test: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile failed: A required class was missing while executing org.apache.maven.plugins:maven-compiler-plugin:3.0:compile: org/codehaus/plexus/util/cli/CommandLineException
-----------------------------------------------------
realm = plugin>org.apache.maven.plugins:maven-compiler-plugin:3.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/home/username/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/3.0/maven-compiler-plugin-3.0.jar
urls[1] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
urls[2] = file:/home/username/.m2/repository/org/apache/maven/shared/maven-shared-utils/0.1/maven-shared-utils-0.1.jar
urls[3] = file:/home/username/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
urls[4] = file:/home/username/.m2/repository/org/apache/maven/shared/maven-shared-incremental/1.0/maven-shared-incremental-1.0.jar
urls[5] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[6] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-api/2.0/plexus-compiler-api-2.0.jar
urls[7] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/2.0/plexus-compiler-manager-2.0.jar
urls[8] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.0/plexus-compiler-javac-2.0.jar
urls[9] = file:/home/username/.m2/repository/org/apache/xbean/xbean-reflect/3.4/xbean-reflect-3.4.jar
urls[10] = file:/home/username/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
urls[11] = file:/home/username/.m2/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
urls[12] = file:/home/username/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar
urls[13] = file:/home/username/.m2/repository/junit/junit/3.8.2/junit-3.8.2.jar
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[maven.api, parent: null]]
-----------------------------------------------------
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile failed: A required class was missing while executing org.apache.maven.plugins:maven-compiler-plugin:3.0:compile: org/codehaus/plexus/util/cli/CommandLineException
-----------------------------------------------------
realm = plugin>org.apache.maven.plugins:maven-compiler-plugin:3.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/home/username/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/3.0/maven-compiler-plugin-3.0.jar
urls[1] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
urls[2] = file:/home/username/.m2/repository/org/apache/maven/shared/maven-shared-utils/0.1/maven-shared-utils-0.1.jar
urls[3] = file:/home/username/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
urls[4] = file:/home/username/.m2/repository/org/apache/maven/shared/maven-shared-incremental/1.0/maven-shared-incremental-1.0.jar
urls[5] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[6] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-api/2.0/plexus-compiler-api-2.0.jar
urls[7] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/2.0/plexus-compiler-manager-2.0.jar
urls[8] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.0/plexus-compiler-javac-2.0.jar
urls[9] = file:/home/username/.m2/repository/org/apache/xbean/xbean-reflect/3.4/xbean-reflect-3.4.jar
urls[10] = file:/home/username/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
urls[11] = file:/home/username/.m2/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
urls[12] = file:/home/username/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar
urls[13] = file:/home/username/.m2/repository/junit/junit/3.8.2/junit-3.8.2.jar
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[maven.api, parent: null]]
-----------------------------------------------------
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing while executing org.apache.maven.plugins:maven-compiler-plugin:3.0:compile: org/codehaus/plexus/util/cli/CommandLineException
-----------------------------------------------------
realm = plugin>org.apache.maven.plugins:maven-compiler-plugin:3.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/home/username/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/3.0/maven-compiler-plugin-3.0.jar
urls[1] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
urls[2] = file:/home/username/.m2/repository/org/apache/maven/shared/maven-shared-utils/0.1/maven-shared-utils-0.1.jar
urls[3] = file:/home/username/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
urls[4] = file:/home/username/.m2/repository/org/apache/maven/shared/maven-shared-incremental/1.0/maven-shared-incremental-1.0.jar
urls[5] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[6] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-api/2.0/plexus-compiler-api-2.0.jar
urls[7] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/2.0/plexus-compiler-manager-2.0.jar
urls[8] = file:/home/username/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.0/plexus-compiler-javac-2.0.jar
urls[9] = file:/home/username/.m2/repository/org/apache/xbean/xbean-reflect/3.4/xbean-reflect-3.4.jar
urls[10] = file:/home/username/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
urls[11] = file:/home/username/.m2/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
urls[12] = file:/home/username/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar
urls[13] = file:/home/username/.m2/repository/junit/junit/3.8.2/junit-3.8.2.jar
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[maven.api, parent: null]]
-----------------------------------------------------
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:125)
... 20 more
Caused by: java.lang.NoClassDefFoundError: org/codehaus/plexus/util/cli/CommandLineException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)
at java.lang.Class.getDeclaredConstructors(Class.java:1855)
at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)
at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:98)
at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:629)
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:831)
at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:758)
at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:255)
at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:204)
at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:954)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:987)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:950)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1000)
at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:45)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:84)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:52)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
at org.sonatype.guice.plexus.lifecycles.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:138)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:108)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1018)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:965)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1011)
at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:961)
at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:83)
at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:49)
at java.util.AbstractMap.get(AbstractMap.java:182)
at org.codehaus.plexus.compiler.manager.DefaultCompilerManager.getCompiler(DefaultCompilerManager.java:54)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:384)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:118)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.util.cli.CommandLineException
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
... 59 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
型
谢谢你的帮助
7条答案
按热度按时间bsxbgnwa1#
我在使用chronos插件时也遇到了类似的问题,通过向插件添加plexus-utils依赖项解决了这个问题。
字符串
我没有这个问题与编译器插件,但这可能会为它工作。
9avjhtql2#
你应该知道maven-compiler-plugin的“active / current”版本。
请参阅:http://maven.apache.org/plugins/注意,今天的maven-compiler-plugin版本是在3.6.1中,这种方式可以更改此值。
将您的maven插件更改为:
字符串
原因:每次运行maven compile插件时,都会使用Maven中央存储库重新索引,因此必须不断更新此版本。
注意:不要包含对“丛”的依赖,这是不必要的。
5lhxktic3#
你只是缺少了一个jar文件。这可以通过maven轻松添加,方法是添加以下依赖项(在标记之前的pom.xml文件中):
字符串
jtoj6r0c4#
我得到这个是因为C驱动器上的内存不足.清理并允许依赖项成功下载:)
kxxlusnw5#
我得到这个是因为maven仓库文件被锁定了!我不能操作这个文件!但是我不知道为什么?然后我删除了仓库文件,然后--> Maven重新导入。它工作了!这可能对你有帮助!
bbuxkriu6#
也许这可以帮助... java.lang.NoClassDefFoundError: org/codehaus/plexus/util/cli/CommandLineException #420
字符串
jslywgbw7#
删除
./m2/wrapper
帮助了我。