Putting more info in a grails wars

こ雲淡風輕ζ 提交于 2019-12-11 13:54:23

问题


Grails allows us to package up a war very easily with

grails war

I would likemore meta - info somewhere in the war. What time it was built at etc. Is there a switch that will create such a file and fill it with meta info.


回答1:


AFAIK there is no switch to add metadata about the war creation but you can add/delete contents to war during war generation by using this entry in BuildConfig.

grails.war.resources = { stagingDir ->
    copy(todir: "${stagingDir}") {
        fileset(dir:"${basedir}/path/to/your/meta-info/files") {
            //Exclude unwanted files
            exclude(name:"**/excluded-file")
        }
    }

    //In case you want to remove something from the staging dir
    delete(file:"${stagingDir}/WEB-INF/lib/<deleteSome.jar>")
}


来源:https://stackoverflow.com/questions/18316132/putting-more-info-in-a-grails-wars

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!