IT序号网

Tomcat 上的 Grails 部署错误

luoye 2025年05月04日 编程语言 75 0

我正在尝试使用命令在 tomcat 上部署 grails 应用程序

grails prod tomcat deploy --stacktrace 

但是,我收到以下错误。知道如何解决这个问题吗?我是第一次部署它。应用程序在我的本地计算机 (mac) 上的开发模式下运行良好。

| Error Error executing script Tomcat: No such property: warName for class: Tomcat (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.) 
groovy.lang.MissingPropertyException: No such property: warName for class: Tomcat 
    at Tomcat$_run_closure1.doCall(Tomcat:30) 
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) 
    at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) 
    at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) 
    at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) 
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) 
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) 
    at gant.Gant.withBuildListeners(Gant.groovy:427) 
    at gant.Gant.this$2$withBuildListeners(Gant.groovy) 
    at gant.Gant$this$2$withBuildListeners$0.callCurrent(Unknown Source) 
    at gant.Gant.dispatch(Gant.groovy:415) 
    at gant.Gant.this$2$dispatch(Gant.groovy) 
    at gant.Gant.invokeMethod(Gant.groovy) 
    at gant.Gant.executeTargets(Gant.groovy:591) 
    at gant.Gant.executeTargets(Gant.groovy:590) 
| Error Error executing script Tomcat: No such property: warName for class: Tomcat 

请您参考如下方法:

我也刚刚遇到了这个问题,这是一个记录在案的已知问题 here 。短期解决方法是修改文件

~/.grails/<vers>/projects/<project-name>/plugins/tomcat-7.0.42/scripts.Tomcat.groovy 

如图here .


评论关闭
IT序号网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!