<?xml version="1.0" encoding="UTF-8"?>
<!--
    JBoss, Home of Professional Open Source Copyright 2010, Red Hat,
    Inc. and individual contributors by the @authors tag. See the
    copyright.txt in the distribution for a full listing of
    individual contributors. This is free software; you can
    redistribute it and/or modify it under the terms of the GNU
    Lesser General Public License as published by the Free Software
    Foundation; either version 2.1 of the License, or (at your
    option) any later version. This software is distributed in the
    hope that it will be useful, but WITHOUT ANY WARRANTY; without
    even the implied warranty of MERCHANTABILITY or FITNESS FOR A
    PARTICULAR PURPOSE. See the GNU Lesser General Public License
    for more details. You should have received a copy of the GNU
    Lesser General Public License along with this software; if not,
    write to the Free Software Foundation, Inc., 51 Franklin St,
    Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site:
    http://www.fsf.org.
-->
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.richfaces</groupId>
        <artifactId>richfaces-root-parent</artifactId>
        <version>4.2.2.Final</version>
        <relativePath>../../build/parent/pom.xml</relativePath>
    </parent>

    <groupId>org.richfaces.examples</groupId>
    <artifactId>richfaces-example-parent</artifactId>
    <packaging>pom</packaging>
    <name>RichFaces Examples Parent</name>

    <dependencies>
        <dependency>
            <groupId>org.richfaces.core</groupId>
            <artifactId>richfaces-core-impl</artifactId>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.richfaces.examples</groupId>
                <artifactId>template</artifactId>
                <version>${project.version}</version>
                <type>war</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <!--
            The following profiles determine the JSF api/impl
            combinations that will be used in the project builds.

            -Djsf_profile=<profile-name> on the mvn command line
        -->
        <profile>
            <id>jsf_ri</id>
            <activation>
                <property>
                    <name>!jsf_profile</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>javax.faces</groupId>
                    <artifactId>javax.faces-api</artifactId>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.glassfish</groupId>
                    <artifactId>javax.faces</artifactId>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jsf_jboss</id>
            <activation>
                <property>
                    <name>jsf_profile</name>
                    <value>jboss</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.spec.javax.faces</groupId>
                    <artifactId>jboss-jsf-api_2.1_spec</artifactId>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>com.sun.faces</groupId>
                    <artifactId>jsf-impl</artifactId>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>myfaces</id>
            <activation>
                <property>
                    <name>jsf_profile</name>
                    <value>myfaces</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.apache.myfaces.core</groupId>
                    <artifactId>myfaces-api</artifactId>
                    <scope>compile</scope>
                </dependency>
                <dependency>
                    <groupId>org.apache.myfaces.core</groupId>
                    <artifactId>myfaces-impl</artifactId>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>jbas7</id>
            <activation>
                <property>
                    <name>jsf_profile</name>
                    <value>jbas7</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.spec.javax.faces</groupId>
                    <artifactId>jboss-jsf-api_2.1_spec</artifactId>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>com.sun.faces</groupId>
                    <artifactId>jsf-impl</artifactId>
                    <version>${com.sun.faces.impl.version.jboss}</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jrebel</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.zeroturnaround</groupId>
                        <artifactId>jrebel-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>generate-rebel-xml</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>generate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <scm>
        <connection>scm:git:git://github.com/richfaces/dev-examples.git</connection>
        <developerConnection>scm:git:git@github.com:richfaces/dev-examples.git</developerConnection>
        <url>https://github.com/richfaces/dev-examples</url>
    </scm>
</project>
