<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">

    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>9</version>
        <relativePath />
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <groupId>org.jboss.portletbridge</groupId>
    <artifactId>portletbridge-parent</artifactId>
    <version>3.1.0.Final</version>
    <packaging>pom</packaging>
    <name>JBoss JSF2 Portlet Bridge for a portlet environment, parent pom</name>

    <properties>
        <!-- JSF2 Implementations -->
        <version.mojarra2>2.1.13</version.mojarra2>

        <!-- RichFaces 4 versions -->
        <version.richfaces4>4.2.3.Final</version.richfaces4>

        <!-- Testing versions -->
        <version.junit>4.10</version.junit>
        <version.arquillian>1.0.2.Final</version.arquillian>
        <version.shrinkwrap.descriptor>2.0.0-alpha-4</version.shrinkwrap.descriptor>
        <version.shrinkwrap.resolver>2.0.0-alpha-4</version.shrinkwrap.resolver>
        <version.arquillian.graphene>2.0.0.Alpha2</version.arquillian.graphene>
        <version.arquillian.extension.portal>1.0.0.Alpha2</version.arquillian.extension.portal>
        <version.gatein.portal.testing>1.0.0.Alpha3</version.gatein.portal.testing>
        <version.pluto.portal.testing>1.0.0.Alpha3</version.pluto.portal.testing>
        <version.jbossas7.container>7.1.1.Final</version.jbossas7.container>

        <!-- Plugin versions -->
        <version.plugin.surefire>2.12</version.plugin.surefire>
        <version.plugin.checkstyle>2.9.1</version.plugin.checkstyle>

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

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

    <scm>
        <connection>scm:git:git://github.com/jbossportletbridge/jbossportletbridge.git</connection>
        <developerConnection>scm:git:git://github.com/jbossportletbridge/jbossportletbridge.git</developerConnection>
        <url>https://github.com/jbossportletbridge/jbossportletbridge</url>
    </scm>

    <dependencyManagement>
        <dependencies>
            <!-- Project dependencies -->
            <dependency>
                <groupId>org.jboss.portletbridge</groupId>
                <artifactId>portletbridge-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.portletbridge</groupId>
                <artifactId>portletbridge-impl</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.portletbridge</groupId>
                <artifactId>portletbridge-extension-richfaces</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.portletbridge</groupId>
                <artifactId>jsf2-depchain</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.jboss.portletbridge</groupId>
                <artifactId>richfaces4-depchain</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
            </dependency>

            <!-- Spec dependencies -->
            <dependency>
                <groupId>javax.portlet</groupId>
                <artifactId>portlet-api</artifactId>
                <version>2.0</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
                <version>2.5</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet.jsp</groupId>
                <artifactId>jsp-api</artifactId>
                <version>2.1</version>
            </dependency>
            <dependency>
                <groupId>com.sun.faces</groupId>
                <artifactId>jsf-api</artifactId>
                <version>${version.mojarra2}</version>
            </dependency>
            <dependency>
                <groupId>com.sun.faces</groupId>
                <artifactId>jsf-impl</artifactId>
                <version>${version.mojarra2}</version>
            </dependency>

            <!-- RichFaces 4 dependencies -->
            <dependency>
                <groupId>org.richfaces</groupId>
                <artifactId>richfaces-bom</artifactId>
                <version>${version.richfaces4}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>

            <!-- Test dependencies -->
            <dependency>
                <groupId>org.jboss.shrinkwrap.descriptors</groupId>
                <artifactId>shrinkwrap-descriptors-bom</artifactId>
                <version>${version.shrinkwrap.descriptor}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.jboss.shrinkwrap.resolver</groupId>
                <artifactId>shrinkwrap-resolver-bom</artifactId>
                <version>${version.shrinkwrap.resolver}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian</groupId>
                <artifactId>arquillian-bom</artifactId>
                <version>${version.arquillian}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian.graphene</groupId>
                <artifactId>graphene-webdriver</artifactId>
                <version>${version.arquillian.graphene}</version>
                <scope>test</scope>
                <type>pom</type>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${version.junit}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>1.8.1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian.extension</groupId>
                <artifactId>arquillian-portal-impl</artifactId>
                <version>${version.arquillian.extension.portal}</version>
            </dependency>

            <!-- GateIn Testing dependencies -->
            <dependency>
                <groupId>org.jboss.portletbridge.testing.gatein</groupId>
                <artifactId>gatein-arquillian-extension</artifactId>
                <version>${version.gatein.portal.testing}</version>
            </dependency>

            <!-- Pluto Testing dependencies -->
            <dependency>
                <groupId>org.jboss.portletbridge.testing.pluto</groupId>
                <artifactId>pluto-jetty-bom</artifactId>
                <version>${version.pluto.portal.testing}</version>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.jboss.portletbridge.testing.pluto</groupId>
                <artifactId>pluto-extension-jsf</artifactId>
                <version>${version.pluto.portal.testing}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <modules>
        <module>build-resources</module>
        <module>core</module>
        <module>extension/richfaces</module>
        <module>depchain/jsf2</module>
        <module>depchain/richfaces4</module>
        <module>testsuites</module>
        <module>examples</module>
        <module>archetypes</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${version.plugin.checkstyle}</version>
                    <configuration>
                        <configLocation>code-style/checkstyle.xml</configLocation>
                        <logViolationsToConsole>true</logViolationsToConsole>
                        <violationSeverity>error</violationSeverity>
                    </configuration>
                    <executions>
                        <execution>
                            <id>checkstyle-report</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>org.jboss.portletbridge</groupId>
                            <artifactId>portletbridge-build-resources</artifactId>
                            <version>${project.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <!-- So m2e doesn't throw errors for features it doesn't support in the POM -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-checkstyle-plugin</artifactId>
                                        <versionRange>[1.0.0,)</versionRange>
                                        <goals>
                                            <goal>check</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute />
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-dependency-plugin</artifactId>
                                        <versionRange>[1.0.0,)</versionRange>
                                        <goals>
                                            <goal>copy-dependencies</goal>
                                            <goal>unpack</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.plugin.surefire}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <!-- Enforce Maven Environment -->
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-maven-environment</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <rules>
                        <requireMavenVersion>
                            <version>[3.0.0,)</version>
                        </requireMavenVersion>
                        <requireProperty>
                            <property>env.JAVA_HOME</property>
                            <message>"JAVA_HOME needs to be set to compile"</message>
                        </requireProperty>
                    </rules>
                </configuration>
            </plugin>

            <!-- Release plugin -->
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <pushChanges>false</pushChanges>
                    <localCheckout>true</localCheckout>
                </configuration>
            </plugin>
        </plugins>
    </build>

  <!-- Reporting -->
  <reporting>
    <plugins>

      <!-- Cobertura (Code Coverage) -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <formats>
            <format>html</format>
            <format>xml</format>
          </formats>
        </configuration>
      </plugin>

      <!-- FindBugs -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>2.5.2</version>
        <configuration>
          <xmlOutput>true</xmlOutput>
          <findbugsXmlOutputDirectory>target/site</findbugsXmlOutputDirectory>
        </configuration>
      </plugin>

    </plugins>
  </reporting>

</project>
