I am updating Grails from 2.1.0to 2.3.7. I have a Maven based project. For the 2.1.0team mvn clean installworks without errors. For 2.3.7he gives:
Compilation error: startup failed:
/home/freyja/fbc/fbc/search-web-app/grails-app/services/pl/psnc/dlteam/fbc2/services/CacheService.groovy: 4: unable to resolve class grails.plugin.cache.Cacheable
@ line 4, column 1.
import grails.plugin.cache.Cacheable
^
/home/freyja/fbc/fbc/search-web-app/grails-app/services/pl/psnc/dlteam/fbc2/services/CacheService.groovy: 3: unable to resolve class grails.plugin.cache.CachePut
@ line 3, column 1.
import grails.plugin.cache.CachePut
^
I tried a new version of the Grails plugin cache- 1.1.1and one that worked fine with Grails 2.1.0, which cache 1.0.0. The error is the same.
I checked what this file looks like CacheService.groovy, and it really has these two imports and seems to need them. I checked that the cachezip plugin was loaded into the folder .m2.
I turn on the plugin cachein pom.xmlthe following way:
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>cache</artifactId>
<version>1.1.1</version>
<scope>compile</scope>
<type>zip</type>
</dependency>
grails compile, , grails run-app. , Maven, . ?
, , , , : Maven, BuildConfig.groovy ? ? , .
Edit:
BuildConfig.groovy :
grails.servlet.version = "2.5"
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
grails.project.dependency.resolver = "maven"
grails.project.dependency.resolution = {
pom true
inherits("global") {
}
log "error"
checksums true
def gebVersion = "0.7.2"
repositories {
inherits true
grailsPlugins()
grailsHome()
grailsCentral()
mavenLocal()
mavenCentral()
}
dependencies {
compile 'org.tuckey:urlrewritefilter:4.0.3'
compile 'commons-httpclient:commons-httpclient:3.1'
compile 'org.apache.httpcomponents:httpclient:4.2.5'
compile 'org.apache.solr:solr-solrj:4.3.0'
test 'co.freeside:betamax:1.1.2'
test "org.codehaus.geb:geb-spock:$gebVersion"
}
plugins {
runtime ":hibernate:3.6.10.12"
runtime ":jquery:1.11.0.1"
runtime ":resources:1.1.6"
test ":spock:0.7"
test ":geb:$gebVersion"
build ":tomcat:7.0.52.1"
runtime ":database-migration:1.3.8"
compile ':cache:1.1.1'
}
}
grails.war.resources = {stagingDir ->
delete(dir: "${stagingDir}/WEB-INF/classes/pl/psnc/dlteam/fbc2/utils/iso693_2")
}
maven? , pom.xml?. .