Kamlesh Sangani wrote:
what exactly does m2eclipse do during build? does it compile all sources/test sources? doesn't JDT compiler do this?

In 0.9.7 m2e configures projects with two builders, first, standard JDT Java builder, then m2e Maven builder. We obviously do not control Java behaviour, but Maven builder does the following

For full/clean, it executes configured goals. By default, it is "process-test-resources" so, yes, it will (re)compile all main classes. In most cases this is noop, since maven compiler only compiles classes when .java is newer then .class file.

For incremental build, it runs configured goals when there are changes to resources (as configured in build/resources element). Additionally, it is possible to tell Maven build to always skip compiler plugin.


In 0.9.8, we plan to allow more flexible mapping of maven lifecycle to eclipse. Current behaviour will still be used by default, but it will also be possible to define mappings optimized for specific project types or even individual projects. You can read more about 0.9.8 plain in

http://docs.codehaus.org/display/M2ECLIPSE/0.9.8+Plan


Also i see this behaviour which is different from maven cli build results.

i have compile error in some of my test code but when I do clean build m2eclipse ends without any error. - maven cli build fails if i change some test code ann run clean build m2eclipse ends with "Nothing to compile - all classes are up to date" message. - maven cli build compiles changes classes

I am not exactly sure what is the problem, but generally m2e (or any other eclipse-based tool) does not handle out-of-workspace changes too gracefully. From my experience, it is often necessary to both refresh from local filesystem and run full/clean build to get projects into consistent state after running "mvn clean install" on command line, for example.



------------------------------------------------------------------------
*From:* Kamlesh Sangani <xkamle...@yahoo.com>
*To:* user@m2eclipse.codehaus.org
*Sent:* Friday, March 13, 2009 3:16:36 PM
*Subject:* Re: [m2eclipse-user] Deafult build goal

Thanks.

Is there a way to set this goal for all projects?

------------------------------------------------------------------------
*From:* Igor Fedorenko <i...@ifedorenko.com>
*To:* user@m2eclipse.codehaus.org
*Sent:* Friday, March 13, 2009 2:08:03 PM
*Subject:* Re: [m2eclipse-user] Deafult build goal

Right-click in the project, Properties, Maven. There you can configure goals to execute on project clean and on resource change. You can also configure goals to execute on project import and project configuration update in Window, Preferences, Maven.

--
Regards,
Igor

Kamlesh Sangani wrote:
 > m2eclipse 0.9.6
 > eclipse 3.4.1
 >
> What's the default build goal for m2eclipse? I currently see it as process-test-resources. Is there a way to confgiure this?
 >


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to