Kent Närling wrote:
Hi,
I am new to this mailing list, so excuse me if this question is old...
(I did search the mailing list though)
We have just started using maven and m2eclipse, but one issue that is
annoying is with generated-sources not being refreshed properly
automatically, not when checking out or when changing the files
generating the sources (right now mostly XSD files compiled by JAXB
compiler).
I have tried to configure this in eclipse with builders and refresh
setting, but not managed to get it working nicely (you have to manually
refresh and "fiddle" etc before it builds without errors)
Anyone else had more success with this?
Unfortunately, m2eclipse can't detect if/when source generation is
necessary, because Maven does not provide APIs to support this. You have
to manually clean the project (i.e. Project menu, Clean...) to
regenerate the sources. This is not pretty, so ideas/suggestions how to
improve this are welcome and appreciated.
Also, irritatingly, when I check out , many times Eclipse simply
modifies the classpath file and removes the reference to generated
sources!! (maybe because the folder does not exist before running the
build?) In this case, I always have to sync and then select "Override
and update"...
Do you use "Checkout Maven projects from SCM" as described in [1] or use
something else? Does setting Goals to run on project import to
"process-test-resources" in Window->Preferences->Maven make it work better?
I have not always used "Create maven project", maybe this is part of the
issue? many of the projects were simply converted to maven by adding a
pom file and doing "maven->Enable dependency management", is there a
better recommendation regarding migrating projects?
For projects that already have pom.xml file, I find using one of maven
import wizard (see [1]) more convenient, but "maven->Enable dependency
management" should work too.
[1] http://docs.codehaus.org/display/M2ECLIPSE/Importing+Maven+projects
--
Regards,
Igor
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email