Intellij IDEA 11.0.2 не может разрешить зависимости от Grails 2.0.0 - PullRequest
2 голосов
/ 03 февраля 2012

Это мой первый вопрос, и я надеюсь, что он еще не был задан.Проблема:

Каждый раз, когда я создаю новое приложение с использованием 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

Есть мысли?Я уже искал решение, но не совсем нашел то, что искал.

1 Ответ

2 голосов
/ 03 февраля 2012

Проверьте BuildConfig.groovy для жестко закодированных номеров версий на плагинах. Это должно быть ссылка $grailsVersion:

grails.project.dependency.resolution = {
    . . .
    plugins {
        runtime ":hibernate:$grailsVersion"
        build ":tomcat:$grailsVersion"
        . . .
    }
    . . .
}

Проверьте application.properties, чтобы убедиться, что это правильно:

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

Также проверьте версию библиотеки IDEA Grails в настройках проекта -> Глобальные библиотеки.


Я только что установил патч на 11.0.2 и успешно создал новый проект Grails 2.0.0.

Возможно, ваша установка Grails 2.0.0 повреждена. Попробуйте чистую установку Grails:

  1. Удалить глобальную библиотеку Grails 2.0.0 из IDEA.
  2. Установите Grails 2.0.0 в новый каталог.
  3. Создайте новый проект Grails в IDEA и используйте кнопку «Создать ...» для настройки новой установки.
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...