5 Replies Latest reply on Dec 4, 2009 8:50 AM by Herve Ferreira

    Integration of RichFaces into Maven Project -> Does not Work

    Herve Ferreira Newbie

      Hi

      I'm trying to do the steps described in the documentation http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html_single/ section "Integration of RichFaces into Maven Project". However when I use the cmd line and put

      mvn archetype:generate -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-jsfwebapp -DarchetypeVersion=3.3.2-SNAPSHOT -DgroupId=org.docs.richfaces -DartifactId=jsf-app

      It shows the error:

      Downloading: http://repo1.maven.org/maven2/org/richfaces/cdk/maven-archetype-jsfwebapp/3.3.2/maven-archetype-jsfwebapp-3
      .3.2.jar
      [INFO] Unable to find resource 'org.richfaces.cdk:maven-archetype-jsfwebapp:jar:3.3.2' in repository maven-archetype-jsf
      webapp-repo (http://repo1.maven.org/maven2)
      Downloading: http://snapshots.jboss.org/maven2//org/richfaces/cdk/maven-archetype-jsfwebapp/3.3.2/maven-archetype-jsfweb
      app-3.3.2.jar
      [INFO] Unable to find resource 'org.richfaces.cdk:maven-archetype-jsfwebapp:jar:3.3.2' in repository snapshots.jboss.org
      (http://snapshots.jboss.org/maven2/)
      Downloading: http://repository.jboss.com/maven2//org/richfaces/cdk/maven-archetype-jsfwebapp/3.3.2/maven-archetype-jsfwe
      bapp-3.3.2.jar
      [INFO] Unable to find resource 'org.richfaces.cdk:maven-archetype-jsfwebapp:jar:3.3.2' in repository repository.jboss.co
      m (http://repository.jboss.com/maven2/)
      Downloading: http://repo1.maven.org/maven2/org/richfaces/cdk/maven-archetype-jsfwebapp/3.3.2/maven-archetype-jsfwebapp-3
      .3.2.jar
      [INFO] Unable to find resource 'org.richfaces.cdk:maven-archetype-jsfwebapp:jar:3.3.2' in repository central (http://rep
      o1.maven.org/maven2)
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] The desired archetype does not exist (org.richfaces.cdk:maven-archetype-jsfwebapp:3.3.2)

      Can anyone help?

      Thanks

        • 1. Re: Integration of RichFaces into Maven Project -> Does not
          Ilya Shaikovsky Master

          it's pretty strange that you deinfed

          DarchetypeVersion=3.3.2-SNAPSHOT

          but according to log it's looking for just 3.3.2

          http://repository.jboss.com/maven2//org/richfaces/cdk/maven-archetype-jsfwebapp/3.3.2/maven-archetype-jsfwe
          bapp-3.3.2.jar

          I guess it could be copy paste problem. Seems some wrong symbols where added during paste.

          • 3. Re: Integration of RichFaces into Maven Project -> Does not
            Herve Ferreira Newbie

            Hi

            Thanks for the help, it was only required to change to 3.3.2.GA.

            Additionally the documentation contains more errors. The step that says to copy the dependencies is not correct, in this case the dependencies of the richfaces that are correct are:

             <dependency>
             <groupId>org.richfaces.ui</groupId>
             <artifactId>richfaces-ui</artifactId>
             <version>3.3.2.GA</version>
             </dependency>


            This copy all the jars required.

            The ones in the documentation, and at least for me, do not work

            thanks

            • 4. Re: Integration of RichFaces into Maven Project -> Does not
              Ilya Shaikovsky Master

              you mean instead of three dependencies for all three jars? both ways should works actually.. probably snapshots repository inaccessible in your case for some reason.

              • 5. Re: Integration of RichFaces into Maven Project -> Does not
                Herve Ferreira Newbie

                With the repository configuration described in the documentation and that I've applied on my maven, this is the pom.xml that works for me:

                NOTE: I'm using netbeans, hence the last lines in the pom.

                <project xmlns="http://maven.apache.org/POM/4.0.0"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
                 <modelVersion>4.0.0</modelVersion>
                 <groupId>org.docs.richfaces</groupId>
                 <artifactId>jsf-app</artifactId>
                 <packaging>war</packaging>
                 <name>jsf-app Maven Webapp</name>
                 <version>3.3.2.GA</version>
                 <build>
                 <finalName>jsf-app</finalName>
                 <plugins>
                 <plugin>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
                 <source>1.5</source>
                 <target>1.5</target>
                 </configuration>
                 </plugin>
                 </plugins>
                 </build>
                
                 <dependencies>
                 <dependency>
                 <groupId>junit</groupId>
                 <artifactId>junit</artifactId>
                 <version>3.8.1</version>
                 <scope>test</scope>
                 </dependency>
                 <dependency>
                 <groupId>org.richfaces.ui</groupId>
                 <artifactId>richfaces-ui</artifactId>
                 <version>3.3.2.GA</version>
                 </dependency>
                
                
                
                
                
                 <dependency>
                 <groupId>javax.servlet</groupId>
                 <artifactId>servlet-api</artifactId>
                 <version>2.4</version>
                 <scope>provided</scope>
                 </dependency>
                 <dependency>
                 <groupId>javax.servlet</groupId>
                 <artifactId>jsp-api</artifactId>
                 <version>2.0</version>
                 <scope>provided</scope>
                 </dependency>
                 <dependency>
                 <groupId>jstl</groupId>
                 <artifactId>jstl</artifactId>
                 <version>1.1.2</version>
                 </dependency>
                 <dependency>
                 <groupId>javax.servlet.jsp</groupId>
                 <artifactId>jsp-api</artifactId>
                 <version>2.1</version>
                 <scope>provided</scope>
                 </dependency>
                 <dependency>
                 <groupId>javax.faces</groupId>
                 <artifactId>jsf-api</artifactId>
                 <version>1.2_12</version>
                 </dependency>
                 <dependency>
                 <groupId>javax.faces</groupId>
                 <artifactId>jsf-impl</artifactId>
                 <version>1.2_12</version>
                 </dependency>
                 <dependency>
                 <groupId>javax.el</groupId>
                 <artifactId>el-api</artifactId>
                 <version>1.0</version>
                 <scope>provided</scope>
                 </dependency>
                 <dependency>
                 <groupId>el-impl</groupId>
                 <artifactId>el-impl</artifactId>
                 <version>1.0</version>
                 <scope>provided</scope>
                 </dependency>
                 <dependency>
                 <groupId>javax.annotation</groupId>
                 <artifactId>jsr250-api</artifactId>
                 <version>1.0</version>
                 </dependency>
                
                </dependencies>
                
                
                 <properties>
                 <netbeans.hint.deploy.server>J2EE</netbeans.hint.deploy.server>
                 </properties>
                
                </project>
                


                USE FORUM CODE TAGS.