Quantcast

Strange problem with dependency resolution

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Strange problem with dependency resolution

leonate
Grails 2.0.4, win 7.
Created a fresh empty app with create-app. Checked that run-app works fine.
Then modified BuildConfig.groovy by adding liquibase plugin line like this

compile ":liquibase:1.9.3.6"

Now on run-app it always shows the following error

 module not found: org.grails.plugins#data-source;1.0

Other plugins are resolved fine but this one fails and I am scratching my head for already several hours trying to figure out what can be the reason for  this issue. Recently before this I cleared all grails and ivy caches and now  the grails for some reason cannot resolve this plugin correctly from repo.
I can post full run-app log if needed.

Any help is appreciated.
--
Thanks,
Leo


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Strange problem with dependency resolution

burtbeckwith
You should use the http://grails.org/plugin/database-migration plugin instead of the liquibase plugin. Both use Liquibase, but the database-migration plugin is more actively maintained and has more users, so you're more likely to get help with it here. There's also deeper integration with Grails in the database-migration plugin, in addition to supporting all of the Liquibase features.

Burt

leonate wrote
Grails 2.0.4, win 7.
Created a fresh empty app with create-app. Checked that run-app works fine.
Then modified BuildConfig.groovy by adding liquibase plugin line like this

compile ":liquibase:1.9.3.6"

Now on run-app it always shows the following error

 module not found: org.grails.plugins#data-source;1.0

Other plugins are resolved fine but this one fails and I am scratching my head for already several hours trying to figure out what can be the reason for  this issue. Recently before this I cleared all grails and ivy caches and now  the grails for some reason cannot resolve this plugin correctly from repo.
I can post full run-app log if needed.

Any help is appreciated.
--
Thanks,
Leo
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Strange problem with dependency resolution

leonate
Hi Burt,

Thanks for the advice, I am fully aware of database-migration and will use it for new apps.
But the current project I am working on is using liquibase for 2 years already and is quite large so I assume it will not be an easy to migrate it to use database-migration plugin.
The issue is that after upgrading to grails 2.0.4 and clearing all the caches it fails to build at all because of liquibase dependency issue.  And then I tested on a fresh new application and discovered the same issue. But I am still not sure if this  related to some of  my local environment configuration or this is some global issue due to legacy liquibase plugin.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Strange problem with dependency resolution

bobbywarner
I looked at the source for the old Liquibase plugin and it definitely has this line in LiquibaseGrailsPlugin.groovy:

def dependsOn = [dataSource:"* > 1.0"]

As far as I can tell, there is no such plugin though (at least now, it must have been an old plugin that has since been removed from the plugin portal).

So, it makes perfect sense why Grails 2.0.4 is complaining! :)  You could try downloading the plugin source, commenting out that line in LiquibaseGrailsPlugin.groovy and package up your own version of the plugin.

Or if we could find the source for the old missing "data-source" plugin so you could build a local copy, that would work too.


Hope that helps!
Bobby
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Strange problem with dependency resolution

burtbeckwith
That's the core DataSource plugin, kind of important :)  I assume the problem is with dependsOn, since that's no longer supported in 2.0. You can exclude it though, since the latest dataSource plugin will be available anyway:

   compile(":liquibase:1.9.3.6") {
      exclude 'data-source'
   }

Burt

bobbywarner wrote
I looked at the source for the old Liquibase plugin and it definitely has this line in LiquibaseGrailsPlugin.groovy:

def dependsOn = [dataSource:"* > 1.0"]

As far as I can tell, there is no such plugin though (at least now, it must have been an old plugin that has since been removed from the plugin portal).

So, it makes perfect sense why Grails 2.0.4 is complaining! :)  You could try downloading the plugin source, commenting out that line in LiquibaseGrailsPlugin.groovy and package up your own version of the plugin.

Or if we could find the source for the old missing "data-source" plugin so you could build a local copy, that would work too.


Hope that helps!
Bobby
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Strange problem with dependency resolution

leonate
In reply to this post by bobbywarner
Burt, Bobby, thanks for your help!

That's what I suspected.

Exclusion of the data-source plugin seems to be working fine for me!

--
Leo
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Strange problem with dependency resolution

bobbywarner
Burt,
My bad.  For some reason when I read the message, I thought this was some other old plugin as opposed to the core one since it was hyphenated (data-source) as opposed to one word (datasource) which is obviously wrong.  I'm dumb, ha! :)

Leo,
Glad you got it working.


Thanks,
Bobby
Loading...