Successful build in Maven still showing errors in Eclipse

前端 未结 18 1725
猫巷女王i
猫巷女王i 2020-12-24 07:04

I\'m having something quite peculiar here, my build is successful in maven when I type \"mvn clean install\" however once imported into Eclipse it\'s showing errors.

18条回答
  •  醉梦人生
    2020-12-24 07:31

    The other upvoted answers did not work for me using these versions:

    • Eclipse Neon
    • Maven 3
    • m2e 1.7

    This is what I had to do:

    1. Delete the Eclipse project from Eclipse interface (do not delete project contents on disk)
    2. Go to the project's root directory in a file explorer or terminal
    3. Delete these files: .classpath, .project, and .settings directory
    4. Back to Eclipse, File -> Import... -> Maven -> Existing Maven projects

提交回复
热议问题