To bring project up to date when adding source directories, try selecting the following menu item from the contextual menu (right-click on your project in the Package Explorer):
Maven => Update Project Configuration This will synch up the source folders with the Eclipse classpath. David C. Hicks wrote: > > OK, I installed m2eclipse and it seems happy with my project. I was able > to go through the POM editor and update a lot of information that > previously wasn't there. Very cool. > > Problem: I still don't see it picking up new source folders. If I add a > source folder in Eclipse, how does that end up in the pom.xml to somehow > be included in a production and/or test build? I see a spot to enter > source folders in the POM editor, but it is unclear how to actually > enter them. > > Am I missing something? > > Thanks again! > Dave > > PS - for those who recommended Q4E, I'm looking at it, too, but from > what I can tell it seems that m2eclipse is way ahead in terms of fit and > finish. That's just a first impression, though. > > > Stevo Slavic' wrote: >> Hello David, >> >> Just as Klaus said, use m2eclipse plugin. After installing it, I'd first >> manually create a folder in eclipse workspace, named as your root maven >> project artifactId, then copy root POM and rest of the project structure >> you've created into that new folder. Finally, with m2eclipse plugin you >> could just "File-->Import...-->General-->Maven Projects" and >> select/browse >> to newly created folder, leaving m2eclipse do the rest. >> >> Regards, >> Stevo. >> >> On Fri, Sep 19, 2008 at 11:24 PM, Klaus <[EMAIL PROTECTED]> wrote: >> >> >>> Have a look at http://m2eclipse.codehaus.org . It's a eclipse plugin >>> that >>> updates the project settings according to the setting in the pom.xml. No >>> (re)generate of eclipse-project files, no problem with new source >>> folders.. >>> >>> klaus >>> >>> On Fri, Sep 19, 2008 at 11:17 PM, David C. Hicks <[EMAIL PROTECTED]> >>> wrote: >>> >>> >>>> I'm beginning a new, fairly large, project. Eclipse will be our >>>> development platform, but I've already set up the starting point in >>>> >>> Maven. >>> >>>> Simple enough. Now, my question is, how can I keep them in sync, >>>> >>> easily? >>> >>>> I realize that it's best to re-run "mvn eclipse:eclipse" after adding >>>> dependencies, but what about source folders? I need to add new source >>>> folders, but Maven doesn't know anything about that, so the next time I >>>> re-generate the .project/.classpath files, it'll revert back to those >>>> folders not being "source" folders. >>>> >>>> Any help how to make this behave? >>>> Thanks, >>>> Dave >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>>> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Maven-Eclipse---Keeping-them-in-sync--tp19579618p19582428.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]