Salenda has joined the Adaptavist family!

Continue to site
Salenda has been acquired by Adaptavist.
Find out more about Adaptavist.

How to change WAR name in a Grails 3.X app

Home / Salenda / How to change WAR name in a Grails 3.X app

How to change WAR name in a Grails 3.X app

To allow to change generated WAR name by a Grails 3.X app, the Gradle task war could be used to assign a custom name.
In order to do this, in build.gradle file, the following task needs to be added:

Where war_name could be such as:

  • war.baseName

It could be also another fixed named or based on a variable. If the name want to be based on this tutorial is useful.

To make it works with the former examples, the project needs a based name. To do this, a settings.gradle file has to be created, at the same level as the build.gradle file, with the following content:

Therefore, war.baseName y will have the name specified in this variable.

Miguel García
Miguel García
Miguel is a full-stack web developer working at Salenda since 2013. He has been working with Grails since that year and he has some knowledge about other technologies like Angular. He has also some experience working as a DevOps, leading some projects and he likes to do things as better as he is able to. He usually attend to events or meetings related to the Groovy and Java ecosystem such as Greach, Codemotion and so on.
Recent Posts
Contact Us

You can send us an email and we'll get back to you ASAP. You can put your telephone in the message box and we'll call you as soon as possible

Not readable? Change text. captcha txt

Uso de cookies

Este sitio web utiliza cookies para que usted tenga la mejor experiencia de usuario. Si continúa navegando está dando su consentimiento para la aceptación de las mencionadas cookies. ACEPTAR

Aviso de cookies