Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to work efficiently with large Maven-project workspace in Eclipse?

I'm working on a large multi-module Maven-based system, with some 20 sub-modules and an additional small number of project-external dependencies that are also Maven projects in my Eclipse workspace. All in all, there are some 30 projects in the Eclipse workspace.

The projects are all imported maven projects with m2e, and we use Subversion (with Subversive plugin) for source control. Eclipse is a recently updated Kepler.

My workstation is quite capable, with 4-core Intel i7 CPU, 16 Gb RAM, and a solid-state disk.

The problem is that Eclipse is very slow when it comes to:

  1. Team synchronize and conflict resolution. Each time I fix a conflict and "Mark as merged", I have to wait 10-30 seconds for Eclipse to refresh workspace etc. Not to mention that the conflict-mode tree view then clears entirely, so I have to select outgoing mode then conflict mode again to re-populate. Twice - because it clears when I save the resolved source file, and then again when I mark as merged.

  2. Building. I use Maven launch configurations to do Maven builds. But for some reason, doing the Maven build is not enough for Eclipse - it then has to do its own build too of the entire workspace, which takes at least as long, and much longer when Eclipse decides to hang a few minutes on 'Clearing output folder of project xxx', for several of the projects.

The result of all this is that often it takes over an hour to update from source control, resolve conflicts, build and be ready to run or continue development.

Me and my co-workers often feel that Eclipse is hampering development, when it should be enhancing it.

Is there anything that can be done to reduce the eternal waiting-for-Eclipse syndrome?

like image 917
Per Avatar asked Nov 24 '22 04:11

Per


1 Answers

We have this same problem.... 72 projects in our workspace normally makes using m2e impossible. We're trying to not use m2e and start maven executable as an external tool with some configurations. And you can make maven generate your .project and .classpath to change the eclipse configurations:

mvn eclipse:eclipse

Not the best option, but is what we have now.

like image 180
Plínio Pantaleão Avatar answered Nov 25 '22 17:11

Plínio Pantaleão