开发者

Trying to understand how to work with Maven and Eclipse

开发者 https://www.devze.com 2023-03-19 06:14 出处:网络
I import a project into eclipse from svn and then go and run \'mvn install\' from the command line and everything compiles fine. But I don\'t understand why the c开发者_Go百科ode is not compiled in Ec

I import a project into eclipse from svn and then go and run 'mvn install' from the command line and everything compiles fine. But I don't understand why the c开发者_Go百科ode is not compiled in Eclipse too.

From my previous experience I know that I need to go ahead in Eclipse and import "existing maven projects" to have Eclipse compile the code, I just don't understand why.

Thanks!


How have you imported the projects to Eclipse? By runnint mvn eclipse:eclipse to import them as 'Java project' or importing the maven projects directly with the m2eclipse plugin?

By default maven builds each project into a directory target in each project whereas Eclipse builds into eclipse-out. mvn install builds each maven project to create an archive (jar, war, ear etc) whereas Eclipse needs to build to be able to run the code in Eclipse.

0

精彩评论

暂无评论...
验证码 换一张
取 消