question on eclipse and source control

  • Thread starter Christopher Corbell
  • Start date
C

Christopher Corbell

Just curious since there was a discussion today on my team...

If you're using eclipse on a project do you check-in your project
files to source control for everyone to use? (The .classpath
and .project files, that is). Or do engineers just set up their own
local eclipse projects which are never checked-in? What's the more
common approach?

TIA,
Chris
 
C

Corona4456

Just curious since there was a discussion today on my team...

If you're using eclipse on a project do you check-in your project
files to source control for everyone to use? (The .classpath
and .project files, that is). Or do engineers just set up their own
local eclipse projects which are never checked-in? What's the more
common approach?

TIA,
Chris

IMO it would depend on whether there is a consensus on each team
member's configuration. More importantly using the same IDE is a good
reason to add the .classpath and .project files. This will help when
adding libraries and what not to your project. That way others don't
have to worry about that, although you can just as easily add it in
Eclipse :). Right now I have a project in version control with those
files included and I haven't really run across a problem. So whether
you put it in version control or not will not really affect you or
your team all that much. So basically it's just a preference if you
ask me.
 
J

Jason Cavett

Just curious since there was a discussion today on my team...

If you're using eclipse on a project do you check-in your project
files to source control for everyone to use? (The .classpath
and .project files, that is). Or do engineers just set up their own
local eclipse projects which are never checked-in? What's the more
common approach?

TIA,
Chris

Since my teams have always used the same IDE (Eclipse), I always add
the .project and .classpath files to source control. There are some
issues that may need to be worked out (AKA - don't add C:\your\local
\directory\whatever.jar to the classpath - use a variable so it is the
same across all Eclipse configurations) but generally it works out
pretty well.
 
D

Daniel Dyer

Just curious since there was a discussion today on my team...

If you're using eclipse on a project do you check-in your project
files to source control for everyone to use? (The .classpath
and .project files, that is). Or do engineers just set up their own
local eclipse projects which are never checked-in? What's the more
common approach?

I don't use Eclipse, but the same issue is relevant to other IDEs. I used
to advocate excluding all IDE configuration from source control (with
ignore patterns set to avoid accidental addition) and leaving it to
individual developers' preferences. The reasoning behind this is that
they are often using different IDEs, usually have different personal
preferences, and the IDE configuration is largely incidental since
everybody must use the Ant build.xml for building (allowing different team
members to use different tools/configurations for builds is
counter-productive).

However, I'm now favouring maybe adding at least some of the configuration
files to source control.

While we do have Eclipse users in the company, all of the Java developers
on my current project team use IntelliJ IDEA. IDEA uses three files for
configuration - .ipr is the project file, .iml is the module file
(typically more than one of these) and .iws is the workspace file. I have
added the .ipr and .iml files to Subversion and excluded the .iws file.
This gives us shared configuration for paths, dependencies, etc. but
leaves out developer-specific stuff like debug configurations and view
settings.

IDEA is flexible as to where the configuration files reside, so in our
case these shared ones are tucked away in a configuration directory in the
project repository for team members to use if they wish. This means they
won't clash with files in the project root if the developer chooses to use
their own configuration files. A default configuration for NetBeans could
easily be added to this configuration directory if needed and, assuming
Eclipse is not too fussy about the location of its config files, you could
do the same for Eclipse.

The advantage of using the shared files is that you get the benefit of any
reconfigurations that other people do (for example, when a library
dependency changes). Another benefit is that if a new developer joins the
team, they can get started straight away without having to set everything
up for themselves.

Dan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top