aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes what all to keep in version control? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "what all to keep in version control?" Watch "what all to keep in version control?" New topic
Author

what all to keep in version control?

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Do you keep .classpath file in version control?

I used to think that thumb rule is - any file which is not generated by "us" shouldn't be there in version control.

But if we don't keep .classpath then will not it give build path errors when we get the code from version control?

There are other files/folders too like .settings, .project, .apt_src folder (generated by weblogic only, I guess) etc which confuses me.

Thanks.
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

I don't keep .classpath in the version control because if you give freedom for the developers to use any IDE they prefer, the .classpath isn't very useful to them. But if you have a policy that all the developers must use Eclipse, then you may want to keep the .classpath.


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

I do keep the .classpath (and .project) Eclipse files in version control. But I don't keep absolute pathnames in it. I define symbolic references for the items that are outside the project's directory so that people with different setups can participate with minimal effort and with no change to the project itself. Among other things, that means if I'm playing in a mixed Windows/Unix environment, which I've been known to do, I define TOMCAT_HOME as something like C:\TOMCAT on one machine and /usr/local/apache-tomcat on another. But the mappings are in each machine's Eclipse environment, not in the project, so the project ports.

I do likewise for IntelliJ, which has 3 IDE-specific files. However I only version-control the 2 that are user-independent and omit the one that contains my local workspace info (what windows are open and where I'm editing). I believe that's the ".iws" file. Putting that one in version control can lead to trouble.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what all to keep in version control?