I added plugins.joda-time=1.3.1
to application.properties and it is working now, I have found the solution here http://jonpolaski.blogspot.com/2013/04/grails-2x-excel-import-via-file-upload.html
Is there a plugin for Excel import for grails 2.2.0?
-
12-07-2023 - |
문제
Is there a plugin for Excel import for grails 2.2.0? I tried to use http://grails.org/plugin/excel-import, but it shows me the following error:
...\services\org\grails\plugins\excelimport\ExcelImportService.groovy: 4: unable to resolve class org. joda.time.LocalDate @ line 4, column 1. import org.joda.time.LocalDate ^ 1 error
Here is the part of BuildConfig.groovy
repositories {
...
mavenRepo "http://repo.grails.org/grails/libs-releases/"
mavenRepo "http://m2repo.spockframework.org/ext/"
}
plugins {
compile ":excel-import:1.0.0"
...
}
Any help is appreciated.
해결책 3
다른 팁
Make sure you added the extra dependency repositories:
mavenRepo "http://repo.grails.org/grails/libs-releases/"
mavenRepo "http://m2repo.spockframework.org/ext/"
to the maven repo section in BuildConfig. Seems like it can't find a dependency it needs (JodaTime in this case) Hope it helps.
just in case of someone need it. when i was in same trouble on grails 2.4.4 i use in my buildconfig: compile ":excel-import:2.0.0.BUILD-SNAPSHOT"
You can add the following to dependencies to get the jodatime:
compile "org.jadira.usertype:usertype.jodatime:1.9"
However that still leaves issues with the excel-import:1.0.0
That import uses deprecated classes and won't compile with grails 2.4
There is a version named excel-import:1.0.1 which you can find on Git. Does anyone know how to install that?