Failed to execute goal org.codehaus.mojo:exec-maven-plugin

“Failed to execute goal org.codehaus.mojo:exec-maven-plugin”  throws by maven plugins. I start getting this error at the time when I was integrating my Java Application with Mulesoft API Manager. where I created one maven application using eclipse oxygen, JDK8 and Maven 3.3.9 as a complete development environment. After doing much Research and debugging I got the below solution for my case, please try following solution to come out of this…

Setting up the main class with Maven goal

  1. The main reason behind the application error is missing main class name. here I did not specify the main class name(run-time argument list) with “Maven Goal”. As you can see in below
  2. To solve this issue(“Failed to execute goal org.codehaus.mojo:exec-maven-plugin”),  do not forget to specify the main class name to run the goal. As given in below screenshotFailed to execute
  3. It resolved my application error.
  4. If you have multiple arguments to set with the application goal, add them by separating with space. As shown in below screenshot
    Failed to execute

  5. Regardless you can try some other solutions like –
    1. When you are developing any application check the compatibility of your development stack. Like JDK and Maven compatibility with your application package.
    2. Check the confusing punctuation while writing the goals. You can check here on AWS
    3. To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging.
    4. compile the project before you start running a project.

we are open for your suggestions because it can help us to improve a bit more.

Speak Your Mind