{"action":"opened","issue":{"url":"https://api.github.com/repos/grails/grails-core/issues/9152","labels_url":"https://api.github.com/repos/grails/grails-core/issues/9152/labels{/name}","comments_url":"https://api.github.com/repos/grails/grails-core/issues/9152/comments","events_url":"https://api.github.com/repos/grails/grails-core/issues/9152/events","html_url":"https://github.com/grails/grails-core/issues/9152","id":98148375,"number":9152,"title":"Inline plugin dependencies break app","user":{"login":"topa3k","id":1979681,"avatar_url":"https://avatars.githubusercontent.com/u/1979681?v=3","gravatar_id":"","url":"https://api.github.com/users/topa3k","html_url":"https://github.com/topa3k","followers_url":"https://api.github.com/users/topa3k/followers","following_url":"https://api.github.com/users/topa3k/following{/other_user}","gists_url":"https://api.github.com/users/topa3k/gists{/gist_id}","starred_url":"https://api.github.com/users/topa3k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topa3k/subscriptions","organizations_url":"https://api.github.com/users/topa3k/orgs","repos_url":"https://api.github.com/users/topa3k/repos","events_url":"https://api.github.com/users/topa3k/events{/privacy}","received_events_url":"https://api.github.com/users/topa3k/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-30T11:47:32Z","updated_at":"2015-07-30T11:47:32Z","closed_at":null,"body":"Steps to reproduce\r\n\r\n1. `grails create-app test251`\r\n2. `grails create-plugin test251plugin1`\r\n3. `grails create-plugin test251plugin2`\r\n4. `cd test251plugin2`\r\n5. `grails create-domain-class com.test.Test`\r\n\r\nProject test251: BuildConfig.groovy\r\n`grails.plugin.location.'test251plugin1' = \"../test251plugin1\"`\r\n\r\nPlugin test251plugin1: BuildConfig.groovy\r\n`grails.plugin.location.'test251plugin2' = \"../test251plugin2\"`\r\n\r\nPlugin test251plugin2: Test.groovy\r\n```\r\nclass Test {\r\n\tString test\r\n    static constraints = {\r\n    }\r\n}\r\n```\r\n\r\nProject test251: Bootstrap.groovy\r\n```\r\nclass BootStrap {\r\n\r\n    def init = { servletContext ->\r\n    \tnew Test(test:\"test\").save(failOnError:true, flush:true)\r\n    }\r\n    def destroy = {\r\n    }\r\n}\r\n\r\n```\r\n\r\n\r\nNow when you do `grails run-app` you'll get:\r\n```\r\nError initializing the application: Method on class [com.test.Test] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails correctly.\r\n```\r\n\r\nIf only you switch grails to 2.5.0 everything works as expected.\r\n\r\n"}}