我对Grails有点陌生,但这里有一个场景:我正在使用Grails 1.3.7,并且我有一个依赖于Hibernate的自定义插件。在myplugingrailplugin。
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:workspaceQA-ITresource-manager/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginscache-headers-1.1.5/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginsenvers-0.1.6/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginsexport-1.0/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginsfamfamfam-1.0.1/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginsfilter-search-1.0.0.2/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginshibernate-1.3.7/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginsjquery-1.6.1.1/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginsjquery-ui-1.8.15/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginsldap-audit-trail-1.4/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginsmail-1.0-SNAPSHOT/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginsresources-1.0.2/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginsspring-security-core-1.2.1/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginsspring-security-ldap-1.0.5/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginsspring-security-ui-0.1.2/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginstomcat-1.3.7/lib/hibernate-[1.3.7,].zip
C:Documents and Settingsglen.macmullin.grails1.3.7projectsresource-managerpluginsyui-minify-resources-0.1.2/lib/hibernate-[1.3.7,].zip
==== grailsHome: tried
C:javagrails-1.3.7lib/hibernate-[1.3.7,].xml
-- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:
C:javagrails-1.3.7lib/hibernate-[1.3.7,].zip
==== grailsHome: tried
C:javagrails-1.3.7dist/hibernate-[1.3.7,].xml
-- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:
C:javagrails-1.3.7dist/hibernate-[1.3.7,].zip
==== grailsHome: tried
-- artifact org.grails.plugins#hibernate;[1.3.7,]!hibernate.zip:
C:javagrails-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 Settingsglen.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 Settingsglen.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 Settingsglen.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 Settingsglen.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:javagrails-1.3.7/plugins/grails-hibernate-1.3.7.zip存在,所以我不知道为什么上面的错误说它找不到C:javagrails-1.3.7/plugins/grails-hibernate-[1.3.7,].zip
以前有人遇到过这个问题吗?欢迎提出任何意见或建议
谢谢
我不确定您是否真的需要显式声明对Hibernate的依赖,因为它本身并不是一个真正的插件,而更像是一个已经融入Grails环境/堆栈的框架组件。