grails - Grails 2.0插件依赖性

标签 grails grails-plugin grails-2.0

我正在尝试使用专用插件构建Grails 2.0应用程序:

  • mycompany-frontend = Grails应用程序
  • mycompany-core =域类
  • 的Grails插件

    在mycompany-core插件中,我创建了一些域类,并在BuildConfig.groovy中添加了一个joda-time依赖项:
    plugins {
        build(":tomcat:$grailsVersion",
              ":release:1.0.1",
              ":svn:1.0.2") {
            export = false
        }
        build(":joda-time:1.3.1")
    }
    

    在mycompany-frontend应用程序中,我具有以下BuildConfig.groovy:
    plugins {
        runtime ":hibernate:$grailsVersion"
        runtime ":resources:1.1.5"
        build "mycompany:mycompany-core:0.1-SNAPSHOT"
    
    build ":svn:1.0.2"
    build ":spring-security-core:1.2.7"
        build ":tomcat:$grailsVersion"
    }
    

    我还从application.properties中删除了grails.plugins条目,以避免造成混淆。
    但是最后,mycompany-frontend无法从mycompany-core插件中找到模型类。

    我应该怎么看/解决这个问题?

    最佳答案

    您是否尝试将对核心插件的依赖关系定义为运行时/编译依赖关系而非构建?

    关于grails - Grails 2.0插件依赖性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9295732/

    相关文章:

    tomcat - Grails Tomcat 插件 - 找不到 DeployTask 错误

    grails 2.0 包含资源的简单方法?

    grails - 通过<r:external/>放置JS资源

    javascript - 当我使用ckeditor工具栏时,它会在显示时添加html标签而不是添加所需的效果

    grails - 我可以仅提供一种服务来呈现.gsp和.gson View 吗?普通/粗俗

    grails - Grails 中的简单验证码不显示图像

    grails - Grails 3拦截器作为插件

    grails - 创建简单的插入表单时,Grails字段插件如何工作?

    unit-testing - 使用 spy 模拟方法在测试中的服务(单元测试)中返回的值

    grails - 什么是 "coding by convention"?