编译less文件时出现Grails less resources插件错误



我正在使用Grails 2.1.0并尝试安装插件twitter-bootstrap 2.0.4less-resources 1.3.0.2。在app-run上,我收到以下错误:

C:Javajdk1.7.0_05binjava "-Dgrails.home=C:Grails 2.1.0" -Dbase.dir=D:Projectsrussiansphere -Dtools.jar=C:Javajdk1.7.0_05libtools.jar "-Dgroovy.starter.conf=C:Grails 2.1.0/conf/groovy-starter.conf" -Xmx512M -XX:MaxPermSize=192m -Djline.WindowsTerminal.directConsole=false "-javaagent:C:Grails 2.1.0libcom.springsource.springloadedspringloaded-corejarsspringloaded-core-1.0.6.jar" -noverify -Dspringloaded=profile=grails -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:Program FilesJetBrainsIntelliJ IDEA 11.1.3bin" -Dfile.encoding=UTF-8 -classpath "C:Grails 2.1.0liborg.codehaus.groovygroovy-alljarsgroovy-all-1.8.6.jar;C:Grails 2.1.0distgrails-bootstrap-2.1.0.jar;C:Program FilesJetBrainsIntelliJ IDEA 11.1.3libidea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf "C:Grails 2.1.0/conf/groovy-starter.conf" run-app
| Loading Grails 2.1.0
| Configuring classpath
| Configuring classpath.
| Environment set to development
| Environment set to development.
| Environment set to development..
| Environment set to development...
| Environment set to development....
| Environment set to development.....
| Packaging Grails application
| Packaging Grails application.
| Packaging Grails application..
| Packaging Grails application...
| Packaging Grails application....
| Compiling 79 source files
| Compiling 79 source files.
| Compiling 79 source files..
| Compiling 9 source files
| Compiling 9 source files.
| Compiling 9 source files..
| Compiling 9 source files...
| Compiling 9 source files....
| Compiling 9 source files.....
| Running Grails application
| Error 2012-08-21 01:54:09,741 [pool-7-thread-1] ERROR resourceMappers.LessResourceMapper  - Error compiling less file: C:UsersEdward.grails2.1.0projectsrussianspheretomcatworkTomcatlocalhostrussianspheregrails-resourcespluginstwitter-bootstrap-2.0.4lessbootstrap.less
Message: unterminated string literal (<script>#17749)
    Line | Method
->>  109 | runtimeError                  in org.mozilla.javascript.DefaultErrorReporter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|     96 | error                         in     ''
|    146 | addError . . . . . . . . . .  in org.mozilla.javascript.Parser
|    532 | getToken                      in org.mozilla.javascript.TokenStream
|    172 | peekToken . . . . . . . . . . in org.mozilla.javascript.Parser
|   2245 | primaryExpr                   in     ''
|   1955 | memberExpr . . . . . . . . .  in     ''
|   1813 | unaryExpr                     in     ''
|   1742 | mulExpr . . . . . . . . . . . in     ''
|   1723 | addExpr                       in     ''
|   1703 | shiftExpr . . . . . . . . . . in     ''
|   1677 | relExpr                       in     ''
|   1633 | eqExpr . . . . . . . . . . .  in     ''
|   1622 | bitAndExpr                    in     ''
|   1611 | bitXorExpr . . . . . . . . .  in     ''
|   1600 | bitOrExpr                     in     ''
|   1588 | andExpr . . . . . . . . . . . in     ''
|   1576 | orExpr                        in     ''
|   1559 | condExpr . . . . . . . . . .  in     ''
|   1544 | assignExpr                    in     ''
|   1910 | argumentList . . . . . . . .  in     ''
|   2050 | memberExprTail                in     ''
|   1958 | memberExpr . . . . . . . . .  in     ''
|   1813 | unaryExpr                     in     ''
|   1742 | mulExpr . . . . . . . . . . . in     ''
|   1723 | addExpr                       in     ''
|   1703 | shiftExpr . . . . . . . . . . in     ''
|   1677 | relExpr                       in     ''
|   1633 | eqExpr . . . . . . . . . . .  in     ''
|   1622 | bitAndExpr                    in     ''
|   1611 | bitXorExpr . . . . . . . . .  in     ''
|   1600 | bitOrExpr                     in     ''
|   1588 | andExpr . . . . . . . . . . . in     ''
|   1576 | orExpr                        in     ''
|   1559 | condExpr . . . . . . . . . .  in     ''
|   1544 | assignExpr                    in     ''
|   1523 | expr . . . . . . . . . . . .  in     ''
|   1202 | statementHelper               in     ''
|    707 | statement . . . . . . . . . . in     ''
|    401 | parse                         in     ''
|    338 | parse . . . . . . . . . . . . in     ''
|   2368 | compileImpl                   in org.mozilla.javascript.Context
|   1359 | compileString . . . . . . . . in     ''
|   1348 | compileString                 in     ''
|   1101 | evaluateString . . . . . . .  in     ''
|     42 | compile                       in com.groovydev.LessCompilerService
|     34 | map . . . . . . . . . . . . . in LessResourceMapper
|    139 | invoke                        in org.grails.plugin.resource.mapper.ResourceMapper
|    128 | invokeIfNotExcluded . . . . . in     ''
|    589 | applyMappers                  in org.grails.plugin.resource.ResourceProcessor
|    535 | prepareResource . . . . . . . in     ''
|    604 | doCall                        in org.grails.plugin.resource.ResourceProcessor$_prepareSingleDeclaredResource_closure12
|     29 | addDeclaredResource . . . . . in org.grails.plugin.resource.util.ResourceMetaStore
|    602 | prepareSingleDeclaredResource in org.grails.plugin.resource.ResourceProcessor
|    627 | doCall . . . . . . . . . . .  in org.grails.plugin.resource.ResourceProcessor$_prepareResourceBatch_closure14
|      8 | each                          in org.grails.plugin.resource.ResourceProcessorBatch
|    623 | prepareResourceBatch . . . .  in org.grails.plugin.resource.ResourceProcessor
|    806 | resourcesChanged              in     ''
|    802 | loadModules . . . . . . . . . in     ''
|   1071 | reloadAll                     in     ''
|    172 | doCall . . . . . . . . . . .  in ResourcesGrailsPlugin$_closure3
|    334 | innerRun                      in java.util.concurrent.FutureTask$Sync
|    166 | run . . . . . . . . . . . . . in java.util.concurrent.FutureTask
|   1110 | runWorker                     in java.util.concurrent.ThreadPoolExecutor
|    603 | run . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run                           in java.lang.Thread
| Error 2012-08-21 01:54:10,016 [pool-7-thread-1] ERROR resourceMappers.LessResourceMapper  - Error compiling less file: C:UsersEdward.grails2.1.0projectsrussianspheretomcatworkTomcatlocalhostrussianspheregrails-resourceslesscustom-bootstrap.less
Message: missing ] after element list (<script>#17749)
    Line | Method
->>  109 | runtimeError                  in org.mozilla.javascript.DefaultErrorReporter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|     96 | error                         in     ''
|    146 | addError . . . . . . . . . .  in org.mozilla.javascript.Parser
|    160 | reportError                   in     ''
|   2294 | primaryExpr . . . . . . . . . in     ''
|   1955 | memberExpr                    in     ''
|   1813 | unaryExpr . . . . . . . . . . in     ''
|   1742 | mulExpr                       in     ''
|   1723 | addExpr . . . . . . . . . . . in     ''
|   1703 | shiftExpr                     in     ''
|   1677 | relExpr . . . . . . . . . . . in     ''
|   1633 | eqExpr                        in     ''
|   1622 | bitAndExpr . . . . . . . . .  in     ''
|   1611 | bitXorExpr                    in     ''
|   1600 | bitOrExpr . . . . . . . . . . in     ''
|   1588 | andExpr                       in     ''
|   1576 | orExpr . . . . . . . . . . .  in     ''
|   1559 | condExpr                      in     ''
|   1544 | assignExpr . . . . . . . . .  in     ''
|   1910 | argumentList                  in     ''
|   2050 | memberExprTail . . . . . . .  in     ''
|   1958 | memberExpr                    in     ''
|   1813 | unaryExpr . . . . . . . . . . in     ''
|   1742 | mulExpr                       in     ''
|   1723 | addExpr . . . . . . . . . . . in     ''
|   1703 | shiftExpr                     in     ''
|   1677 | relExpr . . . . . . . . . . . in     ''
|   1633 | eqExpr                        in     ''
|   1622 | bitAndExpr . . . . . . . . .  in     ''
|   1611 | bitXorExpr                    in     ''
|   1600 | bitOrExpr . . . . . . . . . . in     ''
|   1588 | andExpr                       in     ''
|   1576 | orExpr . . . . . . . . . . .  in     ''
|   1559 | condExpr                      in     ''
|   1544 | assignExpr . . . . . . . . .  in     ''
|   1523 | expr                          in     ''
|   1202 | statementHelper . . . . . . . in     ''
|    707 | statement                     in     ''
|    401 | parse . . . . . . . . . . . . in     ''
|    338 | parse                         in     ''
|   2368 | compileImpl . . . . . . . . . in org.mozilla.javascript.Context
|   1359 | compileString                 in     ''
|   1348 | compileString . . . . . . . . in     ''
|   1101 | evaluateString                in     ''
|     42 | compile . . . . . . . . . . . in com.groovydev.LessCompilerService
|     34 | map                           in LessResourceMapper
|    139 | invoke . . . . . . . . . . .  in org.grails.plugin.resource.mapper.ResourceMapper
|    128 | invokeIfNotExcluded           in     ''
|    589 | applyMappers . . . . . . . .  in org.grails.plugin.resource.ResourceProcessor
|    535 | prepareResource               in     ''
|    604 | doCall . . . . . . . . . . .  in org.grails.plugin.resource.ResourceProcessor$_prepareSingleDeclaredResource_closure12
|     29 | addDeclaredResource           in org.grails.plugin.resource.util.ResourceMetaStore
|    602 | prepareSingleDeclaredResource in org.grails.plugin.resource.ResourceProcessor
|    627 | doCall                        in org.grails.plugin.resource.ResourceProcessor$_prepareResourceBatch_closure14
|      8 | each . . . . . . . . . . . .  in org.grails.plugin.resource.ResourceProcessorBatch
|    623 | prepareResourceBatch          in org.grails.plugin.resource.ResourceProcessor
|    806 | resourcesChanged . . . . . .  in     ''
|    802 | loadModules                   in     ''
|   1071 | reloadAll . . . . . . . . . . in     ''
|    172 | doCall                        in ResourcesGrailsPlugin$_closure3
|    334 | innerRun . . . . . . . . . .  in java.util.concurrent.FutureTask$Sync
|    166 | run                           in java.util.concurrent.FutureTask
|   1110 | runWorker . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor
|    603 | run                           in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run . . . . . . . . . . . . . in java.lang.Thread
| Server running. Browse to http://localhost:8080/russiansphere

我很确定,这是Windows路径处理的问题,可能我必须在某个地方躲避斜杠。但具体在哪里呢?

操作系统:Windows 7 Ultimate


更新:在Arch Linux中一切似乎都正常。

我已经通过将less-resources 1.3.0.2插件更改为lesscss-resources 1.3.0.3解决了我的问题。它似乎是lessbugless插件。:D

最新更新