<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</artifactId>
    <packaging>jar</packaging>
    <version>1.3.8</version>
    <name>chorus</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/handlers</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>2.3.2</version>

                <configuration>
                  <source>1.5</source>
                  <target>1.5</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/handlers</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/handlers/**/*.java</include>
                    </includes>
                    <properties>
                        <year>2012</year>
                    </properties>
                </configuration>
            </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>

        <!-- In general the philosophy is that because Chorus is a library, we are trying to
        avoid any mandatory dependencies on other libraries, otherwise components using Chorus would be forced
        to inherit those extra dependencies

        For this reason Spring features have been pushed down into Chorus-Spring module,
        and certain other features into Chorus-tools. Users seeking to run an interpreter with
        these features enabled need to declare dependencies on these derived modules, as appropriate

        The basic Chorus interpreter and the JMX remoting feature should run just fine with the
        main chorus.jar and the JDK -->

        <!-- Ant is not required unless you make use of ChorusTask, so it is an optional dependency -->
        <!-- There should be no requirement for ant dependencies outside ChorusTask -->
        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.8.2</version>
            <optional>true</optional>
        </dependency>

        <!-- Logging classes are a compile-time dependency for the chorus core library, but not a runtime dependency
        since there is only one class ChorusCommonsLogProvider which directly depends on commons-logging, and this
        class is loaded by reflection if found to be on the classpath. Hence these libraries are optional, if found,
        will be used, otherwise logging to standard out
        out/err -->
        <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>

        <!-- junit is now an optional dependency -
        We are using ChorusAssert to avoid a mandatory dependency on junit from the core interpreter
        although client application can use and throw JUnit assertion errors if they perfer to do so -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <optional>true</optional>
        </dependency>

    </dependencies>
</project>
