什么需要签入Grails应用程序?

时间:2022-09-17 23:27:35

What parts of a Grails application need to be stored in source-control? Some obvious parts that are needed:

Grails应用程序的哪些部分需要存储在源代码控制中?需要一些明显的部分:

  • grails-app directory
  • test directory
  • web-app directory

Now we reach questions like:

现在我们达到以下问题:

  • If we use a Grails plug-in (like gldapo), do we need to check in that plugin?
  • 如果我们使用Grails插件(如gldapo),我们是否需要检入该插件?

  • Do Grails plugins install in the Grails directory, or your project?
  • Grails插件是否安装在Grails目录或项目中?

I'm not looking to start a religious war about .project, so please ignore that, but are there any "hidden" project files I need to worry about, along with the plugin issues?

我不打算开始关于.project的宗教战争,所以请忽略它,但是有什么“隐藏的”项目文件我需要担心,还有插件问题?

Converted to a community wiki, as new versions of Grails have changed some of these solutions, especially as regards plugins.

转换为社区维基,因为新版本的Grails已经改变了一些这些解决方案,特别是关于插件。

3 个解决方案

#1


8  

  • You do not want ./plugins/core (Core Grails plugins) under SVN
  • 您不希望SVN下的./plugins/core(Core Grails插件)

  • You do not want anything under ./web-app/WEB-INF/ under SVN. You should not usually need to put files in here. Files from ./conf are copied to WEB-INF/classes so they are on the classpath, if you need to supply anything.
  • 您不希望SVN下的./web-app/WEB-INF/下有任何内容。你通常不需要把文件放在这里。 ./conf中的文件被复制到WEB-INF / classes,因此如果您需要提供任何内容,它们就在类路径中。

Here's a link to the docs describing in more detail.

这是一个更详细描述文档的链接。

#2


1  

I would say, put all your project directory under versionning. Even the libs, it won't take that much disk space and you'll not change them so often.

我会说,将所有项目目录置于版本控制之下。即使是lib,它也不会占用太多磁盘空间而且你也不会经常更改它们。

To my point of view, it's somehow "safer" than relying on external tools such as maven to grab all the dependencies, especially when one of the dependecies silently upgrade and change a little bit its behaviour, introducing "bugs" in your own project.

就我而言,它依赖于依赖外部工具(例如maven)以获取所有依赖关系,特别是当其中一个dependecies默默地升级并改变其行为时,在您自己的项目中引入“bug”时,它会更“安全”。

#3


1  

After a bit more research, it seems that plugins for Grails are installed in the project directory, they don't change your Grails install. This means you'll need to install that plugin in each Grails project you want to use the functionality, and that the plugin is part of each project's source code.

经过一番研究后,似乎Grails的插件安装在项目目录中,它们不会改变您的Grails安装。这意味着您需要在每个要使用该功能的Grails项目中安装该插件,并且该插件是每个项目源代码的一部分。

These plugins are installed in the grails-app/plugins directory, so if you're already checking in the grails-app directory, all should be well.

这些插件安装在grails-app / plugins目录中,所以如果你已经在grails-app目录中检查,那么一切都应该没问题。

There don't seem to be any "hidden files" that need checking in, though there are a few empty directories created when starting a new project that should be added to the source-control, as you'll probably add files to them at a later date.

似乎没有任何需要签入的“隐藏文件”,虽然在启动应添加到源控件的新项目时会创建一些空目录,因为您可能会在以下位置添加文件以后的日子。

#1


8  

  • You do not want ./plugins/core (Core Grails plugins) under SVN
  • 您不希望SVN下的./plugins/core(Core Grails插件)

  • You do not want anything under ./web-app/WEB-INF/ under SVN. You should not usually need to put files in here. Files from ./conf are copied to WEB-INF/classes so they are on the classpath, if you need to supply anything.
  • 您不希望SVN下的./web-app/WEB-INF/下有任何内容。你通常不需要把文件放在这里。 ./conf中的文件被复制到WEB-INF / classes,因此如果您需要提供任何内容,它们就在类路径中。

Here's a link to the docs describing in more detail.

这是一个更详细描述文档的链接。

#2


1  

I would say, put all your project directory under versionning. Even the libs, it won't take that much disk space and you'll not change them so often.

我会说,将所有项目目录置于版本控制之下。即使是lib,它也不会占用太多磁盘空间而且你也不会经常更改它们。

To my point of view, it's somehow "safer" than relying on external tools such as maven to grab all the dependencies, especially when one of the dependecies silently upgrade and change a little bit its behaviour, introducing "bugs" in your own project.

就我而言,它依赖于依赖外部工具(例如maven)以获取所有依赖关系,特别是当其中一个dependecies默默地升级并改变其行为时,在您自己的项目中引入“bug”时,它会更“安全”。

#3


1  

After a bit more research, it seems that plugins for Grails are installed in the project directory, they don't change your Grails install. This means you'll need to install that plugin in each Grails project you want to use the functionality, and that the plugin is part of each project's source code.

经过一番研究后,似乎Grails的插件安装在项目目录中,它们不会改变您的Grails安装。这意味着您需要在每个要使用该功能的Grails项目中安装该插件,并且该插件是每个项目源代码的一部分。

These plugins are installed in the grails-app/plugins directory, so if you're already checking in the grails-app directory, all should be well.

这些插件安装在grails-app / plugins目录中,所以如果你已经在grails-app目录中检查,那么一切都应该没问题。

There don't seem to be any "hidden files" that need checking in, though there are a few empty directories created when starting a new project that should be added to the source-control, as you'll probably add files to them at a later date.

似乎没有任何需要签入的“隐藏文件”,虽然在启动应添加到源控件的新项目时会创建一些空目录,因为您可能会在以下位置添加文件以后的日子。