Search code examples
gradlegrailswar

Why "grails assemble" and "gradle assemble" produces different WAR archive


In Grails 3 the command grails assemble produces WAR archive without several JARs in comparison to gradle assemble:

enter image description here

Why is there this difference and what causes it ?

I have tested it on plain Grails 3.3.9 project.


Solution

  • Actually it is caused by setting grails.env to production in grails assemble command

    So the following commands produces the same WAR archive:

    • grails war
    • grails assemble
    • gradle assemble -Dgrails.env=production