Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
623 views
in Technique[技术] by (71.8m points)

version control - Synchronizing Eclipse .classpath in code repository

My team handles several Java projects using Eclipse, and shares the code using a code repository.

When a developer adds, removes or updates a jar file, the build is broken for everybody else, until they update their build path in Eclipse. This process involves cumbersome email synchronization.

For several reasons, we have decided not to commit the .classpath file to the repo. Instead, we came up with the following idea: Each project will have a committed file, say jars.list, which contains a list of jar files (and patterns). A script will convert this file into a local .classpath for eclipse. Whenever a developer changes its jars, it is his or her responsibility to change jars.list and commit it.

Is this a reasonable solution? Are there any existing solutions for this problem?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Eclipse .project and .classpath files are intended/designed to be checked into a version control repository (cvs, svn, git, etc). See this page in the Eclipse wiki.

There are various ways to keep the .classpath file "clean" (ie, free from absolute paths), which I mentioned in the Comments section above.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...