简体   繁体   English

如何将另一个源目录添加到Play 1.2.x项目中?

[英]How does one add another source directory to a Play 1.2.x project?

I am using the play framework (v1.2.3). 我正在使用播放框架(v1.2.3)。 As part of my code, I have various generated source files. 作为代码的一部分,我有各种生成的源文件。 These files are generated by thrift, so I do not want them included in my source control. 这些文件是由节俭生成的,因此我不希望它们包含在我的源代码管理中。 As such, I want to exclude all of the generated files. 因此,我要排除所有生成的文件。 But, currently, I am building them all under the main app/ directory. 但是,目前,我正在将它们全部构建在主app /目录下。 So there is no way to add an ignore clause to avoid committing any of the files into git. 因此,没有办法添加ignore子句来避免将任何文件提交到git中。

This would not be a problem if I could simply generate the thrift source files into a different directory structure (eg gen/). 如果我可以简单地将节俭的源文件生成为不同的目录结构(例如gen /),这将不是问题。 Is there a way to configure Play to compile files from the app/ folder and from another separate, unrelated folder altogether? 有没有一种方法可以将Play配置为从app /文件夹以及完全从另一个单独的,不相关的文件夹编译文件?

I believe your best option is to provide those files as a module and use it from the main application. 我相信您最好的选择是将这些文件作为模块提供 ,并从主应用程序中使用它。 That way you'll have them in a separated area. 这样,您就可以将它们放在单独的区域中。

Check this question about how to add local modules to your project. 检查这个问题如何本地模块添加到项目中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM