MyFaces Test can easily be added to a project built with Maven.

Addition to your project's pom.xml

MyFaces Test comes for JSF 1.1/1.2 (myfaces-test12) and JSF 2.0 (myfaces-test20) versions. Just add it as dependency.

        <dependency>
            <groupId>org.apache.myfaces.test</groupId>
            <artifactId>myfaces-test20</artifactId>
            <version>1.0.3</version>
            <scope>test</scope>
        </dependency>

Don't forget to add your JUnit version to use:

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>

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>https://repository.apache.org/content/repositories/snapshots</url>
    </repository>
  • No labels