How to run maven project in eclipse

13,432

To build a maven project in eclipse

  1. In Eclipse, Run -> Run Configuration
  2. Right click on Maven and select New
  3. Enter Name, select base directory of your maven project
  4. Enter Goal as "clean install"(or yours options)
  5. Click on Apply and Run

There are some possible changes are there for build failure because of tool.jar not found and Reference here

Share:
13,432
khris
Author by

khris

Updated on June 05, 2022

Comments

  • khris
    khris almost 2 years

    I have maven project on Java with TestNG. I want to run it from eclipse. I use Eclipse Kepler and have installed m2eclipse plugin. But there is no any option connected with maven in menu Run as... Could someone help me with such issue. How should I run maven project in eclipse?

    • Tony
      Tony almost 10 years
      Maven is use for dependency management or building project, what do you mean by run maven project ? run a build ? or launch the project execution ?
    • Tony
      Tony almost 10 years
      You can click on run configurations... and create a new maven build, or right click on the pom.xml and run maven build, it will create a new run configuration automatically
    • Andrew_Dublin
      Andrew_Dublin almost 10 years
      As @Tony mentioned. You need to create a new maven build. Your question is very hard to understand. Try edit that and write that in details.It will allows us to understand and answer. If you have problems to describe problem, just attach screenshots.