0
我有一個Grails插件,我想用Grails 2.3.x在本地運行。我所做的是打包的插件文件夾,並把它放在:在Grails 2.3.x中運行本地插件?
/lib/myPlugin-1.0.zip
現在,我可以在我的BuildConfig.groovy文件的我的插件部分使用
compile ":myPlugin:1.0"
。
它的工作Grails的2.3版本之前,但在2.3.x版本它閱以下錯誤:
Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:prerender:zip:1.0.4 in grailsCentral (http://repo.grails.org/grails/plugins)
org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact org.grails.plugins:prerender:zip:1.0.4 in grailsCentral (http://repo.grails.org/grails/plugins)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at org.codehaus.groovy.grails.resolve.maven.aether.AetherDependencyManager.resolveToResult(AetherDependencyManager.groovy:436)
at org.codehaus.groovy.grails.resolve.maven.aether.AetherDependencyManager.resolve(AetherDependencyManager.groovy:347)
at grails.util.BuildSettings.doResolve(BuildSettings.groovy:513)
at grails.util.BuildSettings.doResolve(BuildSettings.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1086)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1031)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
at grails.util.BuildSettings$_getDefaultTestDependencies_closure14.doCall(BuildSettings.groovy:587)
at grails.util.BuildSettings$_getDefaultTestDependencies_closure14.doCall(BuildSettings.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:272)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:64)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at grails.util.BuildSettings.getDefaultTestDependencies(BuildSettings.groovy:581)
at grails.util.BuildSettings.getTestDependencies(BuildSettings.groovy:562)
at org.codehaus.groovy.grails.cli.support.ClasspathConfigurer.getClassLoaderUrls(ClasspathConfigurer.java:119)
at org.codehaus.groovy.grails.cli.support.ClasspathConfigurer.configuredClassLoader(ClasspathConfigurer.java:70)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.initializeState(GrailsScriptRunner.java:629)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.callPluginOrGrailsScript(GrailsScriptRunner.java:413)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeCommand(GrailsScriptRunner.java:378)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.main(GrailsScriptRunner.java:226)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:235)
at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:263)
不可能再用lib文件夾中的壓縮插件做點什麼嗎? – confile
我不知道同樣的事情...... @ confile – genuinefafa