我尝试将我的 Grails 2.1.1 应用程序部署到 Heroku。
我跑 git push master heroku
它运行了一段时间(编译正常,获取依赖项,ec),然后它给了我这个消息:
|Building WAR file
...........................Error
|
Error executing script War: : Replace: source file /app/.grails/2.1.1/projects/Project/stage/WEB-INF/applicationContext.xml doesn't exist (Use --stacktrace to see the full trace)
! Failed to build app
! Heroku push rejected, failed to compile Grails app
当我跑
grails war
在本地,它可以正常工作。我读了一些书,但没有找到可靠的答案。我读过的类似问题是由与 JDK 相关的问题或插件引起的。
最佳答案
这种情况下的解决方案是将 WEB-INF 添加到我的存储库中。默认情况下,我的 .gitignore(通过 GitHub 创建)忽略 WEB-INF。
关于Grails 推送到 Heroku 失败 - applicationContext.xml 不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14910388/