I’m using Eclipse Helios and EGit 0.11.3.
I have a project where different branches use different versions of some of the libraries on my Java build path. For example, branch_old uses foo_lib_v1.0.jar while branch_new uses foo_lib_v2.0.jar.
If I’m working on branch_new and I need to checkout branch_old to test something, it’s a bit of a hassle: I must manually reconfigure the build path in Eclipse before the project can build successfully.
Is there a way to store Eclipse’s Java build path configuration for my project in git, so that when I check out a branch the build path is automatically modified? If not, is there another way to achieve the same result?
Thanks.
I see several choices here:
.classpathand.project) in Git as part of your branch. This way you would have to store all your dependencies in Git too, which is a hassle if you have a lot of them.pom.xml) file as part of your version control. Maven will greatly simplify your project dependency configurationMore information on m2eclipse plugin can be found at http://www.sonatype.com/books/m2eclipse-book/reference/