1

我想为 jboss forge 1.4.4 创建自己的脚手架提供程序,为此我在 github 上分叉了文件。我使用命令成功添加了插件:forge source-plugins path/to/plugins

我可以使用脚手架设置 --scaffoldType mFaces 将插件添加到我的项目中

但是当我从实体 com.model.* 运行命令脚手架时,我得到了错误:

遇到错误异常:无法在 CLASSPATH 上找到脚手架/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

我在这里找到了同样的问题,但没有解决: 创建自己的脚手架插件:metawidget 资源加载异常仅在 forge 控制台中运行时

4

1 回答 1

0

尝试将您的实现与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

于 2014-04-07T21:53:34.653 回答