你如何处理不同的 Java IDE 和 svn?
您如何确保可以将代码签出到 Eclipse 或 NetBeans 中并在那里使用?
How do you ensure, that you can checkout the code into Eclipse or NetBeans and work there with it?
如果您不签入与 ide 相关的文件,则每次签出项目时都必须重新配置构建路径、包含和所有这些内容.我不知道 ant(尤其是从 eclipse 创建/导出的 ant 构建文件)是否可以与其他 ide 无缝协作.
If you not checking in ide-related files, you have to reconfigure buildpath, includes and all this stuff, each time you checkout the project. I don't know, if ant (especially an ant buildfile which is created/exported from eclipse) will work with an other ide seamlessly.
推荐答案
聪明的答案是这样做"——除非你不使用多个 IDE,否则你不知道你是否真的准备好使用多个IDE.诚实的.:)
The smart ass answer is "by doing so" - unless you aren't working with multiple IDEs you don't know if you are really prepared for working with multiple IDEs. Honest. :)
我一直认为多个平台更麻烦,因为它们可能使用不同的编码标准(例如,Windows 可能默认为 ISO-8859-1,Linux 可能默认为 UTF-8)——对我来说,编码比 IDE 引起的问题要多得多.
I always have seen multiple platforms as more cumbersome, as they may use different encoding standards (e.g. Windows may default to ISO-8859-1, Linux to UTF-8) - for me encoding has caused way more issues than IDEs.
更多指点:
- 您可能想使用 Maven (http://maven.apache.org),让它生成特定于 IDE 的文件,并且从不将它们提交到源代码管理.
- 为了确保生成正确的人工制品,您应该借助 ant、maven 或任何其他工具使用专用服务器来构建您的可交付成果(例如 Cruisecontrol).这些可交付成果是在开发机器之外进行测试的成果.让人们意识到在他们自己的机器之外还有另一个世界的好方法.
- 禁止在源代码管理中找到的任何 IDE 特定文件中包含任何机器特定路径.始终通过逻辑路径名引用外部库,最好包含它们的版本(如果你不使用 maven)
- You might want to go with Maven (http://maven.apache.org), let it generate IDE specific files and never commit them to source control.
- In order to be sure that you are generating the correct artefacts, you should have a dedicated server build your deliverables (e.g. cruisecontrol), either with the help of ant, maven or any other tool. These deliverables are the ones that are tested outside of development machines. Great way to make people aware that there is another world outside their own machine.
- Prohibit any machine specific path to be contained in any IDE specific file found in source control. Always reference external libraries by logical path names, preferable containing their version (if you don't use maven)
相关文章