Question

I'm working on a project stored on a SVN server. I always work on this project from my main workstation, but now I neet to checkout the project from my notebook.

I installed everything it's needed on my new development environment: Eclipse IDE, JDK, Apache Tomcat.

Now when I checkout my project I get some problems: the JRE is not binded to my local virtual machine, and the targeted runtime server (Tomcat) is not found.

I solved this simply configuring the project to the new environment, but obviously when I'll commit changes, I'll have to reconfigure all these parameters to the original environment.

So, is there a way to solve this? Should I avoid committing the whole Eclipse project and store in the server just the source code? Which is the correct way to work? Which files/directories should I remove from version control? JRE + Server settings are in .classpath file. Should I exclude this file from version control?

Was it helpful?

Solution 2

I take it you're using Eclipse?

You should not be storing .classpath in your Subversion repository. If I remember, this stores the absolute directory names of the classpath. This will vary from system to system.

Delete .classpath from your repository, then put an svn:ignore property on your project's root directory (where .classpath is stored) and add to the ignore list the file .classpath.

This way, others will not accidentally add back in the .classpath file.

OTHER TIPS

You are running into the problem because you are trying to keep more things in svn than required. It is not a good idea to checkin the project settings file in code control such as svn. As different developers will always have different settings as per their development environment. Code control should be used to check-in the code and let other things to be configured as per the environment.

Read a related post: Should I keep my project files under version control?

You might want to checkin configurations in hostname named folders, this way you can configure the project to look them up based on the computer you're working on.

For example:

config
  davioooh-laptop
  davioooh-home-pc
  alberto-laptop
  ...

Each of these folders will contain configurations for all the devs.

I believe that in the revision control system you should be putting whatever helps you to get up to speed in being productive, so why not placing configurations in a proper folder structure.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top