grails - Grails自己的插件错误ActiveMQ

标签 grails plugins groovy

我正在为集成服务创建自己的插件,但是当我将其插入项目中时,出现错误。为什么应用程序会引发此异常?

Error Fatal error during compilation org.codehaus.groovy.control.MultipleCompilationErrorsException:



[BuildConfig]
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"

grails.project.fork = [
    // configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required
    //  compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true],

    // configure settings for the test-app JVM, uses the daemon by default
    test: [maxMemory: 1024, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
    // configure settings for the run-app JVM
    run: [maxMemory: 1024, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
    // configure settings for the run-war JVM
    war: [maxMemory: 1024, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
    // configure settings for the Console UI JVM
    console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
]

grails.project.dependency.resolver = "maven" // or ivy
grails.project.dependency.resolution = {
    // inherit Grails' default dependencies
    inherits("global") {
        // uncomment to disable ehcache
        // excludes 'ehcache'
    }
    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    repositories {
        //grailsHome()

        grailsCentral()
        mavenCentral()
        mavenLocal()

        // uncomment the below to enable remote dependency resolution
        // from public Maven repositories
        //mavenRepo "http://repository.codehaus.org"
        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"
    }
    dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
        // runtime 'mysql:mysql-connector-java:5.1.27'
        compile('org.apache.activemq:activemq-core:5.7.0',
                'org.apache.activemq:activeio-core:3.1.4',
                'org.apache.xbean:xbean-spring:3.17') {
                excludes 'activemq-openwire-generator'
                excludes 'commons-logging'
                excludes 'xalan'
                excludes 'xml-apis'
                exported = false
       }
    }

    plugins {
        build(":release:3.0.1",
              ":rest-client-builder:1.0.3") {
            export = false
        }
        compile ":jms:1.3"

    }
}

[插件描述符]
def doWithSpring = {
        jmsConnectionFactory(ActiveMQConnectionFactory) {
            brokerURL = "tcp://localhost:61616"
        }
    }

错误信息
ExpediaGrailsPlugin.groovy: 1: unable to resolve class org.apache.activemq.ActiveMQConnectionFactory
 @ line 1, column 1.
   import org.apache.activemq.ActiveMQConnectionFactory

最佳答案

删除export = false,它将起作用。老实说,我不明白为什么。添加export = false时,依赖关系报告中缺少activemq-core。

关于grails - Grails自己的插件错误ActiveMQ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23662475/

相关文章:

grails - <g:each>的问题

mysql - Grails 中的 Cloud Foundry v2

jquery - 寻找一个可以模糊/隐藏文本的 jQuery 插件

c++ - 编译 quantum gis dtclassifier c++ 插件

grails - grails枚举类型验证未按预期工作

javascript - 创建jquery插件: run only once per selector

java - 在 Elasticsearch 中查询以返回给定短语的所有结果

groovy - 如何使用 jmeter 和 groovy 在 IF CONTROLLER 中添加条件

grails - hasMany 和 hasOne 在 Grails 中如何工作?

grails - 具有多个多对多关联的GORM 'where criteria'