Maven does not add classpath to Eclipse project

前端 未结 7 2031
旧时难觅i
旧时难觅i 2020-12-15 03:37

I have a maven project, that I\'m working on Eclipse.

I use maven eclipse:eclipse to generate the classpath, but ... it NEVER adds the classpath on the eclipse proj

7条回答
  •  醉酒成梦
    2020-12-15 04:17

    This is relying on m2eclipse. When you do that, all your dependencies are handled by maven/m2eclipse, so your .classpath becomes very minimal.

    In term of project architecture, you want one eclipse project per maven pom. Each project .classpath contains only the sources, JRE and maven injection:

    
    
        
        
        
        
        
        
    
    

    (adjust depending where your sources are).

    I suspect your many errors come from duplicate entries in the dependencies because you inject them both manually (additional .classpath entries) and through maven.

    You'll also want to verify local workspace resolution in m2eclipse are enabled (should be on by default).

提交回复
热议问题