0

我对 Grails 有点陌生,但情况如下:我使用的是 Grails 1.3.7,并且我有一个依赖于 Hibernate 的自定义插件。在 MyPluginGrailsPlugin.groovy 我有:

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

该插件使用 maven-publisher 插件部署到我们的 Nexus Maven 存储库。当我尝试在另一个应用程序中安装此插件时,我将以下内容放入 BuildConfig.groovy:

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

当我启动 grails 应用程序或运行时

grails compile

我收到以下错误:

:::: 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

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

奇怪的是,如果我将插件打包为 zip 文件,我可以毫无问题地安装插件。但是,当我们的 Bamboo 构建尝试构建我们的应用程序时,这不会发生。

另外,C:\java\grails-1.3.7/plugins/grails-hibernate-1.3.7.zip 存在,所以不知道为什么上面的错误说找不到 C:\java\grails-1.3 .7/plugins/grails-hibernate-[1.3.7,].zip

有没有人遇到过这个问题?欢迎任何想法或建议

谢谢

4

1 回答 1

0

我不确定您是否真的需要显式声明对 Hibernate 的依赖,因为它本身并不是真正的插件,而是更多已经融入 Grails 环境/堆栈的框架组件。

于 2011-10-12T19:00:44.547 回答