Well, it goes like this: Eclipse Basics - When you create a project in Eclipse, two files are created by Eclipse in the project's subdirectory: .project and .classpath. These files are used by Eclipse to "understand" your project: it's type (e.g. Java), the classpath entries, etc.
M2E is a plugin for Eclipse. When you first open a Maven project in Eclipse (File->Import->Existing Maven Project), M2E generates those files Eclipse works with (.project, and .classpath), and fill them with the info tapped in the pom.xml: Dependencies are translated into classpath entries, source directories (src/main/java, src/main/resources) are translated into source directories as Eclipse understands them. Thus each time you update your pom, M2E wakes up and updates the .project and .classpath accordingly. Thus, if you are missing a Class, it means you need to add <dependency> in your pom.xml. Of course you need to make sure the dependencies you need for compilation does not have <scope> which is "test". -- Asaf Mesika Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On יום שישי 19 אוגוסט 2011 at 16:42, Ruttenberg, Tanya Contractor wrote: > I am new to maven, but not particularly new to eclipse. > > When I get errors such as “<ClassName> cannot be resolved to a type” is the > solution to add a project or library to the project’s Build Path or to add a > dependancy to the POM? > > I’m unclear on how much eclipse “understands” what is in the POM. > Can someone elaborate on this? > TDR > > > > _______________________________________________ > m2e-users mailing list > [email protected] (mailto:[email protected]) > https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________ m2e-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/m2e-users
