
    <!--
        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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.richfaces</groupId>
    <artifactId>richfaces-parent</artifactId>
    <packaging>pom</packaging>
    <version>5</version>
    <name>RichFaces Parent</name>

    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>5</version>
    </parent>

    <description>
        The Parent for all RichFaces sub-projects. This specifies
        build, plugin
        and project meta-data.
    </description>

    <url>http://www.jboss.org/richfaces</url>

    <licenses>
        <license>
            <name>GNU Lesser General Public License, Version 2.1</name>
            <distribution>repo</distribution>
            <url>http://www.gnu.org/licenses/lgpl-2.1.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>RichFaces committers</name>
        </developer>
    </developers>

    <issueManagement>
        <system>jira</system>
        <url>https://jira.jboss.org/jira/browse/RF</url>
    </issueManagement>

    <properties>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <!-- Override the default 2.0.9 from jboss-parent -->
        <maven.min.version>2.1.0</maven.min.version>
    </properties>

    <!-- Repository management, including extra repositories if needed -->
    <repositories>
        <repository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Maven Repository Group</name>
            <url>https://repository.jboss.org/nexus/content/groups/public/
            </url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Maven Repository Group</name>
            <url>https://repository.jboss.org/nexus/content/groups/public/
            </url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <dependencyManagement>
        <dependencies>
            <!-- Archetypes dependency -->
            <dependency>
                <groupId>org.apache.maven.archetype</groupId>
                <artifactId>archetype-packaging</artifactId>
                <version>2.0-alpha-4</version>
            </dependency>

            <!-- tests -->
            <dependency>
                <groupId>org.jboss.test-jsf</groupId>
                <artifactId>htmlunit-client</artifactId>
                <version>1.0.3</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.test-jsf</groupId>
                <artifactId>jsf-mock</artifactId>
                <version>1.0.3</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.test-jsf</groupId>
                <artifactId>jsf-test-stage</artifactId>
                <version>1.0.3</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.7</version>
            </dependency>
            <!-- JSF imple is only a testing requirement -->
            <!--   This is set by profiles below -->
            <dependency>
                <groupId>${jsf2.impl.groupid}</groupId>
                <artifactId>${jsf2.impl.artifactid}</artifactId>
                <version>${jsf2.impl.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- Build -->
    <build>
        <!--
            Plugin config, including versions to use in the build. Note: some
            are inherited from jboss-parent
        -->
        <pluginManagement>
            <plugins>
                <!-- Release -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <!-- All sub-modules will have same version -->
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <!-- During release:perform, enable the "release" profile -->
                        <releaseProfiles>release</releaseProfiles>
                        <!--
                            RichFaces modules should override and set goals to
                            run for release:perform
                        -->
                        <!-- <goals></goals> -->
                    </configuration>
                </plugin>


                <!-- 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.codehaus.mojo</groupId>
                    <artifactId>javacc-maven-plugin</artifactId>
                    <version>2.4</version>
                </plugin>

                <!-- reporting -->
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>maven-clover2-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>2.3</version>
                    <configuration>
                        <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml
                        </configLocation>
                        <suppressionsLocation>checkstyle-suppressions.xml
                        </suppressionsLocation>
                    </configuration>
                    <executions>
                        <execution>
                            <id>richfaces-checkstyle-report</id>
                            <phase>process-sources</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- dev -->
                <plugin>
                    <artifactId>maven-eclipse-plugin</artifactId>
                    <configuration>
                        <wtpversion>2.0</wtpversion>
                        <downloadSources>true</downloadSources>
                    </configuration>
                </plugin>

                <!--
                    docs TODO should move to profiles probably a "doc" profile
                -->
                <plugin>
                    <groupId>gr.abiss.mvn.plugins</groupId>
                    <artifactId>maven-jstools-plugin</artifactId>
                    <version>0.7</version>
                    <configuration>
                        <jsDir>${basedir}/src/main/resources/Meta-inf/resources
                        </jsDir>
                        <includes>**/*.js</includes>
                        <caseSensitive>true</caseSensitive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.2</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- For the release this parent pom -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <inherited>false</inherited>
            </plugin>
        </plugins>
    </build>

    <!-- Profiles -->
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <!-- TODO move to doc profile? -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <javadocVersion>1.5</javadocVersion>
                            <aggregate>true</aggregate>
                        </configuration>
                        <executions>
                            <execution>
                                <id>generate-javadoc</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!--
                Triggers generated documentation as part of builds ( javadoc,
                jsdoc, etc...
            -->
            <id>doc</id>
            <!-- TODO -->
        </profile>
        <profile>
            <!-- Triggers clover reports to be generated -->
            <id>clover</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-clover2-plugin</artifactId>
                        <configuration>
                            <licenseLocation>
                                ${clover.license.path}
                            </licenseLocation>
                            <jdk>1.5</jdk>
                            <generatePdf>false</generatePdf>
                            <generateXml>true</generateXml>
                            <generateHtml>true</generateHtml>
                        </configuration>
                        <executions>
                            <execution>
                                <id>instrument</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>instrument</goal>
                                    <goal>check</goal>
                                    <goal>clover</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- Required when in JBoss hudson env to have clover reports generate -->
            <id>hudson</id>
            <properties>
                <clover.license.path>/home/hudson/config_repository/resources/richfaces/richfaces-clover-license.txt
                </clover.license.path>
            </properties>
        </profile>

        <!--
            The following profiles determine the JSF api/impl combinations that
            will beused. The detfault profile is "jsf-ri", this can be
            overwritten by setting -Djsf_profile=<profile-name> on the mvn command line
        -->
        <profile>
            <id>jsf_ri</id>
            <activation>
                <property>
                    <name>!jsf_profile</name>
                </property>
            </activation>
            <properties>
                <!-- Define jsf 2 api dependency -->
                <jsf2.api.groupid>com.sun.faces</jsf2.api.groupid>
                <jsf2.api.artifactid>jsf-api</jsf2.api.artifactid>
                <jsf2.api.version>2.0.2</jsf2.api.version>
                <!-- Define jsf 2 impl dependency -->
                <jsf2.impl.groupid>com.sun.faces</jsf2.impl.groupid>
                <jsf2.impl.artifactid>jsf-impl</jsf2.impl.artifactid>
                <jsf2.impl.version>2.0.2</jsf2.impl.version>
            </properties>
        </profile>
        <profile>
            <id>jsf_ri_javax</id>
            <activation>
                <property>
                    <name>jsf_profile</name>
                    <value>jsf_ri_javax</value>
                </property>
            </activation>
            <properties>
                <!-- Define jsf 2 api dependency -->
                <jsf2.api.groupid>javax.faces</jsf2.api.groupid>
                <jsf2.api.artifactid>jsf-api</jsf2.api.artifactid>
                <jsf2.api.version>2.0.2-FCS</jsf2.api.version>
                <!-- Define jsf 2 impl dependency -->
                <jsf2.impl.groupid>javax.faces</jsf2.impl.groupid>
                <jsf2.impl.artifactid>jsf-impl</jsf2.impl.artifactid>
                <jsf2.impl.version>2.0.2-FCS</jsf2.impl.version>
            </properties>
        </profile>
        <profile>
            <id>jsf_ri_snapshot</id>
            <activation>
                <property>
                    <name>jsf_profile</name>
                    <value>jsf_ri_snapshot</value>
                </property>
            </activation>
            <properties>
                <!-- Define jsf 2 api dependency -->
                <jsf2.api.groupid>com.sun.faces</jsf2.api.groupid>
                <jsf2.api.artifactid>jsf-api</jsf2.api.artifactid>
                <jsf2.api.version>2.0.3-SNAPSHOT</jsf2.api.version>
                <!-- Define jsf 2 impl dependency -->
                <jsf2.impl.groupid>com.sun.faces</jsf2.impl.groupid>
                <jsf2.impl.artifactid>jsf-impl</jsf2.impl.artifactid>
                <jsf2.impl.version>2.0.3-SNAPSHOT</jsf2.impl.version>
            </properties>
        </profile>
        <profile>
            <id>myfaces</id>
            <activation>
                <property>
                    <name>jsf_profile</name>
                    <value>myfaces</value>
                </property>
            </activation>
            <properties>
                <!-- Define jsf 2 api dependency -->
                <jsf2.api.groupid>org.apache.myfaces.core</jsf2.api.groupid>
                <jsf2.api.artifactid>myfaces-api</jsf2.api.artifactid>
                <jsf2.api.version>2.0.0</jsf2.api.version>
                <!-- Define jsf 2 impl dependency -->
                <jsf2.impl.groupid>org.apache.myfaces.core</jsf2.impl.groupid>
                <jsf2.impl.artifactid>myfaces-impl</jsf2.impl.artifactid>
                <jsf2.impl.version>2.0.0</jsf2.impl.version>
            </properties>
        </profile>
        <profile>
            <id>myfaces_snapshot</id>
            <activation>
                <property>
                    <name>jsf_profile</name>
                    <value>myfaces_snapshot</value>
                </property>
            </activation>
            <properties>
                <!-- Define jsf 2 api dependency -->
                <jsf2.api.groupid>org.apache.myfaces.core</jsf2.api.groupid>
                <jsf2.api.artifactid>myfaces-api</jsf2.api.artifactid>
                <jsf2.api.version>2.0.1-SNAPSHOT</jsf2.api.version>
                <!-- Define jsf 2 impl dependency -->
                <jsf2.impl.groupid>org.apache.myfaces.core</jsf2.impl.groupid>
                <jsf2.impl.artifactid>myfaces-impl</jsf2.impl.artifactid>
                <jsf2.impl.version>2.0.1-SNAPSHOT</jsf2.impl.version>
            </properties>
        </profile>

    </profiles>

    <distributionManagement>
        <downloadUrl>
            http://www.jboss.org/richfaces/download
        </downloadUrl>
    </distributionManagement>

    <!-- SCM and distribution management -->
    <scm>
        <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/build/parent/tags/richfaces-parent-5
        </connection>
        <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/build/parent/tags/richfaces-parent-5
        </developerConnection>
        <url>http://fisheye.jboss.org/browse/richfaces/tags/richfaces-parent-5</url>
    </scm>

</project>
