views:

33

answers:

2

I'm an Eclipse newbie, and I have an Eclipse workspace with projects for a Google Web Toolkit App. What directories/files should I commit to version control (we're using Subversion)? I believe I don't need to commit .metadata directories, and it seems to me that I don't need to commit war directories, but I'm not positive. The committed projects need to be shared across multiple developers.

+1  A: 

You shouldn't commit directories which contain artifacts as well as the .project file which would demand to checkout the project into workspace. (which isn't desirable if you need to work with different versions of your project).

Unless you use maven you might want to add the .classpath also to your version-control system.

Keep in mind that all team-members have to be careful to add only relative-paths to the classpath.

stacker
+1  A: 

stacker covered Eclipse's files, let me cover GWT ;)

Assuming you are using the standard layout:

The war directory is the deployment image of your web application. It is in the standard expanded war format recognized by a variety of Java web servers, including Tomcat, Jetty, and other J2EE servlet containers. It contains a variety of resources:

  • Static content you provide, such as the host HTML page
  • GWT compiled output
  • Java class files and jar files for server-side code
  • A web.xml file that configures your web app and any servlets

So as you can see it's a mixed bag. As it's been suggested before, you should use svn:ignore to let SVN know what exactly you want to put under source control - obviously the compiled output and class files are out :)

Igor Klimer