Search code examples
jboss-forge

Unable to install switchyard facet jboss forge


I've just started dealing with JBoss Forge and Switchyard and I'm not able to create a simple forge project with switchyard facets.

  • Using jboss-forge-1.2.2.FINAL (I've also tried with 1.1.3).
  • I'm behind a proxy so I've configured in my ~/.forge/config.xml file the proxy
  • Also my .m2/settings.xml file has the proxy configuration set.

forge configuration file:

<configuration>
  <proxy>
    <host>proxyhost</host>
    <port>proxyport</port>
    <!-- The entries below are necessary only if your proxy needs authentication -->
    <username>username</username>
    <password>password</password>
  </proxy>
</configuration>

Then, when I type inside my new project (with verbose output)

[myproject] myproject$ project install-facet switchyard.bean
***ERROR*** Exception encountered: (type "set VERBOSE false" to disable stack traces)
org.jboss.forge.project.facets.FacetNotFoundException: The requested Facet named [switchyard.bean] could not be found.
    at org.jboss.forge.project.services.FacetFactory.getFacetByName(FacetFactory.java:124)
    at org.jboss.forge.shell.plugins.builtin.project.ProjectPlugin.installFacet(ProjectPlugin.java:107)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.forge.shell.command.Execution.perform(Execution.java:134)
    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:789)
    at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:812)
    at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:602)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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:172)
    at java.lang.Thread.run(Unknown Source)

Any ideas about what's going on? Am I missing something?

Thanks in advance,

Rubén


Solution

  • The SwitchYard Forge tooling has been tied to an older version of Forge (1.0.2) for quite some time. As part of our upcoming 1.0 release, the Forge version has been upgraded to 1.2.2. For either version, you need to use the SwitchYard installer to install the plugins into an existing Forget installation. If you really want to use SY with Forge, I would wait for SY 1.0.0.Final or pull up a nightly build of 1.0.0.

    As an aside, you might want to try the Eclipse-based tooling while waiting to try Forge in the 1.0 release. If you would like to see what's available there, check out Episode 6 in the SwitchYard Video series: https://community.jboss.org/wiki/SwitchYardVideoSeries