<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.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>
    <groupId>org.chorusbdd</groupId>
    <artifactId>chorus-spring</artifactId>
    <packaging>jar</packaging>
    <version>2.0.1</version>
    <name>chorus-spring</name>
    <url>http://www.chorus-bdd.org</url>
    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://opensource.org/licenses/MIT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:git@github.com:Chorus-bdd/Chorus.git</connection>
        <developerConnection>scm:git:git@github.com:Chorus-bdd/Chorus.git</developerConnection>
        <url>git@github.com:Chorus-bdd/Chorus.git</url>
    </scm>
    <build>

        <!-- Copy chorus resources from the test/handlers and test/junit subtree, so resource files
        required by a handlers can be local to the .java, rather than residing in
        a separate tree under test/resources, although the default test/resources location
        is still supported -->
        <testResources>
             <testResource>
               <directory>src/test/features</directory>
                 <includes>
                   <include>**/*.xml</include>
                   <include>**/*.properties</include>
                   <include>**/*.feature</include>
                 </includes>
             </testResource>

            <testResource>
               <directory>src/test/junit</directory>
                 <includes>
                   <include>**/*.xml</include>
                   <include>**/*.properties</include>
                   <include>**/*.feature</include>
                 </includes>
             </testResource>

            <!-- include the standard test/resources directory, this is still supported
            if you don't want to put resources within the test/java subtree -->
            <testResource>
               <directory>src/test/resources</directory>
            </testResource>
        </testResources>


        <!-- Since we have separated our junit tests from our chorus handlers,
        we need to configure both directories as test source directories -->
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                  <source>1.7</source>
                  <target>1.7</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.4</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                  <execution>
                    <id>attach-sources</id>
                    <goals>
                      <goal>jar</goal>
                    </goals>
                  </execution>
                </executions>
            </plugin>

            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>build-helper-maven-plugin</artifactId>
               <version>1.7</version>
               <executions>
                 <execution>
                   <id>add-source</id>
                   <phase>generate-sources</phase>
                   <goals>
                     <goal>add-test-source</goal>
                   </goals>
                   <configuration>
                     <sources>
                       <source>src/test/junit</source>
                       <source>src/test/features</source>
                     </sources>
                   </configuration>
                 </execution>
               </executions>
             </plugin>

            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>1.9.0</version>
                <configuration>
                    <header>src/etc/header.txt</header>
                    <includes>
                        <include>src/main/java/**/*.java</include>
                        <include>src/test/junit/**/*.java</include>
                        <include>src/test/features/**/*.java</include>
                    </includes>
                    <properties>
                        <year>2015</year>
                    </properties>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.17</version>
            </plugin>
        </plugins>

    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8.1</version>
            </plugin>
        </plugins>
    </reporting>

    <dependencies>
        <dependency>
            <groupId>org.chorusbdd</groupId>
            <artifactId>chorus</artifactId>
            <version>2.0.1</version>
        </dependency>

        <!-- The below are required since these are also optional in the core chorus module -->
        <!-- Since the chorus module builds an 'uber jar' which includes the contents of these modules
         these modules should not be required by a third party -->
        <dependency>
            <groupId>org.chorusbdd</groupId>
            <artifactId>chorus-handlers</artifactId>
            <version>2.0.1</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.chorusbdd</groupId>
            <artifactId>chorus-interpreter</artifactId>
            <version>2.0.1</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.chorusbdd</groupId>
            <artifactId>chorus-processes</artifactId>
            <version>2.0.1</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.chorusbdd</groupId>
            <artifactId>chorus-remoting</artifactId>
            <version>2.0.1</version>
            <optional>true</optional>
        </dependency>

        <!-- Annotations are required for @Resource, but only for jdk <= 1.6 -->
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>jsr250-api</artifactId>
            <version>1.0</version>
        </dependency>

        <!-- Spring is required, but dependees may exclude to supply their preferred version -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>3.0.7.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>3.0.7.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>3.0.7.RELEASE</version>
        </dependency>

        <!-- These logging dependencies are optional, Spring has commons-logging dependency already, but possibly no log4j, but
         we want to use it for our own self-testing -->
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1.1</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.16</version>
            <optional>true</optional>
        </dependency>

        <!-- test dependencies -->

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
