3 Replies Latest reply on Oct 27, 2008 1:25 PM by Guillaume Jeudy

    Maven2 and richfaces

    Guillaume Jeudy Master

      Hi,

      I'm a happy richfaces user and been using it with maven2. I couldnt find richfaces 3.2.1.GA in a downloadable format on jboss maven2 repo so I had to install manually the libraries in my maven2 intranet repo.

      The problem with this approach is I miss transitive dependencies.

      For example ResourceLoaderImpl needs commons-digester library. I had to add this runtime dependency manually in my maven2 pom.xml.

      Is there a maven2 repo where I can get richfaces jar and their associated pom files ?

        • 1. Re: Maven2 and richfaces
          Guillaume Jeudy Master

          Its ResourceBuilderImpl, thats the stacktrace I got at runtime if i didnt include commons-digester:

          Caused by: java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
           at org.ajax4jsf.resource.ResourceBuilderImpl.registerConfig(ResourceBuilderImpl.java:155)
           at org.ajax4jsf.resource.ResourceBuilderImpl.registerResources(ResourceBuilderImpl.java:139)
           at org.ajax4jsf.resource.ResourceBuilderImpl.init(ResourceBuilderImpl.java:210)
           at org.ajax4jsf.renderkit.ChameleonRenderKitFactory.<init>(ChameleonRenderKitFactory.java:62)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
           at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:549)
           at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:448)
           at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:249)
           at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1036)
           at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:493)
           at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:381)
           at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:69)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
           at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
           at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
           at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)


          • 3. Re: Maven2 and richfaces
            Guillaume Jeudy Master

            Thanks, I couldnt find my way around the non-standard layout for richfaces.

            To anyone having the same issues as me the following snippets work fine when using jboss repo.

            <dependency>
             <groupId>org.richfaces.framework</groupId>
             <artifactId>richfaces-api</artifactId>
             <version>3.2.1.GA</version>
             <scope>runtime</scope>
             </dependency>
             <dependency>
             <groupId>org.richfaces.framework</groupId>
             <artifactId>richfaces-impl</artifactId>
             <version>3.2.1.GA</version>
             <scope>runtime</scope>
             </dependency>
             <dependency>
             <groupId>org.richfaces.ui</groupId>
             <artifactId>richfaces-ui</artifactId>
             <version>3.2.1.GA</version>
             <scope>runtime</scope>
             </dependency>


            And commons-digester will be added as a runtime transitive dependency. Hooray!