I'm working on a Maven project, and after resolving many configuration problems, finally I am able to build the project successfully in Eclipse. After selecting maven install and seeing build success, a .jar artifact is now created in the target folder.

OK. Now as for the execution, instead of manually running the .jar in command line (java -jar myJarFile.jar), how can I automatically run it inside Eclipse?


Use the exec-maven-plugin the run the java launcher with the jar argument during the integration-test phase:


In Eclipse, right click, select Run As and choose Maven Test to run it.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.