如何使SBT不能忽略

如何使SBT不能忽略

本文介绍了如何使SBT不能忽略.ebextensions文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个通过SBT构建的webapp,并已部署到Amazon Elastic Beanstalk中.为了配置Beanstalk实例,需要将带有配置文件的.ebextensions文件夹放入WAR文件的根目录中.但是,将此文件夹放入src/main/webapp并没有帮助,因为默认情况下SBT会忽略所有隐藏的文件夹,因此生成的WAR不包含该文件夹.

I have a webapp that is built via SBT and is deployed into Amazon Elastic Beanstalk. In order to configure Beanstalk instance, one needs to put .ebextensions folder with config files into root of WAR file. However, putting this folder into src/main/webapp doesn't help, because SBT by default ignores all hidden folders, so resulting WAR doesn't contain the folder.

除了隐藏以外,是否有某种方法可以配置SBT以将该文件夹包括在内部版本中?或者如何将该文件夹放入其他版本中?我正在使用jenkins自动化构建和部署,因此解压缩-添加文件夹-再次打包并不是真正的选择,除非可以通过某种方式编写脚本.谢谢!

Is there some way to configure SBT to include this folder into the build, besides it's hidden? Or how can I put this folder into the build some other way? I'm using jenkins to automate build and deploy so unpack - add folder - pack again isn't really an option, unless it can be somehow scripted. Thanks!

推荐答案

Web插件似乎尊重excludeFilter,默认情况下:

The web plugin appears to respect excludeFilter, which is by default:

excludeFilter := HiddenFileFilter

您可以重新定义它以允许.ebextensions:

You can redefine it to allow .ebextensions:

excludeFilter := HiddenFileFilter -- ".ebextensions"

这篇关于如何使SBT不能忽略.ebextensions文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 05:46