Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defaultPackage ignored in application.groovy on 3.1.7 #10005

Closed
madeupname opened this issue Jun 21, 2016 · 1 comment
Closed

defaultPackage ignored in application.groovy on 3.1.7 #10005

madeupname opened this issue Jun 21, 2016 · 1 comment
Assignees
Milestone

Comments

@madeupname
Copy link

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

http://stackoverflow.com/questions/37911129/grails-defaultpackage-ignored

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

grails {
    profile = "web"
    codegen {
        defaultPackage = 'com.madeupname.web'
    }
    spring{
        transactionManagement{
            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:

grails:
    codegen:
        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.

@graemerocher
Copy link
Member

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
Projects
None yet
Development

No branches or pull requests

3 participants