<?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-parent</artifactId>
        <version>10</version>
        <relativePath>../../build/parent/pom.xml</relativePath>
    </parent>

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

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <jetty.port>8080</jetty.port>
        <richfaces.checkstyle.version>2</richfaces.checkstyle.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.richfaces</groupId>
                <artifactId>richfaces-bom</artifactId>
                <version>4.0.0.Final</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

	<dependencies>
        <dependency>
            <groupId>org.richfaces.core</groupId>
            <artifactId>richfaces-core-impl</artifactId>
        </dependency>
	</dependencies>
	
    <!-- Build -->
    <build>
        <!--
            PluginManagement config for all examples
        -->
        <pluginManagement>
            <plugins>
                <!-- Build -->
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <configuration>
                        <archive>
                            <index>true</index>
                            <manifest>
                                <addDefaultSpecificationEntries>
                                    true
                                </addDefaultSpecificationEntries>
                                <addDefaultImplementationEntries>
                                    true
                                </addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <mode>development</mode>
                                <Build-Number>${buildNumber}
                                </Build-Number>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>2.5</version>
                    <configuration>
                        <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml</configLocation>
                        <logViolationsToConsole>true</logViolationsToConsole>
                        <violationSeverity>error</violationSeverity>
                    </configuration>
                    <executions>
                        <execution>
                            <id>richfaces-checkstyle-report</id>
                            <phase>process-sources</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>org.richfaces</groupId>
                            <artifactId>richfaces-build-checkstyle</artifactId>
                            <version>2</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.mortbay.jetty</groupId>
                    <artifactId>maven-jetty-plugin</artifactId>
                    <version>6.1.18</version>
                    <configuration>
                        <scanIntervalSeconds>10</scanIntervalSeconds>
                        <connectors>
                            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
                                <port>${jetty.port}</port>
                                <maxIdleTime>60000</maxIdleTime>
                            </connector>
                        </connectors>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <configuration>
                        <rules>
                            <requirePluginVersions>
                                <!-- During development SNAPSHOT versions of the CDK plugins are used.
                                     This setting ignores the no SNAPSHOT rule for the CDK plugins -->
                                <unCheckedPluginList>org.richfaces.cdk:maven-resources-plugin</unCheckedPluginList>
                            </requirePluginVersions>
                        </rules>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <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>com.sun.faces</groupId>
                    <artifactId>jsf-api</artifactId>
                </dependency>
                <dependency>
                    <groupId>com.sun.faces</groupId>
                    <artifactId>jsf-impl</artifactId>
                </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>
                </dependency>
                <dependency>
                    <groupId>org.apache.myfaces.core</groupId>
                    <artifactId>myfaces-impl</artifactId>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jsf_ri_2_1_snapshot</id>
            <activation>
                <property>
                    <name>jsf_profile</name>
                    <value>jsf_ri_2_1_snapshot</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.sun.faces</groupId>
                    <artifactId>jsf-api</artifactId>
                    <version>2.1.1-SNAPSHOT</version>
                </dependency>
                <dependency>
                    <groupId>com.sun.faces</groupId>
                    <artifactId>jsf-impl</artifactId>
                    <version>2.1.1-SNAPSHOT</version>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jsf_ri_2_1</id>
            <activation>
                <property>
                    <name>jsf_profile</name>
                    <value>jsf_ri_2_1</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.sun.faces</groupId>
                    <artifactId>jsf-api</artifactId>
                    <version>2.1.0-b11</version>
                </dependency>
                <dependency>
                    <groupId>com.sun.faces</groupId>
                    <artifactId>jsf-impl</artifactId>
                    <version>2.1.0-b11</version>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>myfaces_snapshot</id>
            <activation>
                <property>
                    <name>jsf_profile</name>
                    <value>myfaces_snapshot</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.apache.myfaces.core</groupId>
                    <artifactId>myfaces-api</artifactId>
                    <version>2.0.4-SNAPSHOT</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.myfaces.core</groupId>
                    <artifactId>myfaces-impl</artifactId>
                    <version>2.0.4-SNAPSHOT</version>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
    
    <scm>
        <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/tags/4.0.0.20110319-Final/examples/parent</connection>
        <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/tags/4.0.0.20110319-Final/examples/parent</developerConnection>
        <url>http://fisheye.jboss.org/browse/richfaces/tags/4.0.0.20110319-Final/examples/parent</url>
    </scm>
</project>