cancel
Showing results for 
Search instead for 
Did you mean: 

Run "mvn test" failed: Unable to load the mojo 'test' (or one of its required components)

SOLVED
Highlighted
Contributor

Run "mvn test" failed: Unable to load the mojo 'test' (or one of its required components)

I try to run command like "mvn -B -f ./pom.xml test" but got error message like below:

 

[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

 

 

But this command can work well on my another machine, and it also all pass when I try it with SoapUIPro software but not command, I can't figure out what's wrong with my pom.xml, is there anything I have missed in my pom dependencies?

 

Really need some help, thanks a lot.

 

Screenshots like below:

TIM截图20190601225936.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Contributor

No, Looks Lucian's reply not works for me. But I finally got the solution by downgrade JDK from 9 to 1.8, here is the link I have referenced: https://community.smartbear.com/t5/SoapUI-Open-Source/POM-file-for-SoapUI-5-4-0/m-p/176709

 

123456.png

View solution in original post

5 REPLIES 5
Highlighted
Community Hero

Hey,

 

I'll give it a shot. Can you please upload your pom file?



If my answer helped please click on the 'Accept as Solution' button.
Highlighted
Contributor

uploaded.

Highlighted
Community Hero

The phase in the execution node should be integration-test and not test.



If my answer helped please click on the 'Accept as Solution' button.
Highlighted
Moderator

Hi all,

 

@Lucian, thanks for looking into this!

@白夜有点黑 , did Lucian's reply help you accomplish the task?



Olga Terentieva
SmartBear Assistant Community Manager

Highlighted
Contributor

No, Looks Lucian's reply not works for me. But I finally got the solution by downgrade JDK from 9 to 1.8, here is the link I have referenced: https://community.smartbear.com/t5/SoapUI-Open-Source/POM-file-for-SoapUI-5-4-0/m-p/176709

 

123456.png

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get a full Raw JMS request

Participate!

Compare an expected JSON value and actual response in Events

Participate!

Fetch value/data from JSON response using Groovy Script

See replies!

Get data from Petstore and add it to Excel sheets

Participate!
Top Kudoed Authors