0

I am getting the following error when running mvn clean test:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/maven/plugin/MojoExecutionException

It's not happening on my development team they say they are running the command just fine.

I've checked the JAVA_HOME and JRE_HOME environments, both fine.

I'm using maven version 3.6.3 and Java version 1.8.0_144

Not sure what to do at this point. This project was installed using IntelliJ git clone

  • Possible duplicate of https://stackoverflow.com/questions/5797860/maven-noclassdeffounderror-in-the-main-thread – pedram bashiri Apr 13 '20 at 20:34
  • Please post the full log file and the pom.xml. Furthermore do you build it with the bundled maven from IntelliJ or from command line? – Johannes Stadler Apr 13 '20 at 20:58
  • Check out https://stackoverflow.com/questions/53800797/error-upon-mvn-clean-install-mojoexecutionexception and https://stackoverflow.com/questions/23235430/maven-mojoexecutionexception – hagrawal7777 Apr 13 '20 at 20:58

2 Answers2

0

IntelliJ could use a bundled maven version, which could be different from the system/user one. Have you already checked settings of the IDE?

The problem could be related to different option, maybe a log could help more. Be sure that all the dependencies and plugins are downloaded without any problems. In the past I had same issue and it was related to the proxy settings for the download.

sigur
  • 662
  • 6
  • 21
0

Something was wrong with the maven donwload. I remapped the environment settings to use the intellij maven and everything worked great.