Using MyFaces in a Project built with Maven

MyFaces can easily be add to a project built with Maven. The instruction below should work with version MyFaces 1.1.2+ and Maven 2.0.4+ [WWW] http://maven.apache.org/download.html.

Addition to your project's pom.xml

  <dependencies>
    <dependency>
      <groupId>org.apache.myfaces.core</groupId>
      <artifactId>myfaces-api</artifactId>
      <version>1.1.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.myfaces.core</groupId>
      <artifactId>myfaces-impl</artifactId>
      <version>1.1.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.myfaces.tomahawk</groupId>
      <artifactId>tomahawk</artifactId>
      <version>1.1.4</version>
    </dependency>
  </dependencies>

Using SNAPSHOT versions

If you want to use SNAPSHOT versions of MyFaces code, ie the bleeding edge that is not yet an official release, then add the following repository to your project's pom or your settings.xml file.

    <repository>
         <releases>
           <enabled>false</enabled>
         </releases>
         <snapshots>
           <enabled>true</enabled>
         </snapshots>
         <id>apache.snapshots</id>
         <name>Apache Snapshot Repository</name>
         <url>http://people.apache.org/repo/m2-snapshot-repository</url>
    </repository>

Some useful Maven commands

For more information on Maven see [WWW] http://maven.apache.org

last edited 2008-02-09 21:46:20 by SimonKitching