How do I get my Eclipse-Maven project to automatically update its classpath when I change a dependency in my pom.xml file?

前端 未结 5 2033
轻奢々
轻奢々 2020-12-01 14:36

I’m using Eclipse Mars with Maven (v 3.3). When I update a dependency in my pom (change the version), my Eclipse-Maven project doesn’t pick it up, even when I right click m

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-01 15:40

    What you wrote, should work. Did you check this:

    • does "pure" mvn install from terminal see your changes in POM?

    • maybe some Maybe plugin is buggy, cached some dependencies in target, and mvn clean install is needed

    • you can run Eclipse in a new workspace, and import your project there, sometimes it helps in case of such strange problems

    • instead of importing Maven project to Eclipse via m2eclipse, you can try to create Eclipse files via the old mvn eclipse:eclipse and see what happens then

    • does it work well when you try to import your Maven project to other IDE, the free IntelliJ Community Edition for example?

提交回复
热议问题