Grails 4 WAR file confusion

十年热恋 提交于 2020-06-16 23:44:51

问题


I have a Grails application that I have upgraded from 3.3.0 to 4.0.3. In my build.gradle file I have the following

war {
    archiveName 'Wolf.war'
}

In version 3, this would name my war file Wolf.war when running "grails war" just as expected. However, in Grails 4 this no longer works for me. I know this is related to Gradle. I have Gradle 5.1.1, and per the docs the archiveName property is deprecated (but should still work?).

My question is, what is the proper way, in a Grails 4 app using Gradle 5 (or above?) to force the name of the war file being produced by the "grails war" command?


回答1:


Assuming you are using the default build config, you should use bootWar instead of war.

bootWar {
    archiveName 'Wolf.war'
}


来源:https://stackoverflow.com/questions/61939116/grails-4-war-file-confusion

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