question on eclipse and source control

Discussion in 'Java' started by Christopher Corbell, Jan 30, 2007.

  1. 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
     
    Christopher Corbell, Jan 30, 2007
    #1
    1. Advertising

  2. Christopher Corbell

    Corona4456 Guest

    On Jan 30, 12:09 pm, "Christopher Corbell" <>
    wrote:
    > 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.
     
    Corona4456, Jan 30, 2007
    #2
    1. Advertising

  3. Christopher Corbell

    Jason Cavett Guest

    On Jan 30, 2:09 pm, "Christopher Corbell" <>
    wrote:
    > 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.
     
    Jason Cavett, Jan 30, 2007
    #3
  4. Christopher Corbell

    Daniel Dyer Guest

    On Tue, 30 Jan 2007 19:09:22 -0000, Christopher Corbell
    <> wrote:

    > 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.

    --
    Daniel Dyer
    https://watchmaker.dev.java.net - Evolutionary Algorithm Framework for Java
     
    Daniel Dyer, Jan 30, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ~~~ .NET Ed ~~~
    Replies:
    1
    Views:
    4,214
    Cowboy \(Gregory A. Beamer\)
    Feb 26, 2005
  2. Marcus Leon
    Replies:
    5
    Views:
    600
    Marcus Leon
    Feb 3, 2005
  3. keperry
    Replies:
    3
    Views:
    5,633
    Venkatesh
    Apr 27, 2006
  4. Replies:
    1
    Views:
    613
    GArlington
    Aug 31, 2007
  5. Aaron Watters
    Replies:
    0
    Views:
    643
    Aaron Watters
    Mar 8, 2008
Loading...

Share This Page