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 に答える