<?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.codehaus</groupId>
    <artifactId>codehaus-parent</artifactId>
    <version>1</version>
  </parent>
  <groupId>org.jbehave.web</groupId>
  <artifactId>jbehave-web</artifactId>
  <version>3.4</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>web-queue</module>
  </modules>

  <properties>
    <jbehave.core.version>3.5</jbehave.core.version>
    <jbehave.site.version>3.1.1</jbehave.site.version>
    <jbehave.webapp.name>jbehave-web-runner</jbehave.webapp.name>
    <jdk.version>1.5</jdk.version>
    <jetty.version>7.2.2.v20101205</jetty.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 http://jira.codehaus.org/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>2.3.1</version>
          <configuration>
            <source>${jdk.version}</source>
            <target>${jdk.version}</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.1</version>
          <configuration>
            <warName>${jbehave.webapp.name}</warName>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>${jetty.version}</version>
          <configuration>
            <webAppConfig>
              <contextPath>/${jbehave.webapp.name}</contextPath>
            </webAppConfig>
            <webApp>${project.build.directory}/${jbehave.webapp.name}.war</webApp>
            <connectors>
              <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                <port>8080</port>
                <maxIdleTime>60000</maxIdleTime>
              </connector>
            </connectors>
            <scanIntervalSeconds>5</scanIntervalSeconds>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.6</version>
          <configuration>
            <junitArtifactName>junit:junit</junitArtifactName>
            <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.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.7</version>
          <executions>
            <execution>
              <id>attach-javadoc</id>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                <links>
                  <link>http://java.sun.com/j2se/1.5/docs/api</link>
                </links>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</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.4.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.0</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <preparationGoals>clean install</preparationGoals>
            <goals>deploy</goals>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.2-beta-5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>2.4</version>
          <configuration>
            <formats>
              <format>html</format>
            </formats>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>clean</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.xsite</groupId>
          <artifactId>xsite-maven-plugin</artifactId>
          <version>1.2</version>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings 
          only. It has no influence on the Maven build itself. -->
        <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-dependency-plugin</artifactId>
                    <versionRange>[2.1,)</versionRange>
                    <goals>
                      <goal>copy</goal>
                      <goal>unpack</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.jbehave</groupId>
                    <artifactId>jbehave-maven-plugin</artifactId>
                    <versionRange>[${jbehave.core.version},)</versionRange>
                    <goals>
                      <goal>unpack-view-resources</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </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>
      <!-- reporting profile -->
      <id>reporting</id>
      <build>
        <plugins>
          <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>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <reporting>
        <plugins>
          <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>
        </plugins>
      </reporting>
    </profile>
  </profiles>

  <licenses>
    <license>
      <name>BSD license</name>
      <url>http://git.codehaus.org/gitweb.cgi?p=jbehave-git.git;a=blob_plain;f=LICENSE.txt;hb=HEAD</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers />
  <contributors />

  <scm>
    <connection>scm:git:git://git.codehaus.org/jbehave-web.git</connection>
    <developerConnection>scm:git:ssh://git@git.codehaus.org/jbehave-web.git</developerConnection>
    <url>http://git.codehaus.org/gitweb.cgi?p=jbehave-web.git</url>
  </scm>

</project>
