现有的项目文件导入现有项目时的Eclipse覆盖 [英] Eclipse overrides existing project files when importing existing project

查看:704
本文介绍了现有的项目文件导入现有项目时的Eclipse覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作从我的混帐的WD现有项目。
的.classpath default.properties 文件在存储库中。

I'm working on an existing project from my wd of git. .classpath and default.properties files are on the repository.

当我导入项目到Eclipse,我的 default.properties 被替换为 project.properties (中文件的内容是相同的)和我的的.classpath 修改

When I import the project to Eclipse, my default.properties is replaced by a project.properties (the files' contents are the same) and my .classpath is modified.

正如我所说的,这些文件是在库中,所以我的git的状态是永远干净。

As I said, these files are on the repository, so my git status is never clean.

你知道如何使用Eclipse提供的存储库的文件强制不修改它们的?

Do you know how to force Eclipse using the files provided on the repository without modifying them ?

感谢

推荐答案

default.properties(或project.properties)

查看的changelog SDK R14的释放

default.properties这是一个包含信息的主要项目的属性文件,如构建平台的目标和库的依赖已更名为project.properties

default.properties which is the main project’s properties file containing information such as the build platform target and the library dependencies has been renamed project.properties

如果您的开发团队的人仍然使用一个版本比R14老,不如要求他们升级到最新的Andr​​oid SDK版本的工作站上,由于Android SDK以来一直就项目的属性文件,库项目R14变化迅速,外部JAR依赖结构等它将使开发很难维持,如果开发商在一个团队使用不同的Andr​​oid SDK版本。

If someone from your development team still use a version older than r14, better to ask them upgrade to latest Android SDK version on their workstation, as the Android SDK has been changed rapidly since r14 regarding to project property file, library project, external jar dependency structure and etc. It will make development very hard to maintain if developers use different Android SDK version in a team.

如果这不是在短期内的选项,你应该暂时创建并入住在这两个default.properties和project.properties(内容相同)的时间很短,支持老版本的Andr​​oid中短期内,给其他人的时间来提升自己的工作站。

If this is not an option in a short term, you should temporarily create and check-in both default.properties and project.properties (with the same contents) for a short period of time, to support old Android version in a short term and give other people time to upgrade their workstation.

的.classpath

这是一个非常不好的做法,承诺IDE生成的文件(的.classpath,和的.project等)的源代码控制。你期望的.classpath从Windows中产生的具有确切相同的内容从Mac箱产生的呢?因此,它被忽略时自动在提交项目以源代码控制,你应该添加的.classpath到您的源代码控制忽略列表。

It is a very bad practice to commit IDE generated files (.classpath, .project and etc.) into source control. Do you expect .classpath generated from a Windows box has exact the same contents as the one generated from a Mac box? You should add .classpath to your source control ignore list so that it is ignored automatically whenever you commit your project to source control.

在使用源代码控制系统,不要考虑太多,每一个承诺,只要你提供充分详细的评论。作为每一个动作在项目中(添加,修改,删除等),你做的每一个文件(java源,属性和资源文件等)的记录,并在源代码控制跟踪,万一如果出了问题,这是很容易为复杂的开发者跟踪变化,并恢复该项目进入正常状态。希望这有助于。

When use a source control system, Don't consider too much for every single commit, as long as you provide fully detailed comments. as every single action (add, modified, deleted and etc.) you did on every single file (java source, properties and resources file and etc.) in your project are logged and tracked in source control, in case if something goes wrong, it is quite easy for a sophisticated developer to track the change and revert the project into a normal state. Hope this helps.

这篇关于现有的项目文件导入现有项目时的Eclipse覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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