Skip to content

Grails 3.1.0+ produces the wrong war name #9845

@pankajtandon

Description

@pankajtandon

I'm building 2 webapps using Grails 3.1.4 But running 'grails war' in webappB ends up generating webappA into its build/.mainClass.

I'm seeing this in all versions post 3.1.0. Here is what I tried:

//Install grails 3.0.9 to get correct behavior first:
pankajs-MBP:a309 pankaj$ grails -version

| Grails Version: 3.0.9
| Groovy Version: 2.4.5
| JVM Version: 1.8.0_65



//Create an app
grails create-app a309

cd a309

//Generate the war
grails war

//Check the generated app name and confirm that it is correct:
pankajs-MBP:a309 pankaj$ cat build/.mainClass 
a309.Application


//Generate another webapp with a new name
grails create-app a309x

cd a309x

grails war

//Confirm it's correct again:
pankajs-MBP:a309x pankaj$ cat build/.mainClass 
a309x.Application

//Bump up version to 3.1.0
pankajs-MBP: pankaj$ sdk default grails 3.1.0

Default grails version set to 3.1.0

//Create a new webapp:
grails create-app a310

cd a310

grails war

//Generates a war from an OLD app I'd generated with 3.1.4!
pankajs-MBP:a310 pankaj$ cat build/.mainClass 
hello4.Application

Note that hello4.Application is being pulled out of a previous grails war that was run under grails 3.1.4

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions