0

I'm a little new to Grails, but here's the scenario: I'm using Grails 1.3.7 and I have a custom plugin with a dependency on Hibernate. In the MyPluginGrailsPlugin.groovy I have:

def dependsOn = [hibernate: "1.3.7 > *"]

This plugin is deployed to our Nexus Maven repo using the maven-publisher plugin. When I try to install this plugin in another app, I put the following in BuildConfig.groovy:

plugins {
    build 'com.domain.project:my-plugin:1.0.0.5'
}

When I start up the grails app or run

grails compile

I get the following error:

:::: WARNINGS
module not found: org.grails.plugins#hibernate;[1.3.7,]

==== grailsPlugins: tried

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  C:\workspace\QA-IT\resource-manager/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\cache-headers-1.1.5/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\envers-0.1.6/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\export-1.0/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\famfamfam-1.0.1/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\filter-search-1.0.0.2/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\hibernate-1.3.7/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\jquery-1.6.1.1/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\jquery-ui-1.8.15/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\ldap-audit-trail-1.4/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\mail-1.0-SNAPSHOT/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\resources-1.0.2/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\spring-security-core-1.2.1/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\spring-security-ldap-1.0.5/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\spring-security-ui-0.1.2/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\tomcat-1.3.7/lib/hibernate-[1.3.7,].zip

  C:\Documents and Settings\glen.macmullin\.grails\1.3.7\projects\resource-manager\plugins\yui-minify-resources-0.1.2/lib/hibernate-[1.3.7,].zip

==== grailsHome: tried

  C:\java\grails-1.3.7\lib/hibernate-[1.3.7,].xml

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  C:\java\grails-1.3.7\lib/hibernate-[1.3.7,].zip

==== grailsHome: tried

  C:\java\grails-1.3.7\dist/hibernate-[1.3.7,].xml

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  C:\java\grails-1.3.7\dist/hibernate-[1.3.7,].zip

==== grailsHome: tried

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  C:\java\grails-1.3.7/plugins/grails-hibernate-[1.3.7,].zip

==== grailsCentral: tried

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  http://svn.codehaus.org/grails-plugins/grails-hibernate/tags/RELEASE_[1_3_7,]/grails-hibernate-[1.3.7,].zip

==== grailsCore: tried

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  http://svn.codehaus.org/grails/trunk/grails-plugins/grails-hibernate/tags/RELEASE_[1_3_7,]/grails-hibernate-[1.3.7,].zip

==== localMavenResolver: tried

  C:\Documents and Settings\glen.macmullin/.m2/repository/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].pom

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  C:\Documents and Settings\glen.macmullin/.m2/repository/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].zip

==== http://cbswdb002:8081/nexus/content/groups/public/: tried

  http://cbswdb002:8081/nexus/content/groups/public/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].pom

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  http://cbswdb002:8081/nexus/content/groups/public/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].zip

==== https://repository.jboss.org/nexus/content/groups/public-jboss/: tried

  https://repository.jboss.org/nexus/content/groups/public-jboss/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].pom

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  https://repository.jboss.org/nexus/content/groups/public-jboss/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].zip

==== http://download.java.net/maven/2/: tried

  http://download.java.net/maven/2/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].pom

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  http://download.java.net/maven/2/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].zip

==== mavenCentral: tried

  http://repo1.maven.org/maven2/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].pom

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  http://repo1.maven.org/maven2/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].zip

==== ebrRelease: tried

  http://repository.springsource.com/maven/bundles/release/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].pom

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  http://repository.springsource.com/maven/bundles/release/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].zip

==== ebrExternal: tried

  http://repository.springsource.com/maven/bundles/external/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].pom

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  http://repository.springsource.com/maven/bundles/external/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].zip

==== localMavenResolver: tried

  C:\Documents and Settings\glen.macmullin/.m2/repository/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].pom

  -- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:

  C:\Documents and Settings\glen.macmullin/.m2/repository/org/grails/plugins/hibernate/[1.3.7,]/hibernate-[1.3.7,].zip

    ::::::::::::::::::::::::::::::::::::::::::::::

    ::          UNRESOLVED DEPENDENCIES         ::

    ::::::::::::::::::::::::::::::::::::::::::::::

    :: org.grails.plugins#hibernate;[1.3.7,]: not found

    ::::::::::::::::::::::::::::::::::::::::::::::

The weird thing is if I package my plugin as a zip file, I can install the plugin without any problems. However, this won't when our Bamboo build tries to build our app.

Also, C:\java\grails-1.3.7/plugins/grails-hibernate-1.3.7.zip exists, so I don't know why the above errors say it can't find C:\java\grails-1.3.7/plugins/grails-hibernate-[1.3.7,].zip

Has anyone come across this problem before? Any ideas or suggests are welcomed

Thanks

user120840
  • 33
  • 1
  • 6

1 Answers1

0

I'm not sure that you actually need to explicitly declare a dependency on Hibernate, as it's not really a plugin per se but more of a framework component that's already baked into the Grails environment/stack.

Aquatoad
  • 778
  • 8
  • 21
  • 1
    If we remove the dependsOn, our test fail - the plugin creates Hibernate interceptors. Perhaps we should add Hibernate into our dependencies in BuildConfig.groovy instead. Thanks for the comment – user120840 Oct 12 '11 at 20:11
  • you were right, you don't need to specify dependsOn for hibernate since it's bundled in grails 1.3.7. Thanks! – user120840 Oct 13 '11 at 17:38
  • User120840's comment did the job for me. I needed to add the hibernate plugin to the plugin dependencies in BuildConfig.groovy of the plugin I was writing in order to test it. – Daniel Bower Oct 31 '12 at 15:00