Trying to understand how to work with Maven and Eclipse
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.
精彩评论