I have a grails app and the groovy under /src/groovy has import statements for Java POI HSSF for example
import org.apache.poi.hssf.usermodel.HSSFWorkbook
import org.apache.poi.hssf.usermodel.HSSFCellStyle
What is the best way to add POI to my grails app so its deployed with the war. I tried adding the jars to /lib and then adding them as runtime dependencies in BuilConfig.groovy.
dependencies {
runtime 'mysql:mysql-connector-java:5.1.22'
runtime 'poi-3.9-20121203'
runtime 'poi-ooxml-3.9'
runtime 'poi-ooxml-schemas-3.9'
runtime 'xml-apis-ext-1.3.04'
runtime 'xmlbeans-2.3.0'
runtime 'xmlpull-1.1.3.1'
runtime 'xstream-1.4.7'
}
I also tried adding it as a compile plugin this way
plugins {
runtime ":hibernate:3.6.10.13"
compile ":excel-import:1.0.0"
}
Both generate this error on grails war
java.lang.NoClassDefFoundError: _GrailsClasspath_groovy$_run_closure1
EDIT: my repositories has maven but still complains about missing class def Read jars from lib folder in grails