[Grails] grails war 打包出错!这种情况谁遇到过?

copoplar 2009-06-07
最近本人在运行
grails run-app 和
grails prod run-app 两种环境都没有任何错误的提示的情况下,准备打包,结果运行 grails war 命令出现错误!!!

错误提示如下::

     [copy] Copying 1 file to C:\Documents and Settings\poplar\.grails\1.1\proje
cts\Thesis\staging\WEB-INF\plugins\hibernate-1.1
   [delete] Deleting directory C:\Documents and Settings\poplar\.grails\1.1\proj
ects\Thesis\staging

(以上大段运行显示正常!下面报错)

Error executing script War: java.lang.IndexOutOfBoundsException: index is out of
range 0..-1 (index = 0)
[size=small][/size]
gant.TargetExecutionException: java.lang.IndexOutOfBoundsException: index is out
of range 0..-1 (index = 0)
        at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:331)
        at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
        at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
        at gant.Gant.withBuildListeners(Gant.groovy:344)
        at gant.Gant.this$2$withBuildListeners(Gant.groovy)
        at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
        at gant.Gant.dispatch(Gant.groovy:334)
        at gant.Gant.this$2$dispatch(Gant.groovy)
        at gant.Gant.invokeMethod(Gant.groovy)
        at gant.Gant.processTargets(Gant.groovy:495)
        at gant.Gant.processTargets(Gant.groovy:480)
Caused by: java.lang.IndexOutOfBoundsException: index is out of range 0..-1 (ind
ex = 0)
        at _GrailsWar_groovy$_run_closure5_closure25_closure26_closure27.doCall(
_GrailsWar_groovy:277)
        at _GrailsWar_groovy$_run_closure5_closure25_closure26_closure27.doCall(
_GrailsWar_groovy)
        at _GrailsWar_groovy$_run_closure5_closure25_closure26.doCall(_GrailsWar
_groovy:259)
        at _GrailsWar_groovy$_run_closure5_closure25_closure26.doCall(_GrailsWar
_groovy)
        at _GrailsWar_groovy$_run_closure5_closure25.doCall(_GrailsWar_groovy:25
8)
        at _GrailsWar_groovy$_run_closure5.doCall(_GrailsWar_groovy:256)
        at _GrailsWar_groovy$_run_closure4.doCall(_GrailsWar_groovy:239)
        at War$_run_closure1.doCall(War.groovy:38)
        at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
        ... 10 more

哪位高手遇到这种问题,请给与指教!
RicardoX 2012-05-18
grails/scripts/_grailswar.groovy,createDescriptorInternal函数处。
                    if(matcher.count>1)
                    {
                        if(matcher[0].count>2)
                        {
                            def name = matcher[0][1].replaceAll('/', /\./)
                            if (name == 'spring.resources') {
                                name = 'resources'
                            }
                            name = name.toString()
                            if (!addedResources.contains(name)) {
                                xml.resource(name)
                                addedResources.add name
                            }
                        }
                    }
Global site tag (gtag.js) - Google Analytics