Community
Participate
Working Groups
Steps to reproduce: 1) Create pre-Indigo maven project with an additional source folder, eg: 'src/main/webapp' 2) Check the project into svn source control 3 a) Check the project out (not as a maven project) and then run Configure -> Convert to Maven Project in the package explorer 3 b) Check the project out as as Maven Project via the scm connector (SVN in our case) Additional source resources from the classpath are missing. eg: <classpathentry kind="src" path="src/main/webapp"/>
So, in other words, you expect m2e to preserve custom (i.e. not created by m2e from pom.xml) java source folders to be preserved during project import and configuration update. Did I get this right?
No, you did not get it right. I would not expect m2e to take responsibility for retention of source folders. My concern is only with the .classpath file. From what I can tell, the .classpath file is completely overwritten. Other plugins also use the .classpath file I think that completely overwriting it is the wrong approach. Why not simply check for the needed components, if they're not there then add them? This seems like it would be a fairly trivial change, and would not really cost much in the way of performance either. This way you wouldn't have to worry about unnecessary removal. I hope this clears it up. Thanks for your help.
This is what I mean, you expect m2e to retain custom .classpath source folder entries (or maybe just all custom .classpath entries) during project import and configuration update. My only concern here is accumulation of stale .classpath entries created by m2e because there is currently no way to if .classpath entry was created by m2e or not. But this is an implementation detail ;-)
Would submitting a patch expedite this?
(In reply to comment #4) > Would submitting a patch expedite this? Yes, it would. Beware, though, that Indigo RC1 is pretty much done at this point and we do not plan to make official releases until Juno.
This is implemented (see [1] and corresponding tests [2]) and I plan to integrate this soon after Juno M2 build next week. [1] http://git.eclipse.org/c/m2e/m2e-core.git/log/?h=353266-custom-classpath-entries [2] https://github.com/sonatype/m2e-core-tests/tree/353266-custom-classpath-entries
the changes have been merged to master.
Moved to https://github.com/eclipse-m2e/m2e-core/issues/