[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.jdt] Re: Which Eclipse project files to be placed under source code control?

On 9/17/09 5:00 AM, Michael Ludwig wrote:
Rich and Eric,

thanks for your thoughts. I found out about Eclipse "User Libraries",
which seems to be exactly what you referred to, Rich. Very useful. In
addition to your suggestions, the following article helped me:

InformIT: Configuring an Eclipse Java Project
http://www.informit.com/articles/article.aspx?p=367962

I'm a bit reluctant to put JARs under version control. Agreed, this
allows an even faster start-up after checking out the project, but I
find JARs are not really versioned, so they shouldn't go under version
control.

User Libraries are indeed a useful feature.

However, I'm perplexed by the statement "JARs are not really versioned." Of course they are; most libraries have multiple release and each of those has a corresponding JAR, and those different versions/releases are not always compatible.
Here's a real-life scenario in which relying on each development machine or developer to maintain his own copies of JARs causes problems:
A project is using SomeLibrary (packages as a JAR), version 1.0. Some time later, a new developer (or a developer who is setting up a new development machine or workspace) goes to get SomeLibrary, but doesn't realize that a new version has been released, 1.1. So he sets things up to use SomeLibrary 1.1 and begins to work. Two things can go wrong: a) the developers of SomeLibrary might not have maintained backwards compatibility so that compile errors show up immediately; or b) SomeLibrary 1.1 has new functionality or API that was not in 1.0, your developer writes new code that uses that, and then the rest of the team has build problems as a result (because they all got SomeLibrary 1.0).


In my experience, this happens quite often if the dependencies are not managed under version control. VERY often. By versioning the dependencies of your project(s), you eliminate these problems that can eat up lots of time trying to figure out. There is really no significant cost to checking in JARs unless you've got a lot of really large ones, and even then they don't change very often so they don't have to be downloaded from scm very often.
Maven provides an alternative, but it is a pretty heavyweight option IMO.


Eric