问题
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