【问题标题】:Grails 2.2.1 does not recognize the "release" plugin is installed from BuildConfig.groovyGrails 2.2.1 无法识别从 BuildConfig.groovy 安装的“发布”插件
【发布时间】:2013-06-22 18:14:15
【问题描述】:

我需要在 2.2.1 中使用 Grails “发布”插件,并将其添加到我的 BuildConfig.groovy 中的插件中:

    plugins {
        runtime ":hibernate:$grailsVersion"
        runtime ":jquery:1.8.3"
        runtime ":resources:1.1.6"
        build ":tomcat:$grailsVersion"
        runtime ":database-migration:1.3.2", ":cors:1.1.0"
        compile ':cache:1.0.1'
        build ":release:2.2.1"
    }

我尝试运行 maven-deploy:

$ grails prod maven-deploy --repository=releases --verbose --non-interactive
| Loading Grails 2.2.1
| Error WARNING: Configurational method [:release:2.2.1] in grails-app/conf/BuildConfig.groovy doesn't exist. Ignoring..
| Error WARNING: Configurational method [build] in grails-app/conf/BuildConfig.groovy doesn't exist. Ignoring..
| Running pre-compiled script
| Error Script not found: MavenDeploy

或者(在 BuildConfig.groovy 从构建更改为编译时):

| Running pre-compiled script
| Error Script not found: MavenDeploy

我尝试列出发布插件不存在的插件:

$ grails list-plugins --installed
Plug-ins you currently have installed are listed below:
-------------------------------------------------------------
cache               1.0.1            --  Cache Plugin
common-domain       1.2.4            --  Common Domain Plugin
cors                1.1.0            --  CORS Plugin
database-migration  1.3.2            --  Grails Database Migration Plugin
hibernate           2.2.1            --  Hibernate for Grails
jquery              1.8.3            --  JQuery for Grails
resources           1.1.6            --  Resources
tomcat              2.2.1            --  Apache Tomcat plugin for Grails
webxml              1.4.1            --  WebXmlConfig

我使用已弃用的 install-plugin 目标让它工作。 我不知道为什么这不起作用,并且想知道是否有人可以对此有所了解。谢谢

【问题讨论】:

    标签: grails grails-plugin grails-2.0


    【解决方案1】:

    BuildConfig.groovy 中为release 插件添加条目后,执行grails compile 或只是grails run-app。我通常更喜欢grails clean && grails compile

    清理编译后,可以查看已安装插件列表
    grails list-plugins --installed

    它一直对我有用。 :-)

    【讨论】:

      【解决方案2】:

      确保 $GRAILS_HOME 环境变量已设置并指向文件系统上的正确位置。

      【讨论】:

        猜你喜欢
        • 2019-09-30
        • 2011-10-12
        • 2015-04-27
        • 2014-10-31
        • 2014-10-20
        • 1970-01-01
        • 1970-01-01
        • 2011-09-21
        • 1970-01-01
        相关资源
        最近更新 更多