尝试编译 grails 1.3.7 应用程序并获得以下依赖项错误。有什么帮助吗?
> Error executing script RunApp:
> org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
> java.lang.NoSuchMethodError:
> org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
> at
> org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
> at
> org.codehaus.groovy.grails.plugins.CorePluginFinder.loadCorePluginsFromResources(CorePluginFinder.java:93)
> at
> org.codehaus.groovy.grails.plugins.CorePluginFinder.getPluginClasses(CorePluginFinder.java:54)
> at
> org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager.findCorePlugins(DefaultGrailsPluginManager.java:363)
> at
> org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager.attemptLoadPlugins(DefaultGrailsPluginManager.java:326)
> at
> org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager.loadPlugins(DefaultGrailsPluginManager.java:282)
> at
> org.codehaus.groovy.grails.plugins.GrailsPluginManager$loadPlugins.call(Unknown
> Source) at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
更新:目前我可以清理并手动删除插件;第一个构建有效,之后的所有构建都失败并出现上述错误。
导致问题的插件是quartz-1.0-RC1 和neo4j-1.0.0.M2。以前的开发人员将此添加到这些插件的 depedencies.groovy
Neo4j - 添加排除以下
runtime("org.grails:grails-datastore-gorm:$datastoreVersion","org.grails:grails- datastore-core:$datastoreVersion") {
excludes "jcl-over-slf4j", "slf4j-api"
}
石英 - 添加 slf4j-api
excludes 'ehcache', 'xml-apis', 'commons-logging', 'slf4j-api'
BuildConfig.Groovy
我尝试将其添加到我的 BuildConfig.groovy 中,但没有奏效:
插件{
compile(":lesscss:1.0.0"){
excludes "jcl-over-slf4j", "slf4j-api"
}
compile(":neo4j:1.0.0.M2"){
excludes 'ehcache', 'xml-apis', 'commons-logging', 'slf4j-api'
}