开发者

Compilation error with Grails 1.3.7 and springcache plugin 1.2.1

开发者 https://www.devze.com 2023-04-04 00:15 出处:网络
I am trying to compile a Grails project using Grails 1.3.7 . The project has a dependency to springcache 1.2.1 plugin. However, I get the following compilation error (29 times):

I am trying to compile a Grails project using Grails 1.3.7 . The project has a dependency to springcache 1.2.1 plugin. However, I get the following compilation error (29 times):

/Users/myself/.grails/1.3.7/projects/myproject/plugins/springcache-1.2.1/src/groovy/grails/plugin/springcache/web/Timer.groovy: 29: cannot modify final field 'uri' outside of constructor.
 @ line 29, column 4.
            this.uri = uri
      ^

1 error

    at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302)
    at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:969)
    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:519)
    at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:497)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:474)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:453)
    at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:67)
    at org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:180)
    at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:905)
    at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:607)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at _GrailsCompile_groovy$_run_closure4_closure10.doCall(_GrailsCompile_groovy:117)
    at _GrailsCompile_groovy$_run_closure4_closure10.doCall(_GrailsCompile_groovy)
    at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
    at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
    at _GrailsCompile_groovy$_run_closure4.doCall(_GrailsCompile_groovy:104)
    at _GrailsCompile_groovy$_run_closure3.doCall(_GrailsCompile_groovy:69)
    at _GrailsPackage_groovy$_run_closure2_closure9.doCall(_GrailsPackage_groovy:85)
    at _GrailsPackage_groovy$_run_closure2_closure9.doCall(_GrailsPackage_groovy)
    at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
    at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
    at _GrailsPackage_groovy$_run_closure2.doCall(_GrailsPackage_groovy:84)
    at RunApp$_run_closure1.doCall(RunApp.groovy:28)
    at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
 开发者_运维知识库   at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
    at gant.Gant.withBuildListeners(Gant.groovy:427)
    at gant.Gant.this$2$withBuildListeners(Gant.groovy)
    at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
    at gant.Gant.dispatch(Gant.groovy:415)
    at gant.Gant.this$2$dispatch(Gant.groovy)
    at gant.Gant.invokeMethod(Gant.groovy)
    at gant.Gant.executeTargets(Gant.groovy:590)
    at gant.Gant.executeTargets(Gant.groovy:589)

According to the stacktrace, my project is perfectly innocent ;-)

I tried to use springcache 1.3.1 instead but then I run into the problem that another third-party plugin also requires version 1.2.1 . Is there a way to use two different versions for the same build?


Grails does not allow installing two versions of the same plugin within a project.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号