【问题标题】:How do I change a jar version from a Grails Plugin?如何从 Grails 插件更改 jar 版本?
【发布时间】:2013-10-01 14:10:19
【问题描述】:

我正在使用这个 Grails 插件:

http://grails.org/plugin/excel-export

使用 Apache POI。我想更改它当前使用的 Apache POI 版本。我需要采取哪些步骤来完成此操作?

【问题讨论】:

    标签: java grails grails-plugin


    【解决方案1】:

    Grails 提供了在解析插件时排除某些依赖项的能力。所以你可以在你的 BuildConfig.groovy 中做:

    dependencies {
      //version need to be replaced to the desired value
      compile('org.apache.poi:poi:version') 
      compile('org.apache.poi:poi-ooxml:version')
    }
    
    plugins {
      compile(":excel-export:0.1.7") {
        //list of dependencies declared inside the plugin that will be ignored.
        excludes 'poi', 'poi-ooxml' 
      }
    }
    

    【讨论】:

    • excludes 'poi', 'poi-ooxml' 就足够了,亲爱的朋友。 ;)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-07-13
    • 2018-02-14
    • 1970-01-01
    • 1970-01-01
    • 2013-11-14
    • 2017-02-18
    • 1970-01-01
    相关资源
    最近更新 更多