5 Replies Latest reply on Feb 25, 2009 2:21 PM by Nick Belaevski

    How to use the latest richfaces snapshots in our projects?

    Thai Dang Vu Apprentice

      I think maven2 is the way to go, but I don't know what to write in the pom.xml so that maven gets the latest snapshots. Does anybody have an example of such a pom.xml?

      If you're using IntelliJ Idea, my final goal is a pom.xml which whenever I re-import, maven will download the latest snapshots, save them in the .m2 directory and the jar filenames do not contain the timestamp (so that I can add them to my libraries [img]http://www.divshare.com/img/6649733-18b.png[/img]). I use maven to manage the dependencies only, not to compile nor build the project.

      Thank you.

        • 1. Re: How to use the latest richfaces snapshots in our project
          Nick Belaevski Master

           

          <dependency>
           <groupId>org.richfaces.ui</groupId>
           <artifactId>richfaces-ui</artifactId>
           <version>3.3.1-SNAPSHOT</version>
           </dependency>
          


          • 2. Re: How to use the latest richfaces snapshots in our project
            Thai Dang Vu Apprentice

            This is my pom.xml

            <?xml version="1.0" encoding="UTF-8"?>
            <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.richfaces.example</groupId>
             <artifactId>richfaces-experiment</artifactId>
             <version>1.0</version>
             <name>RichFaces Experiment in Tomcat</name>
             <packaging>jar</packaging>
             <repositories>
             <repository>
             <id>repository.jboss.org</id>
             <name>JBoss Repository</name>
             <url>http://repository.jboss.org/maven2</url>
             </repository>
             <repository>
             <id>snapshots.jboss.org</id>
             <name>JBoss Snapshots</name>
             <url>http://snapshots.jboss.org/maven2</url>
             </repository>
             </repositories>
             <dependencies>
             <dependency>
             <groupId>com.sun.facelets</groupId>
             <artifactId>jsf-facelets</artifactId>
             <version>1.1.15.B1</version>
             </dependency>
             <dependency>
             <groupId>org.richfaces.ui</groupId>
             <artifactId>richfaces-ui</artifactId>
             <version>3.3.1-SNAPSHOT</version>
             </dependency>
             </dependencies>
            </project>

            There is an error when I try to re-import in Idea:
            Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata.
             org.richfaces.ui:richfaces-ui:jar:3.3.1-SNAPSHOT
            
            from the specified remote repositories:
             central (http://repo1.maven.org/maven2),
             repository.jboss.org (http://repository.jboss.org/maven2),
             snapshots.jboss.org (http://snapshots.jboss.org/maven2)
            Path to dependency:
             1) org.richfaces.example:richfaces-experiment:jar:1.0
             2) org.richfaces.ui:richfaces-ui:jar:3.3.1-SNAPSHOT


            Could you post your pom.xml?

            • 3. Re: How to use the latest richfaces snapshots in our project
              Nick Belaevski Master

              Try this:

              <repository>
               <releases>
               <enabled>false</enabled>
               </releases>
               <snapshots>
               <enabled>true</enabled>
               </snapshots>
               <id>snapshots.jboss.org</id>
               <name>Jboss Snapshot Repository for Maven</name>
               <url>http://snapshots.jboss.org/maven2/</url>
               <layout>default</layout>
               </repository>



              • 4. Re: How to use the latest richfaces snapshots in our project
                Thai Dang Vu Apprentice

                I'm still getting an error:

                [ERROR] Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata.
                 org.richfaces.ui:richfaces-ui:jar:3.3.1-SNAPSHOT
                
                from the specified remote repositories:
                 central (http://repo1.maven.org/maven2),
                 repository.jboss.org (http://repository.jboss.org/maven2),
                 snapshots.jboss.org (http://snapshots.jboss.org/maven2/)
                Path to dependency:
                 1) org.richfaces.example:richfaces-experiment:jar:1.0
                 2) org.richfaces.ui:richfaces-ui:jar:3.3.1-SNAPSHOT
                
                
                
                org.apache.maven.artifact.resolver.ArtifactResolutionException: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata.
                 org.richfaces.ui:richfaces-ui:jar:3.3.1-SNAPSHOT
                
                from the specified remote repositories:
                 central (http://repo1.maven.org/maven2),
                 repository.jboss.org (http://repository.jboss.org/maven2),
                 snapshots.jboss.org (http://snapshots.jboss.org/maven2/)
                Path to dependency:
                 1) org.richfaces.example:richfaces-experiment:jar:1.0
                 2) org.richfaces.ui:richfaces-ui:jar:3.3.1-SNAPSHOT
                
                
                 at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:201)
                 at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:83)
                 at org.jetbrains.idea.maven.embedder.CustomArtifactResolver.resolve(CustomArtifactResolver.java:36)
                 at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:467)
                 at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:394)
                 at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:337)
                 at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1455)
                 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:522)
                 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
                 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
                 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
                 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
                 at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
                 at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
                 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
                 at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
                 at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
                 at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
                 at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$2.execute(MavenEmbedderWrapper.java:85)
                 at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$7.execute(MavenEmbedderWrapper.java:184)
                 at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$7.execute(MavenEmbedderWrapper.java:181)
                 at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$8.run(MavenEmbedderWrapper.java:197)
                 at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:8)
                 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
                 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
                 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
                 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                 at java.lang.Thread.run(Thread.java:619)
                 at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:5)


                My pom.xml is now like this:
                <?xml version="1.0" encoding="UTF-8"?>
                <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.richfaces.example</groupId>
                 <artifactId>richfaces-experiment</artifactId>
                 <version>1.0</version>
                 <name>RichFaces Experiment in Tomcat</name>
                 <packaging>jar</packaging>
                 <repositories>
                 <repository>
                 <id>repository.jboss.org</id>
                 <name>JBoss Repository</name>
                 <url>http://repository.jboss.org/maven2</url>
                 </repository>
                 <repository>
                 <releases>
                 <enabled>false</enabled>
                 </releases>
                 <snapshots>
                 <enabled>true</enabled>
                 </snapshots>
                 <id>snapshots.jboss.org</id>
                 <name>Jboss Snapshot Repository for Maven</name>
                 <url>http://snapshots.jboss.org/maven2/</url>
                 <layout>default</layout>
                 </repository>
                 </repositories>
                 <dependencies>
                 <dependency>
                 <groupId>com.sun.facelets</groupId>
                 <artifactId>jsf-facelets</artifactId>
                 <version>1.1.15.B1</version>
                 </dependency>
                 <dependency>
                 <groupId>org.richfaces.ui</groupId>
                 <artifactId>richfaces-ui</artifactId>
                 <version>3.3.1-SNAPSHOT</version>
                 </dependency>
                 </dependencies>
                </project>


                • 5. Re: How to use the latest richfaces snapshots in our project
                  Nick Belaevski Master

                  pom works fins for me. Try cleaning local repository and build it again.

                  Also, packaging for web application should not be jar, but war or ear.