defaultPackage ignored in application.groovy on 3.1.7 #10005

madeupname opened this Issue Jun 21, 2016 · 1 comment


None yet
3 participants

This is using Grails 3.1.7 on JDK8 on Windows 8.1. Initially reported on StackOverflow:

The configuration setting grails.codegen.defaultPackage does not take effect when in application.groovy as such:

grails {
    profile = "web"
    codegen {
        defaultPackage = 'com.madeupname.web'
            proxies = false

The app name is not used as a default, either:

| Enter a command name to run. Use TAB for completion:
grails> create-controller ThingController
| Created grails-app/controllers/@artifact.package.path@/ThingController.groovy
| Created src/test/groovy/@artifact.package.path@/ThingControllerSpec.groovy

If you place this in application.yml, it works:

        defaultPackage: com.madeupname.web

While it's clear that YAML is the default, the Grails configuration docs describe it as "an alternative format," suggesting that everything should still work in application.groovy.

If that's not the case, the docs should be updated to strike that phrase and include a list of configuration settings that only work in application.yml.


This comment has been minimized.

Show comment
Hide comment

graemerocher Jun 21, 2016


Currently on application.yml is parsed by the command line


graemerocher commented Jun 21, 2016

Currently on application.yml is parsed by the command line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment