有谁知道以下异常意味着什么,或者我应该如何开始调试或调查它?我觉得它很神秘。我认为这意味着我在我的pom.xml中缺少Maven依赖,但我不能为我的生活找到解决方法。
此致
Caused by: hudson.maven.MavenEmbedderException: java.util.NoSuchElementException
role: org.apache.maven.execution.MavenExecutionRequestPopulator
roleHint:
at fitnesse.wikitext.widgets.DependencyResolvingMavenEmbedder.<init>(DependencyResolvingMavenEmbedder.java:84)
at fitnesse.wikitext.widgets.DependencyResolvingMavenEmbedder.<init>(DependencyResolvingMavenEmbedder.java:64)
at fitnesse.wikitext.widgets.DependencyResolvingMavenEmbedder.<init>(DependencyResolvingMavenEmbedder.java:90)
at fitnesse.wikitext.widgets.MavenClasspathExtractor.mavenConfiguration(MavenClasspathExtractor.java:80)
at fitnesse.wikitext.widgets.MavenClasspathExtractor.extractClasspathEntries(MavenClasspathExtractor.java:32)
... 25 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
role: org.apache.maven.execution.MavenExecutionRequestPopulator
roleHint:
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:247)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:235)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:229)
at fitnesse.wikitext.widgets.DependencyResolvingMavenEmbedder.lookup(DependencyResolvingMavenEmbedder.java:522)
at fitnesse.wikitext.widgets.DependencyResolvingMavenEmbedder.buildMavenExecutionRequest(DependencyResolvingMavenEmbedder.java:107)
at fitnesse.wikitext.widgets.DependencyResolvingMavenEmbedder.<init>(DependencyResolvingMavenEmbedder.java:74)
... 29 more
Caused by: java.util.NoSuchElementException
at org.sonatype.guice.plexus.locators.RealmFilter$FilteredItr.next(RealmFilter.java:100)
at org.sonatype.guice.plexus.locators.RealmFilter$FilteredItr.next(RealmFilter.java:58)
at org.sonatype.guice.plexus.locators.DefaultPlexusBeans$Itr.next(DefaultPlexusBeans.java:64)
at org.sonatype.guice.plexus.locators.DefaultPlexusBeans$Itr.next(DefaultPlexusBeans.java:52)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:243)
... 34 more
当我使用-X运行Maven时,在异常之前稍微获取一些额外的信息,如下所示:
Created new class realm plugin>eg.example:artifact:1.0.0-SNAPSHOT
Importing foreign packages into class realm plugin>eg.example:artifact:1.0.0-SNAPSHOT
Imported: < maven.api
Populating class realm plugin>eg.example:artifact:1.0.0-SNAPSHOT
然后它列出了包含的一大堆依赖项,例如:
Included: bouncycastle:bcprov-jdk15:jar:135
Included: mx4j:mx4j-tools:jar:3.0.1
Included: org.mortbay.jetty:servlet-api-2.5:jar:6.1.9
Included: net.jcip:jcip-annotations:jar:1.0
然后它列出了一大堆被排除的依赖项。我认为需要这些依赖项中的一部分。我如何将它们包含在内?他们为什么被排除?这里有什么逻辑?
Excluded: org.apache.maven:maven-compat:jar:3.0.1
Excluded: org.apache.maven:maven-model-builder:jar:3.0.1
Excluded: org.apache.maven:maven-aether-provider:jar:3.0.1
Excluded: org.sonatype.aether:aether-api:jar:1.8
Excluded: org.sonatype.aether:aether-spi:jar:1.8
Excluded: org.sonatype.aether:aether-impl:jar:1.8
Excluded: org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-7
Excluded: org.apache.maven:maven-plugin-api:jar:3.0.4
Excluded: org.apache.maven:maven-model:jar:3.0.4
Excluded: org.apache.maven:maven-artifact:jar:3.0.4
Excluded: org.sonatype.sisu:sisu-inject-plexus:jar:2.3.0
Excluded: org.codehaus.plexus:plexus-classworlds:jar:2.4
Excluded: org.apache.maven:maven-project:jar:2.0.9
Excluded: org.apache.maven:maven-settings:jar:2.0.9
Excluded: org.apache.maven:maven-profile:jar:2.0.9
Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.9
Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.9
Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
Excluded: org.apache.maven:maven-core:jar:2.0.9
Excluded: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9
Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.9
Excluded: org.apache.maven:maven-error-diagnostics:jar:2.0.9
Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.0.9
Excluded: org.apache.maven:maven-monitor:jar:2.0.9
Excluded: classworlds:classworlds:jar:1.1
Excluded: org.apache.maven:maven-toolchain:jar:2.0.9