开发者

handle OS specific .classpath file in a hg repo

开发者 https://www.devze.com 2023-01-28 05:40 出处:网络
I have a Java project in Eclipse and version-control is a mercur开发者_如何转开发ial repo. From several environments (Linux/Windows/MacOSX) I\'m working with this same repo.

I have a Java project in Eclipse and version-control is a mercur开发者_如何转开发ial repo. From several environments (Linux/Windows/MacOSX) I'm working with this same repo.

Problem is that in the .classpath file I've one line which is specific for the MacOSX environment and differs for the other environments. Still I don't want to put .classpath the ignore flag in version control.

I'm thinking of e.g. a mercurial extension on my MacOSX environment to tell mercurial to ignore this one specific line in .classpath but still sync everything else.

For all other environments (Linux/Windows) it's important that no changes are needed here.


One workflow-changing approach would be to switch your project to use something like Maven to manage your classpath and dependencies. Then you can use m2eclipse to automatically import it into Eclipse on each machine and automatically generate the appropriate project settings and classpath.

0

精彩评论

暂无评论...
验证码 换一张
取 消