Friday, July 31, 2009

How to maven-ize richfaces

For some reason, richfaces jars are no longer available on the maven repository.
To do it yourself:
- Download richfaces-ui-3.3.1.GA-bin.zip from the JBoss richfaces website
- Unzip it to say C:\Program Files\Richfaces


- Open a command prompt and cd to the /lib directory
You will see 3 jars in the /lib directory

- Give the following commands to load the jars to maven
> mvn install:install-file -DgroupId=org.richfaces -DartifactId=richfaces-impl -Dversion=3.3.1.GA -Dpackaging=jar -Dfile=./richfaces-impl-3.3.1.GA.jar

> mvn install:install-file -DgroupId=org.richfaces -DartifactId=richfaces-ui -Dversion=3.3.1.GA -Dpackaging=jar -Dfile=./richfaces-ui-3.3.1.GA.jar

> mvn install:install-file -DgroupId=org.richfaces -DartifactId=richfaces-api -Dversion=3.3.1.GA -Dpackaging=jar -Dfile=./richfaces-api-3.3.1.GA.jar


You can now reference these libraries in your pom.xml:

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

<dependency>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-api</artifactId>
<version>3.3.1.GA</version>
</dependency>

<dependency>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-impl</artifactId>
<version>3.3.1.GA</version>
</dependency>

No comments:

Post a Comment