How to package a hidden folder inside the root of a WAR file, using SBT?

天涯浪子 提交于 2019-12-11 04:44:34

问题


I am trying to build a WAR file (containing a Lift project) suitable for deployment to Elastic Beanstalk. I also need to configure my application using .ebextensions.

.ebextensions should be stored in the root of a WAR file. Where should resources be placed so they end up in the root of a WAR file in SBT package? Using src/main/resources appears to place resources in WEB-INF/classes.

Even when I place the .ebextensions folder in, say, my src/main/resources folder and package the WAR file, the folder doesn't appear (in WEB-INF/classes). If I remove the leading period then it does appear. So how can SBT also be configured to package hidden folders?


回答1:


Place the folder in src/main/webapp.

Update 10/23 As Richard Dallaway pointed out below, this no longer seems to work and there is a good explanation by SBT's author of why here: How to make SBT to not-ignore .ebextensions folder?. The short answer is to add this:

excludeFilter := HiddenFileFilter -- ".ebextensions" //or whatever your hidden folder name is

To your build.sbt file.



来源:https://stackoverflow.com/questions/14751665/how-to-package-a-hidden-folder-inside-the-root-of-a-war-file-using-sbt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!