Maven “运行”;mvn测试“;失败:无法加载mojo';测试';(或其所需组件之一)
我尝试运行类似“mvn-B-f./pom.xml test”的命令,但得到如下错误消息:Maven “运行”;mvn测试“;失败:无法加载mojo';测试';(或其所需组件之一),maven,soapui,pom.xml,Maven,Soapui,Pom.xml,我尝试运行类似“mvn-B-f./pom.xml test”的命令,但得到如下错误消息: [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.676
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.676 s
[INFO] Finished at: 2019-06-01T20:27:24+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.smartbear.soapui:soapui-pro-maven-plugin:5.1.2:test (default) on project apitest-hfa: Execution default of goal com.smartbear.soapui:soapui-pro-maven-plugin:5.1.2:test failed: Unable to load the mojo 'test' (or one of its required components) from the plugin 'com.smartbear.soapui:soapui-pro-maven-plugin:5.1.2': java.util.NoSuchElementException
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: com.smartbear.soapui:soapui-pro-maven-plugin:5.1.2:test
[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
但是这个命令可以在我的另一台机器上很好地工作,而且当我使用SoapUIPro软件而不是command尝试它时,它也可以通过。,我无法找出pom.xml的错误,我的pom依赖项中有什么遗漏的吗
真的需要一些帮助,非常感谢
截图如下:
尝试添加依赖项列表中缺少的以下内容-
<dependencies>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.9-RC1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.10-FINAL</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.5.6</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.8.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.5</version>
</dependency>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>forms</artifactId>
<version>1.2.1</version>
</dependency>
</dependencies>
组织反思
反思
0.9.9-RC1
org.apache.poi
poi ooxml
3.10-决赛
朱尼特
朱尼特
4.12
测试
org.codehaus.groovy
groovy all
2.5.6
聚甲醛
运行时
org.apache.commons
commons-lang3
3.8.1
运行时
org.codehaus.plexus
尾丛
3.0.5
com.jgoodies
形式
1.2.1
org.codehaus.plexus
可以解决这个问题
如果可能的话,你能分享你的
pom
文件吗,这样更容易识别 如果它在其他机器上工作,则可能与您的环境有关。如果您熟悉docker,您是否可以尝试在容器中执行命令(只是为了确保它在容器之类的干净环境中工作),或者在干净的VM中执行命令。无论如何,你能用一个较小的例子重现这个问题,并将pom.xml
作为文本(而不是图像)共享吗?你使用的是许可的吗?你需要发布你的soapui pro maven插件配置的其余部分。从提供的信息来看,这只是很多猜测。看起来它与JDK版本相关,请参见此处: