{"action":"opened","issue":{"url":"https://api.github.com/repos/grails/grails-core/issues/10005","repository_url":"https://api.github.com/repos/grails/grails-core","labels_url":"https://api.github.com/repos/grails/grails-core/issues/10005/labels{/name}","comments_url":"https://api.github.com/repos/grails/grails-core/issues/10005/comments","events_url":"https://api.github.com/repos/grails/grails-core/issues/10005/events","html_url":"https://github.com/grails/grails-core/issues/10005","id":161494186,"number":10005,"title":"defaultPackage ignored in application.groovy on 3.1.7","user":{"login":"madeupname","id":1427647,"avatar_url":"https://avatars.githubusercontent.com/u/1427647?v=3","gravatar_id":"","url":"https://api.github.com/users/madeupname","html_url":"https://github.com/madeupname","followers_url":"https://api.github.com/users/madeupname/followers","following_url":"https://api.github.com/users/madeupname/following{/other_user}","gists_url":"https://api.github.com/users/madeupname/gists{/gist_id}","starred_url":"https://api.github.com/users/madeupname/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madeupname/subscriptions","organizations_url":"https://api.github.com/users/madeupname/orgs","repos_url":"https://api.github.com/users/madeupname/repos","events_url":"https://api.github.com/users/madeupname/events{/privacy}","received_events_url":"https://api.github.com/users/madeupname/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-21T17:23:25Z","updated_at":"2016-06-21T17:23:25Z","closed_at":null,"body":"This is using Grails 3.1.7 on JDK8 on Windows 8.1. Initially reported on StackOverflow:\r\n\r\nhttp://stackoverflow.com/questions/37911129/grails-defaultpackage-ignored\r\n\r\nThe configuration setting grails.codegen.defaultPackage does not take effect when in application.groovy as such:\r\n\r\n```\r\ngrails {\r\n    profile = \"web\"\r\n    codegen {\r\n        defaultPackage = 'com.madeupname.web'\r\n    }\r\n    spring{\r\n        transactionManagement{\r\n            proxies = false\r\n        }\r\n    }\r\n}\r\n```\r\nThe app name is not used as a default, either:\r\n\r\n```\r\n| Enter a command name to run. Use TAB for completion:\r\ngrails> create-controller ThingController\r\n| Created grails-app/controllers/@artifact.package.path@/ThingController.groovy\r\n| Created src/test/groovy/@artifact.package.path@/ThingControllerSpec.groovy\r\n\r\n```\r\nIf you place this in application.yml, it works:\r\n```\r\ngrails:\r\n    codegen:\r\n        defaultPackage: com.madeupname.web\r\n```\r\nWhile 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. \r\n\r\nIf 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."}}
{"actor":{"display_login":"madeupname"}}