我想为jboss forge 1.4.4创建我自己的脚手架提供程序,为此我在github上分叉了文件。
我使用命令成功添加了插件:forge source-plugins path / to / plugins
我可以使用脚手架设置--scaffoldType mFaces将插件添加到我的项目中
但是,当我运行来自实体com.model的命令脚手架时。*
我得到错误:
错误:遇到异常:无法在CLASSPATH上找到scaffold / faces / metawidget-qbe.xml(键入“ set VERBOSE true”以启用堆栈跟踪)
有完整的输出:
***INFO*** Using currently installed scaffold [mfaces]
java.io.FileNotFoundException: Unable to locate scaffold/faces/metawidget-qbe.xml on CLASSPATH
***ERROR*** Exception encountered: (type "set VERBOSE false" to disable stack traces)
[testScaffoldS] testScaffoldS $ at org.metawidget.config.impl.SimpleResourceResolver.openResource(SimpleResourceResolver.java:75)
at org.metawidget.config.impl.BaseConfigReader.configure(BaseConfigReader.java:216)
at org.metawidget.pipeline.w3c.W3CPipeline.configure(W3CPipeline.java:153)
at org.metawidget.pipeline.base.BasePipeline.configureOnce(BasePipeline.java:152)
at org.metawidget.pipeline.base.BasePipeline.inspectAsDom(BasePipeline.java:335)
at org.metawidget.statically.StaticMetawidget.inspect(StaticMetawidget.java:332)
at org.metawidget.statically.StaticMetawidget.write(StaticMetawidget.java:278)
at org.jboss.forge.scaffold.mfaces.FacesScaffold.generateFromEntity(FacesScaffold.java:298)
at org.jboss.forge.scaffold.plugins.ScaffoldPlugin.generateFromEntity(ScaffoldPlugin.java:174)
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.jboss.forge.shell.command.Execution.perform(Execution.java:160)
at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:109)
at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:47)
at org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:796)
at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:819)
at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:609)
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.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
at org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.doShell(ShellImpl$Proxy$_$$_WeldClientProxy.java)
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.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)
at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:186)
at java.lang.Thread.run(Thread.java:722)
我删除了旧的插件:scaffold-faces
我在这里找到了相同的问题,但未解决:
Creating own scaffold plugin: metawidget resource loading exception only when run within forge console
最佳答案
尝试将您的实现与https://github.com/forge/plugin-spring-mvc进行比较。
那是另一个覆盖默认支架的Forge插件(使用Spring而不是JSF)。特别是对于您的问题,它具有metawidget-qbe.xml文件:https://github.com/forge/plugin-spring-mvc/tree/master/src/main/resources/scaffold/spring
关于java - 创建自己的脚手架插件:无法找到scaffold/faces/metawidget-qbe.xml,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22909301/