我正在尝试添加一个目录(garils-app/store
)对我的战争就像这样BuildConfig.groovy
.
grails.war.resources = {stagingDir,args->
copy(file: "grails-app/store/**", toFile: "${stagingDir}/store")
}
但是当我尝试构建 war 文件时,我收到此错误:
| Error WAR packaging error: Warning: Could not find file /home/codehx/git/appName/grails-app/store/** to copy
.
看起来 grails 没有考虑**
作为通配符,我有任何错误吗?或者,如果不可能,我如何递归复制内容store
目录到我的战争文件。
鉴于grails.war.resources
is an AntBuilder
你可以使用任何合适的AntBuilder
包含附加资源的表达式。在旧版本中AntBuilder
the **
符号确实有效,但在后来的版本中AntBuilder
首选方法是:
grails.war.resources = { stagingDir, args ->
copy(todir: "${stagingDir}/store") {
fileset(dir: "grails-app/store")
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)