[jbosstools-dev] m2e/m2e-wtp Questions

Fred Bricon fbricon at redhat.com
Mon Dec 17 11:11:51 EST 2012


Le lundi 17 décembre 2012 10:42:20, Peter Palaga a écrit :
> Hi Fred & JBT-ers,
>
> Asking now what I have not managed to ask personally in Brno.
>
> (1) Is it safe to run an external (command line) maven command in a
> workspace folder? Something like
>
>   cd ~/workspace/gatein-portal
>   mvn clean install
>
> IIRC, about a year ago when I tried that last time, Eclipse was quite
> unhappy about it. I do not remember what the error messages were but
> since then I always rsync my workspace to /tmp/gatein-build and build
> there. Is it safe by design now?
>
My personnal experience is, it works in general, but  design as not 
changed, so I wouldn't expect it to work *reliably*. If you cleaned and 
recompiled your project, your classes will be out-of-sync with the 
workspace (this is not a m2e feature/bug but eclipse's behaviour). If 
you manually refresh your project, Eclipse will most likely promote the 
incremental build into a new full build. Now if you make eclipse 
refresh resources automatically (see workspace prefs), you might risk 
getting it recompiling your classes at the same time as they're being 
wiped by a CLI build, that could lead to unexpected behaviour.

> (2) Could perhaps "Maven > Update Project..." be run automatically
> when necessary?
> There are situations in which "Update Project" is proposed as the
> first quick fix. And it solves the problem indeed. Why does m2e not
> run it by itself if it already can detect quite reliably that it
> should be run?

Not sure it's a good idea. "Update project" triggers a new build. You 
*might* risk getting into an infinite loop. It's also a very slow 
process and sometimes is caused by false positives. That would really 
hamper build performance in general I think. Igor knows the build 
process way better than me so you might want to ask on m2e-dev ML to 
get a better answer.

>
> (3) Finding sources during debug. Could you please direct me to a web
> page or source file where the lookup sequence is
> documented/implemented? I'd like to have a chance to check it when I
> get "source not found" next time.
>
See 
https://community.jboss.org/en/tools/blog/2012/01/24/jboss-source-lookup

> Thanks in advance & best regards,
>
> Peter




More information about the jbosstools-dev mailing list