<?xml version="1.0" encoding="UTF-8"?>
<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>
  <parent>
    <groupId>org.jbehave</groupId>
    <artifactId>jbehave-pom</artifactId>
    <version>1</version>
  </parent>
  <groupId>org.jbehave.web</groupId>
  <artifactId>jbehave-web</artifactId>
  <version>4.0-beta-1</version>
  <packaging>pom</packaging>
  <name>JBehave Web</name>
  <description>JBehave Web provides a web integration layer for Behaviour-Driven Development</description>

  <modules>
    <module>web-io</module>
    <module>web-resources</module>
    <module>web-selenium</module>
    <module>web-runner</module>
    <module>archetypes</module>
  </modules>

  <properties>
    <jbehave.core.version>4.1</jbehave.core.version>
    <jbehave.site.version>3.3</jbehave.site.version>
    <jbehave.webapp.name>jbehave-web-runner</jbehave.webapp.name>
    <jdk.version>1.6</jdk.version>
    <jetty.version>9.4.3.v20170317</jetty.version>
    <gmaven.version>1.5</gmaven.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>1.8.5</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.jbehave</groupId>
      <artifactId>jbehave-core</artifactId>
      <version>${jbehave.core.version}</version>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
    </dependency>
    <dependency>
      <!-- hack to overcome https://issues.apache.org/jira/browse/MSITE-228 -->
      <groupId>org.apache.maven.skins</groupId>
      <artifactId>maven-default-skin</artifactId>
      <version>1.0</version>
      <optional>true</optional>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>${basedir}/src/main/java</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>true</filtering>
        <excludes>
          <exclude>**/*.gif</exclude>
          <exclude>**/*.jpg</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>false</filtering>
        <includes>
          <include>**/*.gif</include>
          <include>**/*.jpg</include>
        </includes>
      </resource>
      <resource>
        <directory>${basedir}/src/main/webapp</directory>
        <filtering>false</filtering>
      </resource>
      <resource>
        <directory>${project.build.directory}/resources</directory>
        <filtering>false</filtering>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>${basedir}/src/main/webapp</directory>
        <filtering>false</filtering>
      </testResource>
      <testResource>
        <directory>${basedir}/src/test/java</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </testResource>
      <testResource>
        <directory>${basedir}/src/test/resources</directory>
        <filtering>true</filtering>
      </testResource>
    </testResources>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav</artifactId>
        <version>1.0-beta-2</version>
      </extension>
    </extensions>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.2</version>
          <configuration>
            <source>${jdk.version}</source>
            <target>${jdk.version}</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.18.1</version>
          <configuration>
            <junitArtifactName>junit:junit</junitArtifactName>
            <includes>
              <include>**/*Test.java</include>
            </includes>
            <forkMode>once</forkMode>
            <printSummary>true</printSummary>
            <useFile>true</useFile>
            <systemPropertyVariables>
              <property>
                <name>java.awt.headless</name>
                <value>true</value>
              </property>
            </systemPropertyVariables>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>2.18.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>2.8</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.3</version>
          <executions>
            <execution>
              <id>attach-javadoc</id>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                <failOnError>false</failOnError>
                <links>
                  <link>http://docs.oracle.com/javase/6/docs/api</link>
                </links>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.4</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.7</version>
          <configuration>
            <encoding>${resource.encoding}</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.1</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <preparationGoals>clean install</preparationGoals>
            <goals>deploy</goals>
            <pushChanges>false</pushChanges>
            <localCheckout>true</localCheckout>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.10</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.8</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.4</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>2.6</version>
          <configuration>
            <formats>
              <format>html</format>
            </formats>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>clean</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.gmaven</groupId>
          <artifactId>gmaven-plugin</artifactId>
          <version>${gmaven.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.xsite</groupId>
          <artifactId>xsite-maven-plugin</artifactId>
          <version>1.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.6</version>
          <configuration>
            <warName>${jbehave.webapp.name}</warName>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>${jetty.version}</version>
          <configuration>
            <war>${project.build.directory}/${jbehave.webapp.name}.war</war>
            <scanIntervalSeconds>5</scanIntervalSeconds>
            <webApp>
              <contextPath>/${jbehave.webapp.name}</contextPath>
            </webApp>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <!-- Distribution profile -->
      <id>distribution</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>distribution</module>
      </modules>
    </profile>
    <profile>
      <!-- Examples profile -->
      <id>examples</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>examples</module>
      </modules>
    </profile>
    <profile>
      <id>reporting</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>enforce-maven</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireMavenVersion>
                      <version>3.0</version>
                    </requireMavenVersion>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <executions>
              <execution>
                <phase>install</phase>
                <goals>
                  <goal>site</goal>
                </goals>
                <configuration>
                  <reportPlugins>
                    <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-project-info-reports-plugin</artifactId>
                      <configuration>
                        <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                        <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                      </configuration>
                    </plugin>
                    <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-surefire-report-plugin</artifactId>
                    </plugin>
                    <plugin>
                      <groupId>org.codehaus.mojo</groupId>
                      <artifactId>cobertura-maven-plugin</artifactId>
                    </plugin>
                  </reportPlugins>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
        <id>jdk8</id>
        <activation>
            <jdk>[1.8,)</jdk>
        </activation>
        <properties>
            <additionalparam>-Xdoclint:none</additionalparam>
        </properties>
    </profile>
  </profiles>

  <licenses>
    <license>
      <name>BSD license</name>
      <url>https://github.com/jbehave/jbehave-web/blob/master/LICENSE.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git://github.com/jbehave/jbehave-web.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/jbehave/jbehave-web.git</developerConnection>
    <url>http://github.com/jbehave/jbehave-web</url>
    <tag>jbehave-web-4.0-beta-1</tag>
  </scm>

</project>
