Search code examples
gradlegrailswar

Grails 6: Unable to generate WAR after upgrade from v5


I just updated from Grails 5 to 6.1.2 and I can't figure out how to generate my war files anymore. I can't use the grailsw anymore since it doesn't seem to be supported. I used to run ./grailsw <env> war to get my war file for the specific environment. How do I do that now that grailsw is no longer a thing? I know I can generate war files with gradlew but I can't specify the environment. Plus, the war files generated from that command are very different than the war generated from grailsw

When I try running the war command from the CLI like the documentation says I get the following error:

PS C:\Users\xxxx\Workspaces\Intellij\wems> grails test war 
Unmatched arguments from index 0: 'test', 'war' 
Did you mean: grails create-restapi or grails create-app or grails create-plugin?

Solution

  • The great folks on the Grails slack channel advised me that they have a released an updated version of the Grails Wrapper file so all my old commands can continue working

    https://github.com/grails/grails-wrapper/releases/tag/v4.0.0

    Replacing my old wrapper files with these updated versions did the job