0

我一直在尝试为我正在从事的项目安装 grails selenium 插件。我在项目目录中但是,当我执行以下命令时

grails install-plugin selenium

我收到以下错误,

Resolving plugin selenium. Please wait...

:: problems summary ::
:::: WARNINGS
    module not found: org.grails.plugins#selenium;latest.integration

==== grailsPlugins: tried

  -- artifact org.grails.plugins#selenium;latest.integration!selenium.zip:

  /home/jacob/selenium/grailsSelPlugin/selTestApp/lib/selenium-[revision].zip

  /home/jacob/.grails/1.3.8/projects/selTestApp/plugins/selenium-0.1/lib/selenium-[revision].zip

==== grailsHome: tried

  /usr/share/grails/1.3.8/lib/selenium-[revision].xml

  -- artifact org.grails.plugins#selenium;latest.integration!selenium.zip:

  /usr/share/grails/1.3.8/lib/selenium-[revision].zip

==== grailsHome: tried

  /usr/share/grails/1.3.8/dist/selenium-[revision].xml

  -- artifact org.grails.plugins#selenium;latest.integration!selenium.zip:

  /usr/share/grails/1.3.8/dist/selenium-[revision].zip

==== grailsHome: tried

  -- artifact org.grails.plugins#selenium;latest.integration!selenium.zip:

  /usr/share/grails/1.3.8/plugins/grails-selenium-[revision].zip

==== grailsCentral: tried

  -- artifact org.grails.plugins#selenium;latest.integration!selenium.zip:

  http://plugins.grails.org/grails-selenium/tags/LATEST_RELEASE/grails-selenium-[revision].zip

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

    ::          UNRESOLVED DEPENDENCIES         ::

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

    :: org.grails.plugins#selenium;latest.integration: not found

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


Error resolving plugin [name:selenium, group:org.grails.plugins,    
version:latest.integration].
Plugin not found for name [selenium] and version [not specified]

有任何想法吗?我已经尝试过“grails clean”,但除此之外我没有太多想法,也无法在网上找到任何关于此的内容。

4

1 回答 1

0

我再次发现自己在回答自己的问题,但这是对我有用的答案。

首先,我必须安装包含 grails selenium 插件的 zip 文件。我使用的是 grails-selenium-0.8.zip(可以通过 selenium 网站或谷歌搜索找到)。

接下来真正让我感动的是 GRAILS_HOME 环境变量设置不正确。我已经使用 grails 几个月了,安装和清理之类的东西一直在工作,我什至会收到消息

 Grails home is set to: /usr/share/grails/1.3.8

但是,当我使用检查我的环境变量时

env | grep GRAILS_HOME

我什么都没有。所以我进入 .bashrc 并将以下几行添加到该文件的最底部,

export GRAILS_HOME=/usr/share/grails/1.3.8
export PATH=$GRAILS_HOME:$PATH

我重新启动终端并运行

grails install-plugin ../grails-selenium-0.8.zip

终于找到了成功。

于 2012-07-30T20:47:31.233 回答