How to build and run Maven projects after importing into Eclipse IDE

前端 未结 7 1519
时光取名叫无心
时光取名叫无心 2020-12-02 09:35

I am learning building a Java project in Eclipse using Maven. I created a Java project HelloWorld from
“maven-archetype-quickstart” template in a folder

7条回答
  •  眼角桃花
    2020-12-02 10:01

    When you add dependency in pom.xml , do a maven clean , and then maven build , it will add the jars into you project.

    You can search dependency artifacts at http://mvnrepository.com/

    And if it doesn't add jars it should give you errors which will mean that it is not able to fetch the jar, that could be due to broken repository or connection problems.

    Well sometimes if it is one or two jars, better download them and add to build path , but with a lot of dependencies use maven.

提交回复
热议问题