Grails-Plugin-Consortium / grails-cxf-client

Easy cxf client for grails
http://grails.org/plugin/cxf-client
27 stars 30 forks source link

No config found for the application #37

Closed jonavon closed 10 years ago

jonavon commented 10 years ago

I am trying to incorporate this plugin into another custom plugin.

| Environment set to development.....
| Warning No config found for the application.
| Warning DataSource.groovy not found, assuming dataSource bean is configured by Spring
| Completed wsdl2java

Afterward there are no classes generated. It all works well for regular applications.

ctoestreich commented 10 years ago

You should be able to do this, but the plugin will have to be able to access a config file. This is how it wires up the service client beans. The config.groovy would have to live in the parent project and not in your plugin as that Config.groovy will get wipped out. The way to solve this is to to merge a custom config (MyProjectConfig.groovy) with the main project config inside your config. Make sure to specify that you want your plugin to load before cxf-client. Look around on how to do that. Some info here

http://grails.1312388.n4.nabble.com/Plugins-and-their-default-configuration-td3658265.html

http://www.intelligrape.com/blog/2010/10/15/externalize-and-reload-grails-configuration-dynamically/

I have run into this issue before. Good Luck!

darxriggs commented 10 years ago

I get the "No config found for the application" warning inside the main grails application.

If I change the dependencies in the Wsdl2java.groovy script back to "depends(compile, createConfig, parseArguments)" (it was still there, only commented out) than everything works fine.

Printing the config object with the original "depends(createConfig, parseArguments, classpath)" gives "[grails:[config:[defaults:[locations:[:]], locations:[:]]]]".

ctoestreich commented 10 years ago

I will switch to depending on the compile phase again.

pmoghaddam commented 10 years ago

Yes, please do. It is broken without it. Without finding the config, nothing gets outputted.

carlosfrias commented 10 years ago

I second the fix. Please do it. It was quite the headache to find this.

ctoestreich commented 10 years ago

Will do asap

ctoestreich commented 10 years ago

New version had been released with this added back in.