Intellij IDEA 11.0.2无法解析对Grails 2.0.0的依赖关系

Intellij IDEA 11.0.2无法解析对Grails 2.0.0的依赖关系,grails,groovy,intellij-idea,Grails,Groovy,Intellij Idea,这是我在这里的第一个问题,我希望还没有人问过。 问题: 每次我使用Intellij IDEA 11.0.2 build 111.277和新的Grails 2.0.0创建新的应用程序时,我都会得到以下堆栈跟踪: | Loading Grails 2.0.0 | Configuring classpath :: problems summary :: :::: WARNINGS module not found: org.grails.plugins#tomcat;1.3.7

这是我在这里的第一个问题,我希望还没有人问过。 问题:

每次我使用Intellij IDEA 11.0.2 build 111.277和新的Grails 2.0.0创建新的应用程序时,我都会得到以下堆栈跟踪:

| Loading Grails 2.0.0
| Configuring classpath
:: problems summary ::
:::: WARNINGS
        module not found: org.grails.plugins#tomcat;1.3.7
    ==== grailsPlugins: tried
      -- artifact org.grails.plugins#tomcat;1.3.7!tomcat.zip:
      /home/Mircea/IdeaProjects/lib/tomcat-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/SDKs/grails-2.0.0/lib/org.grails.plugins/tomcat/ivy-1.3.7.xml
      -- artifact org.grails.plugins#tomcat;1.3.7!tomcat.zip:
      /home/Mircea/SDKs/grails-2.0.0/lib/org.grails.plugins/tomcat/jars/tomcat-1.3.7.zip
      /home/Mircea/SDKs/grails-2.0.0/lib/org.grails.plugins/tomcat/bundles/tomcat-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/SDKs/grails-2.0.0/src/libs/tomcat-1.3.7.xml
      -- artifact org.grails.plugins#tomcat;1.3.7!tomcat.zip:
      /home/Mircea/SDKs/grails-2.0.0/src/libs/tomcat-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/SDKs/grails-2.0.0/dist/tomcat-1.3.7.xml
      -- artifact org.grails.plugins#tomcat;1.3.7!tomcat.zip:
      /home/Mircea/SDKs/grails-2.0.0/dist/tomcat-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/.grails/2.0.0/cached-installed-plugins/tomcat-1.3.7.xml
      -- artifact org.grails.plugins#tomcat;1.3.7!tomcat.zip:
      /home/Mircea/.grails/2.0.0/cached-installed-plugins/tomcat-1.3.7.zip
    ==== grailsHome: tried
      -- artifact org.grails.plugins#tomcat;1.3.7!tomcat.zip:
      /home/Mircea/SDKs/grails-2.0.0/plugins/tomcat-1.3.7.zip
        module not found: org.grails.plugins#hibernate;1.3.7
    ==== grailsPlugins: tried
      -- artifact org.grails.plugins#hibernate;1.3.7!hibernate.zip:
      /home/Mircea/IdeaProjects/lib/hibernate-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/SDKs/grails-2.0.0/lib/org.grails.plugins/hibernate/ivy-1.3.7.xml
      -- artifact org.grails.plugins#hibernate;1.3.7!hibernate.zip:
      /home/Mircea/SDKs/grails-2.0.0/lib/org.grails.plugins/hibernate/jars/hibernate-1.3.7.zip
      /home/Mircea/SDKs/grails-2.0.0/lib/org.grails.plugins/hibernate/bundles/hibernate-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/SDKs/grails-2.0.0/src/libs/hibernate-1.3.7.xml
      -- artifact org.grails.plugins#hibernate;1.3.7!hibernate.zip:
      /home/Mircea/SDKs/grails-2.0.0/src/libs/hibernate-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/SDKs/grails-2.0.0/dist/hibernate-1.3.7.xml
      -- artifact org.grails.plugins#hibernate;1.3.7!hibernate.zip:
      /home/Mircea/SDKs/grails-2.0.0/dist/hibernate-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/.grails/2.0.0/cached-installed-plugins/hibernate-1.3.7.xml
      -- artifact org.grails.plugins#hibernate;1.3.7!hibernate.zip:
      /home/Mircea/.grails/2.0.0/cached-installed-plugins/hibernate-1.3.7.zip
    ==== grailsHome: tried
      -- artifact org.grails.plugins#hibernate;1.3.7!hibernate.zip:
      /home/Mircea/SDKs/grails-2.0.0/plugins/hibernate-1.3.7.zip
        ::::::::::::::::::::::::::::::::::::::::::::::
        ::          UNRESOLVED DEPENDENCIES         ::
        ::::::::::::::::::::::::::::::::::::::::::::::
        :: org.grails.plugins#tomcat;1.3.7: not found
        :: org.grails.plugins#hibernate;1.3.7: not found
        ::::::::::::::::::::::::::::::::::::::::::::::

:: problems summary ::
:::: WARNINGS
        module not found: org.grails.plugins#tomcat;1.3.7
    ==== grailsPlugins: tried
      -- artifact org.grails.plugins#tomcat;1.3.7!tomcat.zip:
      /home/Mircea/IdeaProjects/lib/tomcat-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/SDKs/grails-2.0.0/lib/org.grails.plugins/tomcat/ivy-1.3.7.xml
      -- artifact org.grails.plugins#tomcat;1.3.7!tomcat.zip:
      /home/Mircea/SDKs/grails-2.0.0/lib/org.grails.plugins/tomcat/jars/tomcat-1.3.7.zip
      /home/Mircea/SDKs/grails-2.0.0/lib/org.grails.plugins/tomcat/bundles/tomcat-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/SDKs/grails-2.0.0/src/libs/tomcat-1.3.7.xml
      -- artifact org.grails.plugins#tomcat;1.3.7!tomcat.zip:
      /home/Mircea/SDKs/grails-2.0.0/src/libs/tomcat-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/SDKs/grails-2.0.0/dist/tomcat-1.3.7.xml
      -- artifact org.grails.plugins#tomcat;1.3.7!tomcat.zip:
      /home/Mircea/SDKs/grails-2.0.0/dist/tomcat-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/.grails/2.0.0/cached-installed-plugins/tomcat-1.3.7.xml
      -- artifact org.grails.plugins#tomcat;1.3.7!tomcat.zip:
      /home/Mircea/.grails/2.0.0/cached-installed-plugins/tomcat-1.3.7.zip
    ==== grailsHome: tried
      -- artifact org.grails.plugins#tomcat;1.3.7!tomcat.zip:
      /home/Mircea/SDKs/grails-2.0.0/plugins/tomcat-1.3.7.zip
        module not found: org.grails.plugins#hibernate;1.3.7
    ==== grailsPlugins: tried
      -- artifact org.grails.plugins#hibernate;1.3.7!hibernate.zip:
      /home/Mircea/IdeaProjects/lib/hibernate-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/SDKs/grails-2.0.0/lib/org.grails.plugins/hibernate/ivy-1.3.7.xml
      -- artifact org.grails.plugins#hibernate;1.3.7!hibernate.zip:
      /home/Mircea/SDKs/grails-2.0.0/lib/org.grails.plugins/hibernate/jars/hibernate-1.3.7.zip
      /home/Mircea/SDKs/grails-2.0.0/lib/org.grails.plugins/hibernate/bundles/hibernate-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/SDKs/grails-2.0.0/src/libs/hibernate-1.3.7.xml
      -- artifact org.grails.plugins#hibernate;1.3.7!hibernate.zip:
      /home/Mircea/SDKs/grails-2.0.0/src/libs/hibernate-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/SDKs/grails-2.0.0/dist/hibernate-1.3.7.xml
      -- artifact org.grails.plugins#hibernate;1.3.7!hibernate.zip:
      /home/Mircea/SDKs/grails-2.0.0/dist/hibernate-1.3.7.zip
    ==== grailsHome: tried
      /home/Mircea/.grails/2.0.0/cached-installed-plugins/hibernate-1.3.7.xml
      -- artifact org.grails.plugins#hibernate;1.3.7!hibernate.zip:
      /home/Mircea/.grails/2.0.0/cached-installed-plugins/hibernate-1.3.7.zip
    ==== grailsHome: tried
      -- artifact org.grails.plugins#hibernate;1.3.7!hibernate.zip:
      /home/Mircea/SDKs/grails-2.0.0/plugins/hibernate-1.3.7.zip
        ::::::::::::::::::::::::::::::::::::::::::::::
        ::          UNRESOLVED DEPENDENCIES         ::
        ::::::::::::::::::::::::::::::::::::::::::::::
        :: org.grails.plugins#tomcat;1.3.7: not found
        :: org.grails.plugins#hibernate;1.3.7: not found
        ::::::::::::::::::::::::::::::::::::::::::::::

| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

- org.grails.plugins:tomcat:1.3.7
- org.grails.plugins:hibernate:1.3.7

有什么想法吗?我已经搜索了解决方案,但没有完全找到我想要的。

检查
BuildConfig.groovy
以获取插件上的硬编码版本号。它应该引用
$grailsVersion

grails.project.dependency.resolution = {
    . . .
    plugins {
        runtime ":hibernate:$grailsVersion"
        build ":tomcat:$grailsVersion"
        . . .
    }
    . . .
}
检查
应用程序属性
以确保其正确性:

app.grails.version=2.0.0
plugins.hibernate=2.0.0
plugins.tomcat=2.0.0

在项目设置->全局库中检查IDEA Grails库版本


我刚刚升级到11.0.2,并成功创建了一个新的Grails2.0.0项目

您的Grails2.0.0安装可能已损坏。尝试干净地安装Grails:

  • 从IDEA中删除Grails2.0.0全局库
  • 将Grails2.0.0安装到新目录中
  • 在IDEA中创建一个新的Grails项目,并使用“Create…”按钮设置新的安装

  • 它们与BuildConfig.groovy中的类似。还有其他想法吗?项目设置->全局库->Grails 2.0.0版本库插件{runtime:hibernate:$grailsVersion“runtime”:jquery:1.7.1“runtime”:参考资料:1.1.5“build”:tomcat:$grailsVersion“}
    code
    I get:$grails clean |配置类路径| Error/home/../IdeaProjects/TestG2似乎不是grails应用程序的一部分错误项目外部支持以下命令:如果运行grails create app,则会出现涉及这两个依赖项的相同错误。我仍然会遇到|错误无法解析依赖项(有关详细信息,请在BuildConfig.groovy中将日志级别设置为“warn”):-org.grails.plugins:tomcat:1.3.7-org.grails.plugins:hibernate:1.3.7,在我将其安装到其他文件夹中之后。