Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many multiple "Eclipse Projects" is considered too excessive for one actual development project?

Tags:

java

eclipse

I'm currently working on a project that contains many different Eclipse projects referencing each other to make up one large project. Is there a point where a developer should ask themselves if they should rethink the way their development project is structured?

NOTE: My project currently contains 25+ different Eclipse projects.

like image 451
Ryan Thames Avatar asked Jan 13 '09 21:01

Ryan Thames


3 Answers

My general rule of thumb is I would create a new project for every reusable component. So for example if I have some isolated functionality that can be packaged say as a jar, I would create a new project so I can build,package and distribute the component independently.

Also, if there are certain projects that you do not need to make frequent changes to, you can build them only when required and keep them "closed" in eclipse to save time on indexing, etc. Even if you think that a certain component is not reusable, as long as it is separated from the rest of the code base in terms of logic/concerns you may be well served by just separating it out. Sometimes seemingly specific code might be reusable in another project or in a future version of the same project.

like image 187
neesh Avatar answered Sep 20 '22 06:09

neesh


When compiled, a project would typically result in a jar. So if your application consists of potentially reusable components, it is ok to use a project for each.

I'm a big fan of using a lot of projects, I feel that this "breaks down" large things beyond what I can do with packages, and helps me orient and navigate.

Of course, if you're developing Eclipse plug-ins, everything would be a project anyway.

The only thing I would watch out for has to do with your source-control and it's ability to handle moves of files between projects. Subclipse had been giving me trouble with it, or maybe it's my SVN server that did.

like image 23
Uri Avatar answered Sep 22 '22 06:09

Uri


If your project has that many sub-projects, or modules, needed to actually compose your final artifact then it is time to look at having something like Maven and setting up a multi-module project. It will a) allow you to work on each module independently without ide worries and allow easy setup in your ide (and others' IDEs) through the mvn eclipse:eclipse goal. In addition, when building your entire top level project, maven will be able to derive from list of dependencies you have described what modules need to be built in what order.

Here's a quick link via google and a link to the book Maven: The Definitive Guide, which will explain things in much better detail in chapter 6 (once you have the basics).

This will also force your project to not be explicitly tied to Eclipse. Being able to build independent from an ide means that any Joe Schmoe can come along and easily work with your code base using whatever tools he/she needs.

like image 28
whaley Avatar answered Sep 18 '22 06:09

whaley