我使用WAR部署'm struggling with deploying my simple Java app to Heroku. I'm部署:https://devcenter.heroku.com/articles/war-deployment但是,我的context.xml文件必须不在WAR中但包含在内 . 首先,我将Tomcat webapp-runner选项--enable-naming和--context-xml = path /添加到/ context.xml:
heroku config:set WEBAPP_RUNNER_OPTS="--enable-naming --context-xml=path/to/context.xml"
其中 =path/to/context.xml 是正确的context.xml的真实路径然后我使用:
heroku war:deploy myapp.war --includes newrelic.jar:newrelic.xml
其中myapp.war - >是正确的.war文件的完整路径,newrelic.xml只是我的.xml文件(context.xml)的名称,因为我提供了WEBAPP_RUNNER_OPTS中context.xml的路径 . 但是每当我尝试部署时,我都会遇到如下错误:上传ParkingBookSystem.war
-----> Packaging application...
- app: park-book-app
- including: context.xml
! ERROR: There was an error packaging the application for deployment.
我究竟做错了什么?我的命令WEBAPP_RUNNER_OPTS和--includes中是否有错误?