gpt4 book ai didi

grails - Grails yui-minify-resources和lesscss-resources冲突

转载 作者:行者123 更新时间:2023-12-02 14:08:25 25 4
gpt4 key购买 nike

我有使用grascss-resources插件(v 1.3.0.3)的grails应用程序。我还想使用yui-minify-resources插件(v。0.1.5)。
我使用以下命令安装了插件:

grails install-plugin yui-minify-resources

但是现在当我尝试启动应用程序时,我有一个异常(exception):
2012-10-15 12:58:48,901 ERROR org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager  - Error configuring dynamic methods for plugin [resources:1.1.6]: java.lang.NoSuchMethodError: org/mozilla/javascript/Parser.parse(Ljava/io/Reader;Ljava/lang/String;I)Lorg/mozilla/javascript/ScriptOrFnNode;
org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoSuchMethodError: org/mozilla/javascript/Parser.parse(Ljava/io/Reader;Ljava/lang/String;I)Lorg/mozilla/javascript/ScriptOrFnNode;
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoSuchMethodError: org/mozilla/javascript/Parser.parse(Ljava/io/Reader;Ljava/lang/String;I)Lorg/mozilla/javascript/ScriptOrFnNode;
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
at com.blockconsult.yuiminifyresources.YuiJsMinifyResourceMapper$_map_closure1.doCall(YuiJsMinifyResourceMapper.groovy:29)
at com.blockconsult.yuiminifyresources.YuiJsMinifyResourceMapper.map(YuiJsMinifyResourceMapper.groovy:28)
at org.grails.plugin.resource.mapper.ResourceMapper.invoke(ResourceMapper.groovy:139)
at org.grails.plugin.resource.mapper.ResourceMapper.invokeIfNotExcluded(ResourceMapper.groovy:128)
at org.grails.plugin.resource.ResourceProcessor.applyMappers(ResourceProcessor.groovy:587)
at org.grails.plugin.resource.ResourceProcessor.prepareResource(ResourceProcessor.groovy:533)
at org.grails.plugin.resource.ResourceProcessor$_prepareSingleDeclaredResource_closure12.doCall(ResourceProcessor.groovy:602)
at org.grails.plugin.resource.util.ResourceMetaStore.addDeclaredResource(ResourceMetaStore.groovy:29)
at org.grails.plugin.resource.ResourceProcessor.prepareSingleDeclaredResource(ResourceProcessor.groovy:600)
at org.grails.plugin.resource.ResourceProcessor$_prepareResourceBatch_closure14.doCall(ResourceProcessor.groovy:625)
at org.grails.plugin.resource.ResourceProcessorBatch.each(ResourceProcessorBatch.groovy:8)
at org.grails.plugin.resource.ResourceProcessor.prepareResourceBatch(ResourceProcessor.groovy:621)
at org.grails.plugin.resource.ResourceProcessor.resourcesChanged(ResourceProcessor.groovy:804)
at org.grails.plugin.resource.ResourceProcessor.loadModules(ResourceProcessor.groovy:800)
at org.grails.plugin.resource.ResourceProcessor.reloadAll(ResourceProcessor.groovy:1056)
at ResourcesGrailsPlugin$_closure3.doCall(ResourcesGrailsPlugin.groovy:172)
... 5 more

我认为我有这个错误是由于以下事实:(文档说的)YUI minify使用Rhino的替代版本,这是lesscss资源插件的依赖项。
我试图消除这种依赖性,但是只是尝试了,因为它似乎不起作用。
这是我的Config.groov:
plugins{
compile (":lesscss-resources:1.3.0.3"){
excludes 'rhino:1.7R3'
}
}

有人处理过相同的情况吗?

最佳答案

我已经解决了将犀牛依赖关系直接放在lib文件夹中的问题。您可以从https://developer.mozilla.org/en-US/docs/Rhino/Download_Rhino下载它

关于grails - Grails yui-minify-resources和lesscss-resources冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12895696/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com