如何从Grails插件更改jar版本?

时间:2013-10-01 14:10:19

标签: java grails grails-plugin

我正在使用这个Grails插件:

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

使用Apache POI。我想更改它当前使用的Apache POI的版本。我需要采取哪些步骤来实现这一目标?

1 个答案:

答案 0 :(得分: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' 
  }
}