3 Replies Latest reply on Feb 14, 2008 9:48 AM by graben

    Which JAR file to include for Faces in Seam 2.0.1.GA?

    rstevens

      I'm using Seam 2.0.1.GA and used the sample pom.xml at http://docs.jboss.com/seam/2.0.1.GA/reference/en/html_single/#d0e23884


      My Java code uses faces:



      import org.jboss.seam.faces.FacesMessages;
      
      FacesMessages.instance().addToControl
      
      




      Which faces JAR file(s) do I use and from what repository?


      I noticed the Bookings example has the same code.


      I'd like to add the JAR file dependency to my pom.xml to resolve the compilation error but I do not want to bundle any JSF JARs in my WAR file because jboss-4.2.2.GA server has its own.


      Any ideas?

        • 1. Re: Which JAR file to include for Faces in Seam 2.0.1.GA?
          rstevens
          JBoss AS 4.2.0.GA comes with Sun JavaServer Faces implementation version 1.2_04-b10-p01

          So in my pom.xml I added

          "<repository>
              <id>dev.java.net</id>
              <name>Sun Java Developement Repository</name>
          <url>https://maven-repository.dev.java.net/nonav/repository/</url>
              <layout>legacy</layout>
          </repository>

          <dependency>
               <groupId>javax.faces</groupId>
               <artifactId>jsf-api</artifactId>
               <version>1.2_04</version>
               <scope>provided</scope>
          </dependency>
          "
          I set the scope to provided because I expect the container to have the JAR
          http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

          • 2. Re: Which JAR file to include for Faces in Seam 2.0.1.GA?
            rstevens
            <blockquote>
            _Robert Stevens wrote on Feb 13, 2008 11:12 PM:_<br/>

            JBoss AS 4.2.0.GA comes with Sun JavaServer Faces implementation
            "version 1.2_04-b10-p01"


            So in my pom.xml I added

            "<repository>
                <id>dev.java.net</id>
                <name>Sun Java Developement Repository</name>
            <url>https://maven-repository.dev.java.net/nonav/repository/</url>
                <layout>legacy</layout>
            </repository>

            <dependency>
                 <groupId>javax.faces</groupId>
                 <artifactId>jsf-api</artifactId>
                 <version>1.2_04</version>
                 <scope>provided</scope>
            </dependency>
            "
            I set the scope to provided because I expect the container to have the JAR
            [My Link=>http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html]


            </blockquote>

            Click HELP for text formatting instructions. Then edit this text, this live preview updates if you stop typing for 3 seconds.
            • 3. Re: Which JAR file to include for Faces in Seam 2.0.1.GA?
              graben

              I would suggest to use current 1.2.08 nightly builds of JSF (Download) It solves a big problem while using h:selectmanymenu/listbox-UI components directly with jpa/hibernate entities. (Problem with proxies)