• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

maven and eclipse

 
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
at work we do a lot of generated code, and suffer lots of recursive build hell, where eclipse decides everything needs rebuilding immediatly after the last build in a continual loop.

Everything I have read says that eclipse and maven are not happy bedfellows, so am considering giving up.

my question is this... is there a dowside to this?
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you've got sufficient complexity in your build environment to get into situations like that, the last thing I'd be considering would be to move from a disciplined build environment like Maven to an ad-hoc one. Especially just to make an IDE happy. One of the reasons I'm so big on UI-free build processes like Ant and Maven is that GUI-based builders come and go, but the text-based stuff is more stable. And stability is critical in a large business environment.

I'd consider turning off the Eclipse auto-build instead. Which I've done on occasion when Eclipse got its wires excessively crossed.

However, since recent versions of Eclipse have been better behaved in that area (just don't ask me my opinions about its XML/HTML editors ), if I were you, I'd map out the Maven inter-dependencies and ensure that they weren't truly circular. Because if they are, you can't reliably build everything from scratch on a cold machine. And that's the kind of stuff that makes me nervous.
 
Wendy L Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oh no they aren't really circular, somedays it just works. There are people here much cleverer than me trying to get the eclipse m2e pulgins working properly, but somedays they just don't.

My intention was just to get a clean eclipse without maven, and use the command line for all the maven stuff, then refresh eclipse when i need to. I know it isn't ideal but i think i got about 15 -2 days actual work done last week (i work full time).
and because of the build problems we are trying to only have the fewest projects open at once, and all the thrashing is adding to the problems, making jboss unhappy (projects go missing from the deployment assembly).
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I doubt the problem is with eclipse2me, which is mostly driving background batch. The problem is typically when Eclipse tries to sync up with the out-of-band changes. That's assuming that you don't have Eclipse set up to run Maven automatically on changes. I don't. Because even without circularity the overhead would be unspeakable.

As a completely tangential observation, one thing I've noticed is that the places in a project that "should" be consuming the most time (the "hard" parts) are often much, much easier than expected. But the savings get totally eaten up by fights with the tools, miscapitalized/mispunctuated code that takes 3 days and 4 people to detect, etc.
 
Wendy L Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


That's assuming that you don't have Eclipse set up to run Maven automatically on changes.



oh yes we do, so when we change one of the xml definition files it goes off and magically generates all the changed files, then compiles everything else that might be affected by that change.

see the scope for horribleness.
How do we turn this off?
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I never figured out how to turn it on, myself. I didn't want to.

Out of the box, Maven will run itself (after a fashion) when you change dependencies in the POM, but that doesn't do much; to get them to "take", I actually run Maven from a command prompt.

To actually make maven select and run a goal(s) on source changes, requires that someone set up some additional build characteristics in the Eclipse workspace, as far as I know.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try unchecking the 'Build Automatically' setting at Window > Preferences > General > Workspace, that should prevent the build cycle from starting up after every save.
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Peter Johnson wrote:Try unchecking the 'Build Automatically' setting at Window > Preferences > General > Workspace, that should prevent the build cycle from starting up after every save.



There's more to it than that, though. I have automatic build enabled, but that doesn't run Maven. Methinks someone has added some extra builders to the standard set.
 
Wendy L Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oh yes, the idea is that we all build exactly the same way, the developers in eclipse, thejenkins build, the kitting build etc. So I don't think there is a single shred of original eclipse build left.
reply
    Bookmark Topic Watch Topic
  • New Topic