Search code examples
maven-3m2eclipse

How to use Maven with m2e?


I have the following lines which I want to execute

mvn dependency:sources
mvn dependency:resolve -Dclassifier=javadoc

How can I use m2e in Eclipse to achieve it ?


Solution

  • Try this:

    1. Right-click on your project pom.xml
    2. Choose Run as -> Maven Build
    3. It will open up a pop-up
    4. Type your goal in the Goals:

    Or alternately, to set up a Eclipse Run Configurations:

    1. Go to Run menu
    2. Choose Run Configurations -> Maven Build
    3. Double-click it to create a new Maven Build Run configuration:
    4. Give your new configuration a name, specify your project root directory as its workspace
    5. And set your goal and add parameters in the appropriate sections.