alexgorbatchev

Tuesday, April 5, 2016

Grails 3 war file naming issues in Jenkins

Correcting the war file/artifact/package name in grails package

By default my Jenkins build server puts its projects into a directory called 'workspace' so when I run grails package it creates a war/jar called workspace-0.1.war/jar.  In order to generate the correct jar/war file name, you can create a file called settings.gradle in the root of the project with a single property rootProject.name and specify the name you would like:

and when you run grails package it will create the appropriate my-project-0.1.jar/war

Resources:

  • http://stackoverflow.com/questions/32976039/how-do-you-change-the-application-name-in-grails-3