SPRING Roo项目-版本控制中应保留的内容 [英] SPRING Roo Project - What should be kept in Version Control

查看:88
本文介绍了SPRING Roo项目-版本控制中应保留的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从一个Spring Roo项目开始,注意到有很多文件,例如

I am starting on a spring roo Project and noticed that there are many files such as

  • AspectJ(.aj)文件-我认为这些文件很重要,因为它们包含大量代码.但不确定是否已安装Roo,是否仍需要将它们添加到版本控制中.或者它们可以每次生成,我想不是.但是想从这里来的人.

  • AspectJ (.aj) files - I think these are important files since they contain lot of code. But not sure if we have roo installed do we still need to add these to version control. Or they can be generated everytime, I guess not. But would like to here from people who have done this.

log.roo-我想这是非常重要的文件,我会保留它,因为它可以重新生成我的项目.

log.roo - I guess this is very important file I will keep this since it can regenerate my project.

eclipse .classpath/.project文件-我始终将它们保留在版本控制中,只是为了保持设置对我可用.但由于我始终会因为开发人员机器的本地路径而遇到类路径问题,因此不确定最佳做法是什么.

eclipse .classpath/.project files - I always keep them in version control just to keep setup available for me. But not sure what is the best practice since I always faced the classpath problems due to dev machine local paths.

单元测试文件-我将要保留它们在版本控制中.我浏览了 ST上的该线程,但请对此分享您的想法.

Unit Test files - I will want to keep them in version control. I browsed this thread on ST But do share your thoughts on this.

目标目录的内容-我认为可能将其保留为空,因为版本控制中的空目录可能很好,但希望对此有更多的想法.

target directory content - I am thinking may be keeping this as empty directory in version control can be good, but would like to get more thoughts on it.

推荐答案

其中某些文件必须受版本控制,其余文件可以,但不必.通常,将所有内容添加到版本控制将使事情变得容易.让我解释一下:

Some of these files must be in version control and the rest can be, but don't have to. In general, it would make things easier to add everything to version control. Let me explain:

  • *.aj文件:

这些不需要在版本控制中,因为它们可以由roo重新生成.但是,我建议将它们放进去,以便使用STS的人可以简单地检出项目并开始工作,甚至不需要安装Spring Roo.

These don't need to be in version control because they can be regenerated by roo. However, I'd recommend putting them in so that someone working with STS can simply check out the project and start working without even requiring Spring Roo to be installed.

  • log.roo

同样,不是必需的,但这可能是一个好主意,以便您可以重新创建项目,或者只是记录已完成的事情.

Again, not required, but probably a good idea so that you can recreate the project, or simply have a record of what has been done.

  • 蚀.classpath/.project文件

如果要在项目中使用STS,则必需.没有它们,您就无法轻松地将项目导入STS.当然,Spring Roo可以在很大程度上重新生成这些文件,但是它要求在命令行上运行某些内容,然后才能在STS中使用它们.

These are required if you are to use STS with your project. You cannot easily import your project into STS without them. Of course, Spring Roo can largely regenerate these files, but it requires running something on the command line before being able to use them in STS.

  • 单元测试文件

出于链接问题中指定的所有原因,我认为不将它们添加到版本控制中是很愚蠢的.

I think it is silly not to add these to version control for all the reasons specified in the linked question.

  • 目标目录内容

在这里所有内容中,这是我建议省略的唯一目录.目标目录包含构建工件,而不是项目工件.

Out of everything here, this is the only directory I'd recommend leaving out. The target directory contains build artifacts, not project artifacts.

这篇关于SPRING Roo项目-版本控制中应保留的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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