如何在用户之间共享Eclipse项目首选项? [英] How to share Eclipse project preferences between users?

查看:172
本文介绍了如何在用户之间共享Eclipse项目首选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在团队中有几个开发者,源代码使用Mercurial DVCS进行管理。



源代码控制下的 .metadata 文件夹

问题是,当我配置项目依赖项(jar,用户库,源代码路径等等)时,它们存储在 .metadata 文件夹,即 .metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.core.prefs



由于这个文件不是由DVCS管理,所有的开发人员需要重复的项目配置过程。对于一个新的开发团队,这是一个主要的头痛。



我的问题是有一个合理的程序来共享这种配置数据?我是Java和Eclipse的世界的新手,所以也许我在这里缺少一些基本的东西。



EDIT



问题是我一直在使用用户库,它们是全局定义的,因此不共享。使用外部Jars 解决了这个问题,因为这些被记录在项目目录中的 .classpath 文件中。

解决方案

您可以在项目配置中指定很多属性,而不是在全局配置中。只需右键单击项目,然后选择属性。



Eclipse将首选项保存在项目目录中,而不是工作空间配置目录中。这样,您可以将项目特定配置签入您的SCM,并与其他项目成员共享。


We have several devs in the team, the source code is managed using the Mercurial DVCS.

The .metadata folder is not under the source control.

The problem, is that when I configure project dependencies (jars, user libraries, source code paths, etc ...) they are stored inside the .metadata folder, namely in .metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.core.prefs

Since this file is not managed by DVCS, all the devs need to repeat the project configuration process all over again. For a new dev in the team this is a major head ache.

My question is there a sane procedure to share this kind of configuration data? I am new to the world of Java and Eclipse, so maybe I am missing something really basic here.

EDIT

The problem is that I have been using User Libraries, which are defined globally and thus are not shared. Using External Jars solves the problem, because these are recorded in the .classpath file inside the project directory.

解决方案

You can specify a lot of properties in the project configuration instead of in the global configuration. Just right-click on the project and select "Properties" there.

Eclipse then saves the preferences in the project directory instead of in the workspace configuration directory. That way you can check-in the project specific configuration into your SCM and share it with other project members.

这篇关于如何在用户之间共享Eclipse项目首选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆