I want to create my own scaffold's provider for jboss forge 1.4.4, for do that I forked the files on github. I add succesfully the plugin with command: forge source-plugins path/to/plugins
I can add the plugins to my project with scaffold setup --scaffoldType mFaces
But when I run the command scaffold from-entity com.model.* I get the error:
ERROR Exception encountered: Unable to locate scaffold/faces/metawidget-qbe.xml on CLASSPATH (type "set VERBOSE true" to enable stack traces)
there is the full output:
***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)
I removed the old plugins: scaffold-faces
I find the same question here but it not resolved: Creating own scaffold plugin: metawidget resource loading exception only when run within forge console
Try comparing your implementation to https://github.com/forge/plugin-spring-mvc.
That is another Forge plugin that overrides the default scaffold (uses Spring instead of JSF). In particular for your problem, it has a metawidget-qbe.xml file: https://github.com/forge/plugin-spring-mvc/tree/master/src/main/resources/scaffold/spring